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 48 - run: cargo check --workspace --release -vv 49 - run: cargo check --workspace --release -vv --features=fs-err,os_pipe # TODO: use --all-features 50 - run: cargo check --workspace --release -vv --target=x86_64-apple-darwin 51 - run: cargo check --workspace --release -vv --target=x86_64-apple-darwin --features=fs-err,os_pipe # TODO: use --all-features 52 53 check-1_48: 54 name: Check 55 runs-on: ${{ matrix.os }} 56 strategy: 57 matrix: 58 build: [1.48] 59 include: 60 - build: 1.48 61 os: ubuntu-latest 62 rust: 1.48 63 64 env: 65 # -D warnings is commented out in our install-rust action; re-add it here. 66 RUSTFLAGS: -D warnings 67 steps: 68 - uses: actions/checkout@v3 69 with: 70 submodules: true 71 - uses: ./.github/actions/install-rust 72 with: 73 toolchain: ${{ matrix.rust }} 74 75 - run: rustup target add x86_64-apple-darwin 76 - run: cargo check --workspace --release -vv 77 - run: cargo check --workspace --release -vv --target=x86_64-apple-darwin 78 79 check-windows: 80 name: Check Windows 81 runs-on: ${{ matrix.os }} 82 strategy: 83 matrix: 84 build: [stable, nightly] 85 include: 86 - build: stable 87 os: windows-latest 88 rust: stable 89 - build: nightly 90 os: windows-latest 91 rust: nightly 92 93 env: 94 # -D warnings is commented out in our install-rust action; re-add it here. 95 RUSTFLAGS: -D warnings 96 steps: 97 - uses: actions/checkout@v3 98 with: 99 submodules: true 100 - uses: ./.github/actions/install-rust 101 with: 102 toolchain: ${{ matrix.rust }} 103 104 - run: cargo check --workspace --release -vv 105 - run: cargo check --workspace --release -vv --features=fs-err,os_pipe # TODO: use --all-features 106 107 check-windows-1_48: 108 name: Check Windows 109 runs-on: ${{ matrix.os }} 110 strategy: 111 matrix: 112 build: [1.48] 113 include: 114 - build: 1.48 115 os: windows-latest 116 rust: 1.48 117 118 env: 119 # -D warnings is commented out in our install-rust action; re-add it here. 120 RUSTFLAGS: -D warnings 121 steps: 122 - uses: actions/checkout@v3 123 with: 124 submodules: true 125 - uses: ./.github/actions/install-rust 126 with: 127 toolchain: ${{ matrix.rust }} 128 129 - run: cargo check --workspace --release -vv 130 131 test: 132 name: Test 133 runs-on: ${{ matrix.os }} 134 strategy: 135 matrix: 136 build: [ubuntu-nightly, windows-nightly, ubuntu-stable, windows-stable] 137 include: 138 - build: ubuntu-nightly 139 os: ubuntu-latest 140 rust: nightly 141 - build: windows-nightly 142 os: windows-latest 143 rust: nightly 144 - build: ubuntu-stable 145 os: ubuntu-latest 146 rust: stable 147 - build: windows-stable 148 os: windows-latest 149 rust: stable 150 151 steps: 152 - uses: actions/checkout@v3 153 with: 154 submodules: true 155 - uses: ./.github/actions/install-rust 156 with: 157 toolchain: ${{ matrix.rust }} 158 - run: cargo test --workspace --features=fs-err,os_pipe # TODO: use --all-features 159 - run: cargo test --workspace --no-default-features 160 161 check_nightly: 162 name: Check on Rust nightly 163 runs-on: ${{ matrix.os }} 164 strategy: 165 matrix: 166 build: [nightly] 167 include: 168 - build: nightly 169 os: ubuntu-latest 170 rust: nightly 171 172 steps: 173 - uses: actions/checkout@v3 174 with: 175 submodules: true 176 - uses: ./.github/actions/install-rust 177 with: 178 toolchain: ${{ matrix.rust }} 179 - run: > 180 rustup target add 181 wasm32-wasi 182 - run: cargo check --workspace --release -vv --target=wasm32-wasi 183