Skip to content
This repository was archived by the owner on Oct 29, 2024. It is now read-only.

Commit 60ca2d4

Browse files
committed
Refactor build process to use cross crate
1 parent 330a5cb commit 60ca2d4

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,32 +33,18 @@ jobs:
3333
- name: Checkout code
3434
uses: actions/checkout@v4
3535

36-
- name: Install dependencies for aarch64 linux
37-
if: matrix.target == 'aarch64-unknown-linux-gnu'
38-
run: sudo apt-get update -y && sudo apt-get install -y g++-aarch64-linux-gnu libc6-dev-arm64-cross
39-
4036
- name: Install Rust
4137
uses: actions-rust-lang/setup-rust-toolchain@v1
4238
with:
4339
toolchain: stable
4440
target: ${{ matrix.target }}
4541

46-
- name: Add target
42+
- name: Install cross crate
4743
run: |
48-
rustup target add ${{ matrix.target }}
49-
rustup toolchain install stable-${{ matrix.target }}
44+
cargo install -f cross
5045
5146
- name: Build for non-aarch64 linux
52-
if: matrix.target != 'aarch64-unknown-linux-gnu'
53-
run: cargo build --release --target ${{ matrix.target }}
54-
55-
- name: Build for aarch64 linux
56-
if: matrix.target == 'aarch64-unknown-linux-gnu'
57-
run: cargo build --release --target ${{ matrix.target }}
58-
env:
59-
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
60-
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
61-
CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++
47+
run: cross build --release --target ${{ matrix.target }}
6248

6349
- name: Upload unix-like binaries to release
6450
uses: svenstaro/upload-release-action@v2

0 commit comments

Comments
 (0)