-
Notifications
You must be signed in to change notification settings - Fork 42
56 lines (45 loc) · 1.8 KB
/
Copy pathci.yml
File metadata and controls
56 lines (45 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
on: [push, pull_request]
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
name: CI
jobs:
run-ci:
name: Run CI
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: "ubuntu-22.04"
run_lints: true
test_wasm_build: true
- os: windows-latest
docker_tests_flags: "--no-default-features"
- os: macos-latest
docker_tests_flags: "--no-default-features"
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
# selecting a toolchain either by action or manual `rustup` happen
# before cache setup
- run: rustup toolchain install stable --profile minimal
- name: Set up rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Run lints
if: matrix.run_lints
run: |
cargo clippy --workspace --no-default-features
cargo clippy --workspace --all-features
- name: Run tests
run: cargo test --workspace --exclude wasm-pkg-client --exclude wkg
# NOTE: Docker tests are only run on linux because other platforms haven't
# always worked consistently.
- name: Run wasm-pkg-client tests
run: cargo test -p wasm-pkg-client ${{ matrix.docker_tests_flags }}
- name: Run wkg tests
run: cargo test -p wkg ${{ matrix.docker_tests_flags }}
- name: Test wasm32-wasip1 build for wasm-pkg-common
if: matrix.test_wasm_build
run: cargo build -p wasm-pkg-common --target wasm32-wasip1