Skip to content

Commit

Permalink
Add support for more archs
Browse files Browse the repository at this point in the history
  • Loading branch information
lemaitre-aneo committed Mar 22, 2024
1 parent 2c5157a commit d32f8a5
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,44 @@ jobs:
fail-fast: false
matrix:
job:
- { target: x86_64-unknown-linux-gnu, os: linux, arch: amd64, runner: ubuntu-latest }
- { target: x86_64-unknown-linux-musl, os: linux, arch: amd64, runner: ubuntu-latest }
- { target: x86_64-apple-darwin, os: darwin, arch: amd64, runner: macos-latest }
- { target: x86_64-pc-windows-msvc, os: windows, arch: amd64, runner: windows-latest }
- { target: x86_64-unknown-linux-gnu, os: linux, arch: amd64, runner: ubuntu-latest, run: true }
- { target: i686-unknown-linux-gnu, os: linux, arch: "386", runner: ubuntu-latest, run: true }
- { target: x86_64-unknown-linux-musl, os: linux, arch: amd64, runner: ubuntu-latest, run: true }
- { target: i686-unknown-linux-musl, os: linux, arch: "386", runner: ubuntu-latest, run: true }
- { target: aarch64-unknown-linux-musl, os: linux, arch: arm64, runner: ubuntu-latest, run: false }
- { target: arm-unknown-linux-musleabi, os: linux, arch: arm, runner: ubuntu-latest, run: false }
- { target: x86_64-unknown-freebsd, os: freebsd, arch: amd64, runner: ubuntu-latest, run: false }
- { target: i686-unknown-freebsd, os: freebsd, arch: "386", runner: ubuntu-latest, run: false }
- { target: x86_64-apple-darwin, os: darwin, arch: amd64, runner: macos-latest, run: true }
- { target: aarch64-apple-darwin, os: darwin, arch: arm64, runner: macos-latest, run: false }
- { target: x86_64-pc-windows-msvc, os: windows, arch: amd64, runner: windows-latest, run: true }
- { target: i686-pc-windows-msvc, os: windows, arch: "386", runner: windows-latest, run: true }
- { target: aarch64-pc-windows-msvc, os: windows, arch: arm64, runner: windows-latest, run: true }
#- { target: wasm32-wasi, os: wasi, arch: wasm, runner: ubuntu-latest, run: false }
runs-on: ${{ matrix.job.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install Cross Compiler
if: matrix.job.target == 'x86_64-unknown-linux-musl'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools gcc-multilib
sudo apt-get install -y clang llvm
case "${{ matrix.job.target }}" in
aarch64-unknown-linux-musleabi)
sudo apt-get install -y qemu-user gcc-aarch64-linux-musl libc6-dev-arm64-cross
;;
arm-unknown-linux-musl)
sudo apt-get install -y qemu-user gcc-arm-linux-musl libc6-dev-arm-cross
;;
x86_64-unknown-linux-musl)
sudo apt-get install -y musl-tools gcc-multilib
;;
i686-unknown-linux-musl)
sudo apt-get install -y musl-tools gcc-multilib libc6-dev-i386
;;
esac
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
with:
Expand All @@ -48,6 +71,7 @@ jobs:
run: |
cargo build --locked --release --target ${{ matrix.job.target }}
- name: Test
if: ${{ matrix.job.run }}
run: |
cargo test --locked --release --target ${{ matrix.job.target }}
- name: Format
Expand Down

0 comments on commit d32f8a5

Please sign in to comment.