mirror of
https://seed.radicle.dev/rad:z39mP9rQAaGmERfUMPULfPUi473tY.git
synced 2026-11-21 18:40:46 +08:00
ci: Build GNU binaries on Linux
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
[target.aarch64-unknown-linux-gnu]
|
||||
linker = "aarch64-linux-gnu-gcc"
|
||||
@@ -16,14 +16,12 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
target: [x86_64-unknown-linux-musl, aarch64-unknown-linux-musl]
|
||||
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl, aarch64-unknown-linux-gnu]
|
||||
include:
|
||||
- target: x86_64-unknown-linux-musl
|
||||
docker_image: registry.gitlab.com/rust_musl_docker/image:stable-latest
|
||||
docker_options: -v /home/runner/work/radicle-tui/radicle-tui:/workdir -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
|
||||
- target: aarch64-unknown-linux-musl
|
||||
docker_image: messense/rust-musl-cross:aarch64-musl
|
||||
docker_options: -v /home/runner/work/radicle-tui/radicle-tui:/home/rust/src -v /home/runner/.cargo/git:/root/.cargo/git -v /home/runner/.cargo/registry:/root/.cargo/registry
|
||||
dependencies: musl-tools
|
||||
- target: aarch64-unknown-linux-gnu
|
||||
dependencies: gcc-aarch64-linux-gnu
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v4
|
||||
@@ -35,14 +33,13 @@ jobs:
|
||||
~/.cargo/git
|
||||
target
|
||||
key: cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
|
||||
- uses: dtolnay/rust-toolchain@1.80
|
||||
- name: Install build dependencies
|
||||
run: sudo apt-get update --yes && sudo apt-get install --yes ${{ matrix.dependencies }}
|
||||
- name: Build release binaries
|
||||
uses: addnab/docker-run-action@v3
|
||||
with:
|
||||
image: ${{ matrix.docker_image }}
|
||||
options: ${{ matrix.docker_options }}
|
||||
run: |
|
||||
rustup target add "${{ matrix.target }}"
|
||||
cargo build --release --target "${{ matrix.target }}"
|
||||
run: |
|
||||
rustup target add "${{ matrix.target }}"
|
||||
cargo build --release --target "${{ matrix.target }}"
|
||||
- name: Upload release binaries
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user