File tree Expand file tree Collapse file tree 1 file changed +9
-18
lines changed
Expand file tree Collapse file tree 1 file changed +9
-18
lines changed Original file line number Diff line number Diff line change @@ -43,27 +43,18 @@ jobs:
4343 with :
4444 targets : ${{ matrix.target }}
4545
46- - name : Install cross-compilation tools
46+ - name : Install cross-compilation tool
4747 if : matrix.os == 'ubuntu-latest'
4848 run : |
49- sudo apt-get update
50- sudo apt-get install -y musl-tools
51- if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then
52- sudo apt-get install -y gcc-aarch64-linux-gnu
53- fi
54- if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]]; then
55- sudo apt-get install -y gcc-aarch64-linux-gnu
56- # Download and install musl cross-compiler for aarch64
57- wget https://musl.cc/aarch64-linux-musl-cross.tgz
58- tar xzf aarch64-linux-musl-cross.tgz
59- echo "$PWD/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
60- fi
61-
62- - name : Build release binary
49+ cargo install cross --git https://github.com/cross-rs/cross
50+
51+ - name : Build release binary (native)
52+ if : matrix.os != 'ubuntu-latest'
6353 run : cargo build --release --target ${{ matrix.target }}
64- env :
65- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER : aarch64-linux-gnu-gcc
66- CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER : aarch64-linux-musl-gcc
54+
55+ - name : Build release binary (cross-compile)
56+ if : matrix.os == 'ubuntu-latest'
57+ run : cross build --release --target ${{ matrix.target }}
6758
6859 - name : Package binary
6960 run : |
You can’t perform that action at this time.
0 commit comments