2929 os : ubuntu-latest
3030 steps :
3131 - uses : actions/checkout@main
32- - uses : dtolnay/rust-toolchain@stable
32+ - uses : ./.github/actions/setup-deps
3333 with :
3434 target : ${{ matrix.target }}
35- - name : Install GCC (i686-unknown-linux-gnu)
36- if : ${{ matrix.target == 'i686-unknown-linux-gnu' }}
37- run : |
38- sudo apt-get update -y
39- sudo apt-get install -y --no-install-recommends gcc-multilib g++-multilib
40- shell : bash
41- - name : Install GCC (aarch64-unknown-linux-gnu)
42- if : ${{ matrix.target == 'aarch64-unknown-linux-gnu' }}
43- run : |
44- sudo apt-get update -y
45- sudo apt-get install -y --no-install-recommends gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libc6-dev-arm64-cross
46- shell : bash
47- - name : Install emscripten (wasm32-unknown-emscripten)
48- if : ${{ matrix.target == 'wasm32-unknown-emscripten' }}
49- run : |
50- sudo apt-get update -y
51- sudo apt-get install -y --no-install-recommends emscripten
52- shell : bash
5335 - name : Build
5436 run : |
5537 cargo build --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }}
@@ -61,42 +43,23 @@ jobs:
6143 needs : build
6244 strategy :
6345 matrix :
64- os : [ubuntu-latest, macos-latest, windows-latest]
6546 include :
6647 - os : ubuntu-latest
6748 target : x86_64-unknown-linux-gnu
6849 - os : macos-latest
6950 target : aarch64-apple-darwin
7051 - os : windows-latest
7152 target : x86_64-pc-windows-msvc
53+ - os : ubuntu-latest
54+ target : wasm32-unknown-emscripten
7255 steps :
7356 - uses : actions/checkout@main
74- - uses : dtolnay/rust-toolchain@stable
57+ - uses : ./.github/actions/setup-deps
7558 with :
7659 target : ${{ matrix.target }}
7760 - name : Run tests
7861 run : |
79- cargo test --manifest-path testcrate/Cargo.toml
80- shell : bash
81-
82- test_emscripten :
83- name : Test emscripten
84- runs-on : ubuntu-latest
85- needs : build
86- steps :
87- - uses : actions/checkout@main
88- - uses : dtolnay/rust-toolchain@stable
89- with :
90- target : wasm32-unknown-emscripten
91- - name : Install emscripten
92- run : |
93- sudo apt-get update -y
94- sudo apt-get install -y --no-install-recommends emscripten
95- shell : bash
96- - name : Run emscripten tests
97- run : |
98- export CARGO_TARGET_WASM32_UNKNOWN_EMSCRIPTEN_RUNNER=node
99- cargo test --manifest-path testcrate/Cargo.toml
62+ cargo test --manifest-path testcrate/Cargo.toml --target ${{ matrix.target }}
10063 shell : bash
10164
10265 rustfmt :
0 commit comments