Skip to content

Commit

Permalink
CI: Stop using actions-rs GH actions in Linux cross compile tests
Browse files Browse the repository at this point in the history
Update Linux cross compile tests:

- Stop using `actions-rs/toolchain` and `actions-rs/cargo`.
- Start to use `dtolnay/rust-toolchain` and `taiki-e/install-action`.
- Upgrade `actions/checkout` from v2 to v4.
  • Loading branch information
tatsuya6502 committed Oct 14, 2023
1 parent 5c9dea6 commit a5dee1c
Showing 1 changed file with 11 additions and 21 deletions.
32 changes: 11 additions & 21 deletions .github/workflows/LinuxCrossCompileTest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,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 +57,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 }}

0 comments on commit a5dee1c

Please sign in to comment.