1name: CI 2 3on: 4 push: 5 branches: 6 - main 7 pull_request: 8 9jobs: 10 rustfmt: 11 name: Rustfmt 12 runs-on: ubuntu-latest 13 steps: 14 - uses: actions/checkout@v3 15 with: 16 submodules: true 17 - uses: ./.github/actions/install-rust 18 with: 19 toolchain: stable 20 - run: cargo fmt --all -- --check 21 22 check: 23 name: Check 24 runs-on: ${{ matrix.os }} 25 strategy: 26 matrix: 27 build: [stable, nightly] 28 include: 29 - build: stable 30 os: ubuntu-latest 31 rust: stable 32 - build: nightly 33 os: ubuntu-latest 34 rust: nightly 35 36 env: 37 # -D warnings is commented out in our install-rust action; re-add it here. 38 RUSTFLAGS: -D warnings 39 steps: 40 - uses: actions/checkout@v3 41 with: 42 submodules: true 43 - uses: ./.github/actions/install-rust 44 with: 45 toolchain: ${{ matrix.rust }} 46 47 - run: rustup target add x86_64-apple-darwin wasm32-unknown-unknown 48 - run: cargo check --workspace --release -vv --target=x86_64-apple-darwin 49 - run: cargo check --workspace --release -vv --target=wasm32-unknown-unknown 50 51 check_nightly: 52 name: Check on Rust nightly 53 runs-on: ${{ matrix.os }} 54 strategy: 55 matrix: 56 build: [nightly] 57 include: 58 - build: nightly 59 os: ubuntu-latest 60 rust: nightly 61 62 steps: 63 - uses: actions/checkout@v3 64 with: 65 submodules: true 66 - uses: ./.github/actions/install-rust 67 with: 68 toolchain: ${{ matrix.rust }} 69 - run: > 70 rustup target add 71 wasm32-wasi 72 - run: cargo check --workspace --release -vv --target=wasm32-wasi --all-targets 73 74 test: 75 name: Test 76 runs-on: ${{ matrix.os }} 77 strategy: 78 matrix: 79 build: [ubuntu-nightly, windows-nightly, ubuntu-stable, windows-stable, macos-nightly, macos-stable] 80 include: 81 - build: ubuntu-nightly 82 os: ubuntu-latest 83 rust: nightly 84 - build: windows-nightly 85 os: windows-latest 86 rust: nightly 87 - build: macos-nightly 88 os: macos-latest 89 rust: nightly 90 - build: ubuntu-stable 91 os: ubuntu-latest 92 rust: stable 93 - build: windows-stable 94 os: windows-latest 95 rust: stable 96 - build: macos-stable 97 os: macos-latest 98 rust: stable 99 100 steps: 101 - uses: actions/checkout@v3 102 with: 103 submodules: true 104 - uses: ./.github/actions/install-rust 105 with: 106 toolchain: ${{ matrix.rust }} 107 - run: cargo test --workspace 108