Skip to content

Commit 4b6aedc

Browse files
authored
ci: use container image to simplify test workflow (#69)
1 parent bfc5503 commit 4b6aedc

1 file changed

Lines changed: 6 additions & 27 deletions

File tree

.github/workflows/test.yml

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,47 +26,26 @@ jobs:
2626
- arch: x86_64
2727
target: x86_64-unknown-none
2828
runs-on: ubuntu-latest
29+
container:
30+
image: ghcr.io/${{ github.repository }}-container:latest
31+
credentials:
32+
username: ${{ github.actor }}
33+
password: ${{ secrets.GITHUB_TOKEN }}
2934
steps:
3035
- uses: actions/checkout@v6
31-
32-
- &setup-libudenv
33-
uses: awalsh128/cache-apt-pkgs-action@latest
3436
with:
35-
packages: libudev-dev
36-
version: 1.0
37+
persist-credentials: false
3738

38-
- name: Install toolchain
39-
run: rustup show
4039
- name: Check rust version
4140
run: rustc --version --verbose
4241

43-
- name: Setup QEMU
44-
uses: arceos-org/setup-qemu@v1
45-
with:
46-
version: 10.1.0
47-
arch_list: x86_64,aarch64,riscv64,loongarch64
48-
4942
- uses: Swatinem/rust-cache@v2.9.1
5043
with:
5144
shared-key: test
5245
key: ${{ matrix.target }}
5346
cache-targets: true
5447
save-if: ${{ github.ref == 'refs/heads/main' }}
5548

56-
- uses: cargo-bins/cargo-binstall@main
57-
58-
- name: Install ostool
59-
run: cargo binstall ostool --no-confirm --force
60-
61-
- name: Install cargo-binutils
62-
run: |
63-
cargo-binstall \
64-
--pkg-url="{ repo }/releases/download/v{ version }/{ target }.tar.gz" \
65-
--pkg-fmt="tgz" \
66-
cargo-binutils --no-confirm --force
67-
68-
- name: Add Target
69-
run: rustc --version
7049
- name: Check code format
7150
run: cargo fmt --all -- --check
7251

0 commit comments

Comments
 (0)