-
Notifications
You must be signed in to change notification settings - Fork 5
71 lines (71 loc) · 2.47 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ${{ matrix.config.os }}
env: ${{ matrix.config.env }}
strategy:
fail-fast: false
matrix:
config:
- {
os: "ubuntu-latest",
arch: "amd64",
args: "",
url: "https://github.com/casey/just/releases/download/v0.5.11/just-v0.5.11-x86_64-unknown-linux-musl.tar.gz",
name: "just",
pathInArchive: "just",
env: {},
}
- {
os: "ubuntu-latest",
arch: "aarch64",
args: "--target aarch64-unknown-linux-gnu",
url: "https://github.com/casey/just/releases/download/v0.5.11/just-v0.5.11-x86_64-unknown-linux-musl.tar.gz",
name: "just",
pathInArchive: "just",
env: { OPENSSL_DIR: "/usr/local/openssl-aarch64" },
}
- {
os: "macos-latest",
arch: "amd64",
args: "",
url: "https://github.com/casey/just/releases/download/v0.5.11/just-v0.5.11-x86_64-apple-darwin.tar.gz",
name: "just",
pathInArchive: "just",
env: {},
}
steps:
- uses: actions/checkout@v2
- uses: engineerd/[email protected]
with:
name: ${{ matrix.config.name }}
url: ${{ matrix.config.url }}
pathInArchive: ${{ matrix.config.pathInArchive }}
# hack(bacongobbler): install rustfmt to work around darwin toolchain issues
- name: "(macOS) install dev tools"
if: runner.os == 'macOS'
run: |
rustup component add rustfmt --toolchain stable-x86_64-apple-darwin
rustup component add clippy --toolchain stable-x86_64-apple-darwin
rustup update stable
- name: setup for cross-compile builds
if: matrix.config.arch == 'aarch64'
run: |
sudo apt update
sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
cd /tmp
git clone https://github.com/openssl/openssl
cd openssl
git checkout OpenSSL_1_1_1h
sudo mkdir -p $OPENSSL_DIR
./Configure linux-aarch64 --prefix=$OPENSSL_DIR --openssldir=$OPENSSL_DIR shared
make CC=aarch64-linux-gnu-gcc
sudo make install
rustup target add aarch64-unknown-linux-gnu
- name: Build
run: |
just build ${{ matrix.config.args }}