Skip to content

Commit

Permalink
update: try rust-cross
Browse files Browse the repository at this point in the history
  • Loading branch information
erikziyunchi committed Jan 18, 2024
1 parent e39a0e9 commit cb6edaf
Showing 1 changed file with 24 additions and 46 deletions.
70 changes: 24 additions & 46 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,52 +71,30 @@ jobs:
- name: Test
run: cargo test --verbose --workspace --all-features

test_linux-non-amd64:
name: rust (linux/${{ matrix.target }})
# needs: test_amd64
test_non-amd64:
name: rust (${{ matrix.platform.os_name }}/${{ matrix.toolchain }})
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
rust: [ "stable" ] # specify the Rust versions you want to test
target: [ "aarch64", "riscv64gc" ]
runs-on: ubuntu-latest
platform:
- os_name: Linux-aarch64
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
- os_name: Linux-riscv64
os: ubuntu-20.04
target: riscv64gc-unknown-linux-gnu
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
toolchain:
- stable
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
# install wasm32-wasi target
- name: Add wasm32-wasi target
run: rustup target add wasm32-wasi
- name: Install QEMU
uses: docker/setup-qemu-action@v3
- name: Test
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target ${{ matrix.target }}-unknown-linux-gnu --verbose --workspace --all-features

test_macos-arm64:
name: rust (macos/arm64)
# needs: test_amd64
strategy:
matrix:
rust: [ "stable" ]
runs-on: flyci-macos-large-latest-m1 # generously provided by www.flyci.net
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
# install wasm32-wasi target
- name: Add wasm32-wasi target
run: rustup target add wasm32-wasi
- name: Test
run: cargo test --verbose --workspace --all-features
- uses: actions/checkout@v4
- name: Tests
uses: houseabsolute/actions-rust-cross@v0 # try rust-cross
with:
command: "test"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--verbose --workspace --all-features"

0 comments on commit cb6edaf

Please sign in to comment.