Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CI: Update Linux cross compile tests (v0.12.x) #334

Merged
merged 2 commits into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 13 additions & 21 deletions .github/workflows/LinuxCrossCompileTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
linux-cross:
runs-on: ubuntu-latest
strategy:
# Continue running other jobs in the matrix even if one fails.
fail-fast: false
matrix:
platform:
- target: aarch64-unknown-linux-musl
Expand All @@ -36,15 +38,18 @@ jobs:

steps:
- name: Checkout Moka
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
target: ${{ matrix.platform.target }}
override: true
targets: ${{ matrix.platform.target }}

- name: Install cross
uses: taiki-e/install-action@v2
with:
tool: cross

- name: Remove integration tests and force enable rustc_version crate
run: |
Expand All @@ -54,25 +59,12 @@ jobs:
sed -i 's/build = "build.rs"/build = ".ci_extras\/build_linux_cross.rs"/' Cargo.toml
cat Cargo.toml

- uses: Swatinem/rust-cache@v1

- name: cargo clean
uses: actions-rs/cargo@v1
with:
command: clean
- run: cargo clean

- name: Run tests (sync feature)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --release --features sync --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
run: cross test --release -F sync --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
env:
RUSTFLAGS: '--cfg rustver'

- name: Run tests (future feature)
uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --release --features future --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}
run: cross test --release -F future --target ${{ matrix.platform.target }} ${{ matrix.platform.cargo-opts }}