Skip to content

Commit

Permalink
chore(ci): update rust workflow to run on various architectures
Browse files Browse the repository at this point in the history
  • Loading branch information
iahmadgad committed Oct 25, 2024
1 parent b39722b commit 692168f
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,37 @@ env:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
target:
- aarch64-linux-android # 64-bit ARM
- armv7-linux-androideabi # 32-bit ARM
- i686-linux-android # 32-bit x86
- x86_64-linux-android # 64-bit x86
- arm-linux-androideabi # 32-bit ARM (older ABI)
- thumbv7neon-linux-androideabi # 32-bit ARM with NEON

name: ${{ matrix.target }}

steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Checkout repository
uses: actions/checkout@v3

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- name: Install cross
shell: bash
run: cargo install cross --git https://github.com/cross-rs/cross

- name: Build - ${{ matrix.target }}
shell: bash
run: cross build --target=${{ matrix.target }} --verbose

- name: Test - ${{ matrix.target }}
shell: bash
run: cross test --target=${{ matrix.target }} --verbose

0 comments on commit 692168f

Please sign in to comment.