|
| 1 | +# Test a selection of projects which depend on rustix. |
| 2 | + |
| 3 | +name: Test rustix's users |
| 4 | + |
| 5 | +on: workflow_dispatch |
| 6 | + |
| 7 | +jobs: |
| 8 | + async-io: |
| 9 | + name: async-io ported to rustix |
| 10 | + runs-on: ${{ matrix.os }} |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + build: [stable] |
| 14 | + include: |
| 15 | + - build: stable |
| 16 | + os: ubuntu-latest |
| 17 | + rust: stable |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v2 |
| 20 | + with: |
| 21 | + submodules: true |
| 22 | + - uses: ./.github/actions/install-rust |
| 23 | + with: |
| 24 | + toolchain: ${{ matrix.rust }} |
| 25 | + - uses: actions/checkout@v2 |
| 26 | + with: |
| 27 | + repository: sunfishcode/async-io |
| 28 | + path: async-io |
| 29 | + - run: cd async-io && echo '[patch.crates-io]' >> Cargo.toml |
| 30 | + - run: cd async-io && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 31 | + - run: cd async-io && cargo test |
| 32 | + |
| 33 | + cap-std: |
| 34 | + name: cap-std |
| 35 | + runs-on: ${{ matrix.os }} |
| 36 | + strategy: |
| 37 | + matrix: |
| 38 | + build: [stable] |
| 39 | + include: |
| 40 | + - build: stable |
| 41 | + os: ubuntu-latest |
| 42 | + rust: stable |
| 43 | + steps: |
| 44 | + - uses: actions/checkout@v2 |
| 45 | + with: |
| 46 | + submodules: true |
| 47 | + - uses: ./.github/actions/install-rust |
| 48 | + with: |
| 49 | + toolchain: ${{ matrix.rust }} |
| 50 | + - uses: actions/checkout@v2 |
| 51 | + with: |
| 52 | + repository: bytecodealliance/cap-std |
| 53 | + path: cap-std |
| 54 | + - run: cd cap-std && echo '[patch.crates-io]' >> Cargo.toml |
| 55 | + - run: cd cap-std && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 56 | + - run: cd cap-std && cargo test |
| 57 | + |
| 58 | + cargo: |
| 59 | + name: cargo ported to rustix |
| 60 | + runs-on: ${{ matrix.os }} |
| 61 | + strategy: |
| 62 | + matrix: |
| 63 | + build: [stable] |
| 64 | + include: |
| 65 | + - build: stable |
| 66 | + os: ubuntu-latest |
| 67 | + rust: stable |
| 68 | + steps: |
| 69 | + - uses: actions/checkout@v2 |
| 70 | + with: |
| 71 | + submodules: true |
| 72 | + - uses: ./.github/actions/install-rust |
| 73 | + with: |
| 74 | + toolchain: ${{ matrix.rust }} |
| 75 | + - uses: actions/checkout@v2 |
| 76 | + with: |
| 77 | + repository: sunfishcode/cargo |
| 78 | + path: cargo |
| 79 | + ref: rustix |
| 80 | + - run: cd cargo && echo '[patch.crates-io]' >> Cargo.toml |
| 81 | + - run: cd cargo && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 82 | + - run: cd cargo && cargo test --workspace |
| 83 | + # Cargo cross tests require extra build dependencies. |
| 84 | + env: |
| 85 | + CFG_DISABLE_CROSS_TESTS: 1 |
| 86 | + |
| 87 | + memfd-rs: |
| 88 | + name: memfd-rs ported to rustix |
| 89 | + runs-on: ${{ matrix.os }} |
| 90 | + strategy: |
| 91 | + matrix: |
| 92 | + build: [stable] |
| 93 | + include: |
| 94 | + - build: stable |
| 95 | + os: ubuntu-latest |
| 96 | + rust: stable |
| 97 | + steps: |
| 98 | + - uses: actions/checkout@v2 |
| 99 | + with: |
| 100 | + submodules: true |
| 101 | + - uses: ./.github/actions/install-rust |
| 102 | + with: |
| 103 | + toolchain: ${{ matrix.rust }} |
| 104 | + - uses: actions/checkout@v2 |
| 105 | + with: |
| 106 | + repository: sunfishcode/memfd-rs |
| 107 | + path: memfd-rs |
| 108 | + - run: cd memfd-rs && echo '[patch.crates-io]' >> Cargo.toml |
| 109 | + - run: cd memfd-rs && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 110 | + - run: cd memfd-rs && cargo test |
| 111 | + |
| 112 | + tempfile: |
| 113 | + name: tempfile ported to rustix |
| 114 | + runs-on: ${{ matrix.os }} |
| 115 | + strategy: |
| 116 | + matrix: |
| 117 | + build: [stable] |
| 118 | + include: |
| 119 | + - build: stable |
| 120 | + os: ubuntu-latest |
| 121 | + rust: stable |
| 122 | + steps: |
| 123 | + - uses: actions/checkout@v2 |
| 124 | + with: |
| 125 | + submodules: true |
| 126 | + - uses: ./.github/actions/install-rust |
| 127 | + with: |
| 128 | + toolchain: ${{ matrix.rust }} |
| 129 | + - uses: actions/checkout@v2 |
| 130 | + with: |
| 131 | + repository: sunfishcode/tempfile |
| 132 | + path: tempfile |
| 133 | + - run: cd tempfile && echo '[patch.crates-io]' >> Cargo.toml |
| 134 | + - run: cd tempfile && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 135 | + - run: cd tempfile && cargo test |
| 136 | + |
| 137 | + fd-lock: |
| 138 | + name: fd-lock |
| 139 | + runs-on: ${{ matrix.os }} |
| 140 | + strategy: |
| 141 | + matrix: |
| 142 | + build: [stable] |
| 143 | + include: |
| 144 | + - build: stable |
| 145 | + os: ubuntu-latest |
| 146 | + rust: stable |
| 147 | + steps: |
| 148 | + - uses: actions/checkout@v2 |
| 149 | + with: |
| 150 | + submodules: true |
| 151 | + - uses: ./.github/actions/install-rust |
| 152 | + with: |
| 153 | + toolchain: ${{ matrix.rust }} |
| 154 | + - uses: actions/checkout@v2 |
| 155 | + with: |
| 156 | + repository: yoshuawuyts/fd-lock |
| 157 | + path: fd-lock |
| 158 | + # fd-lock currently uses rustix 0.32. |
| 159 | + - run: sed -i 's/^version = "\([[:digit:].-]*\)"$/version = "0.32.0"/' Cargo.toml |
| 160 | + - run: cd fd-lock && echo '[patch.crates-io]' >> Cargo.toml |
| 161 | + - run: cd fd-lock && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 162 | + - run: cd fd-lock && cargo test |
| 163 | + |
| 164 | + wasmtime: |
| 165 | + name: wasmtime |
| 166 | + runs-on: ${{ matrix.os }} |
| 167 | + strategy: |
| 168 | + matrix: |
| 169 | + build: [stable] |
| 170 | + include: |
| 171 | + - build: stable |
| 172 | + os: ubuntu-latest |
| 173 | + rust: stable |
| 174 | + steps: |
| 175 | + - uses: actions/checkout@v2 |
| 176 | + with: |
| 177 | + submodules: true |
| 178 | + - uses: ./.github/actions/install-rust |
| 179 | + with: |
| 180 | + toolchain: ${{ matrix.rust }} |
| 181 | + - uses: actions/checkout@v2 |
| 182 | + with: |
| 183 | + repository: bytecodealliance/wasmtime |
| 184 | + path: wasmtime |
| 185 | + submodules: true |
| 186 | + - run: rustup target add wasm32-wasi |
| 187 | + - run: cd wasmtime && echo '[patch.crates-io]' >> Cargo.toml |
| 188 | + - run: cd wasmtime && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 189 | + - run: cd wasmtime && cargo test |
| 190 | + |
| 191 | + nameless: |
| 192 | + name: nameless |
| 193 | + runs-on: ${{ matrix.os }} |
| 194 | + strategy: |
| 195 | + matrix: |
| 196 | + build: [stable] |
| 197 | + include: |
| 198 | + - build: stable |
| 199 | + os: ubuntu-latest |
| 200 | + rust: stable |
| 201 | + steps: |
| 202 | + - uses: actions/checkout@v2 |
| 203 | + with: |
| 204 | + submodules: true |
| 205 | + - uses: ./.github/actions/install-rust |
| 206 | + with: |
| 207 | + toolchain: ${{ matrix.rust }} |
| 208 | + - uses: actions/checkout@v2 |
| 209 | + with: |
| 210 | + repository: sunfishcode/nameless |
| 211 | + path: nameless |
| 212 | + - run: cd nameless && echo '[patch.crates-io]' >> Cargo.toml |
| 213 | + - run: cd nameless && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 214 | + - run: cd nameless && cargo test |
| 215 | + |
| 216 | + cap-std-ext: |
| 217 | + name: cap-std-ext |
| 218 | + runs-on: ${{ matrix.os }} |
| 219 | + strategy: |
| 220 | + matrix: |
| 221 | + build: [stable] |
| 222 | + include: |
| 223 | + - build: stable |
| 224 | + os: ubuntu-latest |
| 225 | + rust: stable |
| 226 | + steps: |
| 227 | + - uses: actions/checkout@v2 |
| 228 | + with: |
| 229 | + submodules: true |
| 230 | + - uses: ./.github/actions/install-rust |
| 231 | + with: |
| 232 | + toolchain: ${{ matrix.rust }} |
| 233 | + - uses: actions/checkout@v2 |
| 234 | + with: |
| 235 | + repository: cgwalters/cap-std-ext |
| 236 | + path: cap-std-ext |
| 237 | + - run: cd cap-std-ext && echo '[patch.crates-io]' >> Cargo.toml |
| 238 | + - run: cd cap-std-ext && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 239 | + - run: cd cap-std-ext && cargo test |
| 240 | + |
| 241 | + ostree-ext: |
| 242 | + name: ostree-ext |
| 243 | + runs-on: ${{ matrix.os }} |
| 244 | + strategy: |
| 245 | + matrix: |
| 246 | + build: [stable] |
| 247 | + include: |
| 248 | + - build: stable |
| 249 | + os: ubuntu-latest |
| 250 | + rust: stable |
| 251 | + steps: |
| 252 | + - uses: actions/checkout@v2 |
| 253 | + with: |
| 254 | + submodules: true |
| 255 | + - uses: ./.github/actions/install-rust |
| 256 | + with: |
| 257 | + toolchain: ${{ matrix.rust }} |
| 258 | + - uses: actions/checkout@v2 |
| 259 | + with: |
| 260 | + repository: ostreedev/ostree-ext |
| 261 | + path: ostree-ext |
| 262 | + - run: cd ostree-ext && echo '[patch.crates-io]' >> Cargo.toml |
| 263 | + - run: cd ostree-ext && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 264 | + - run: cd ostree-ext && cargo test |
| 265 | + |
| 266 | + dbus-rs: |
| 267 | + name: dbus-rs ported to rustix |
| 268 | + runs-on: ${{ matrix.os }} |
| 269 | + strategy: |
| 270 | + matrix: |
| 271 | + build: [stable] |
| 272 | + include: |
| 273 | + - build: stable |
| 274 | + os: ubuntu-latest |
| 275 | + rust: stable |
| 276 | + steps: |
| 277 | + - uses: actions/checkout@v2 |
| 278 | + with: |
| 279 | + submodules: true |
| 280 | + - uses: ./.github/actions/install-rust |
| 281 | + with: |
| 282 | + toolchain: ${{ matrix.rust }} |
| 283 | + - uses: actions/checkout@v2 |
| 284 | + with: |
| 285 | + repository: sunfishcode/dbus-rs |
| 286 | + path: dbus-rs |
| 287 | + - run: sudo apt-get update |
| 288 | + - run: sudo apt-get install -y libdbus-1-dev |
| 289 | + - run: cd dbus-rs && echo '[patch.crates-io]' >> Cargo.toml |
| 290 | + - run: cd dbus-rs && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 291 | + - run: cd dbus-rs && cargo test |
| 292 | + |
| 293 | + mustang: |
| 294 | + name: mustang |
| 295 | + runs-on: ${{ matrix.os }} |
| 296 | + strategy: |
| 297 | + matrix: |
| 298 | + build: [nightly] |
| 299 | + include: |
| 300 | + - build: nightly |
| 301 | + os: ubuntu-latest |
| 302 | + rust: nightly |
| 303 | + steps: |
| 304 | + - uses: actions/checkout@v2 |
| 305 | + with: |
| 306 | + submodules: true |
| 307 | + - uses: ./.github/actions/install-rust |
| 308 | + with: |
| 309 | + toolchain: ${{ matrix.rust }} |
| 310 | + - uses: actions/checkout@v2 |
| 311 | + with: |
| 312 | + repository: sunfishcode/mustang |
| 313 | + path: mustang |
| 314 | + - run: rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu |
| 315 | + - run: cd mustang && echo '[patch.crates-io]' >> Cargo.toml |
| 316 | + - run: cd mustang && echo 'rustix = { path = ".." }' >> Cargo.toml |
| 317 | + - run: cd mustang && sed -i 's/fn concurrent_recursive_mkdir()/#[ignore]\rfn concurrent_recursive_mkdir()/' tests/fs.rs |
| 318 | + # Use jobs=1 to hopefully avoid apparently oversubscribing the runner. |
| 319 | + - run: cd mustang && cargo test --target=specs/x86_64-mustang-linux-gnu.json -Zbuild-std --jobs=1 |
| 320 | + |
| 321 | + std: |
| 322 | + name: std ported to rustix |
| 323 | + runs-on: ${{ matrix.os }} |
| 324 | + strategy: |
| 325 | + matrix: |
| 326 | + build: [nightly] |
| 327 | + include: |
| 328 | + - build: nightly |
| 329 | + os: ubuntu-latest |
| 330 | + rust: nightly |
| 331 | + steps: |
| 332 | + - uses: actions/checkout@v2 |
| 333 | + with: |
| 334 | + submodules: true |
| 335 | + - uses: ./.github/actions/install-rust |
| 336 | + with: |
| 337 | + toolchain: ${{ matrix.rust }} |
| 338 | + - uses: actions/checkout@v2 |
| 339 | + with: |
| 340 | + repository: sunfishcode/rust |
| 341 | + path: rust |
| 342 | + ref: rustix |
| 343 | + - run: cd rust && sed -i 's/\<git = "https:\/\/github\.com\/bytecodealliance\/rustix", branch = "rustc-dep-of-std"/path = "..\/..\/.."/' library/std/Cargo.toml |
| 344 | + - run: cd rust && ./x.py test library/std --stage=0 |
| 345 | + # See <https://github.com/bytecodealliance/rustix/issues/76#issuecomment-962196433> |
| 346 | + env: |
| 347 | + RUSTFLAGS: --cfg=linux_raw --cfg=asm --cfg=rustc_attrs |
0 commit comments