CI: Move feature combinations off the docs critical path
Browse files at this commit1013147ba3154788cb16ffc32b8155fd2008dfa3Parent: 38f38851 changed file +38 -25
- .github/workflows/ci.yml +38 -25
.github/workflows/ci.ymlmodified+38 -25
| @@ -8,25 +8,44 @@ on: | |||
| 8 | - cron: '0 0 1 * *' # Monthly | 8 | - cron: '0 0 1 * *' # Monthly |
| 9 | 9 | ||
| 10 | env: | 10 | env: |
| 11 | - RUN_SLOW_TESTS: 1 | ||
| 12 | DEPS_APT: curl gcc clang libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libpipewire-0.3-dev libpango1.0-dev libdisplay-info-dev | 11 | DEPS_APT: curl gcc clang libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev libpipewire-0.3-dev libpango1.0-dev libdisplay-info-dev |
| 13 | DEPS_DNF: cargo gcc clang libudev-devel libgbm-devel libxkbcommon-devel wayland-devel libinput-devel dbus-devel systemd-devel libseat-devel pipewire-devel pango-devel cairo-gobject-devel libdisplay-info-devel | 12 | DEPS_DNF: cargo gcc clang libudev-devel libgbm-devel libxkbcommon-devel wayland-devel libinput-devel dbus-devel systemd-devel libseat-devel pipewire-devel pango-devel cairo-gobject-devel libdisplay-info-devel |
| 14 | DEPS_APK: cargo clang-libclang eudev-dev glib-dev libdisplay-info-dev libinput-dev libseat-dev libxkbcommon-dev mesa-dev pango-dev pipewire-dev tar | 13 | DEPS_APK: cargo clang-libclang eudev-dev glib-dev libdisplay-info-dev libinput-dev libseat-dev libxkbcommon-dev mesa-dev pango-dev pipewire-dev tar |
| 15 | DEPS_PKG: git curl rust llvm pkgconf pixman libudev-devd libdisplay-info seatd libinput libxkbcommon pipewire mesa-libs cairo devel/glib20 gettext-runtime harfbuzz pango | 14 | DEPS_PKG: git curl rust llvm pkgconf pixman libudev-devd libdisplay-info seatd libinput libxkbcommon pipewire mesa-libs cairo devel/glib20 gettext-runtime harfbuzz pango |
| 16 | 15 | ||
| 17 | jobs: | 16 | jobs: |
| 18 | - build: | 17 | + test: |
| 19 | strategy: | 18 | strategy: |
| 20 | fail-fast: false | 19 | fail-fast: false |
| 21 | 20 | ||
| 22 | - matrix: | 21 | + name: test |
| 23 | - configuration: [debug, release] | 22 | + runs-on: ubuntu-24.04 |
| 23 | + | ||
| 24 | + steps: | ||
| 25 | + - uses: actions/checkout@v4 | ||
| 26 | + with: | ||
| 27 | + show-progress: false | ||
| 28 | + | ||
| 29 | + - name: Install dependencies | ||
| 30 | + run: | | ||
| 31 | + sudo apt-get update -y | ||
| 32 | + sudo apt-get install -y ${{ env.DEPS_APT }} | ||
| 33 | + | ||
| 34 | + - uses: dtolnay/rust-toolchain@stable | ||
| 35 | + | ||
| 36 | + - uses: Swatinem/rust-cache@v2 | ||
| 37 | + | ||
| 38 | + - name: Build tests | ||
| 39 | + run: cargo test --no-run --all --exclude niri-visual-tests | ||
| 24 | 40 | ||
| 25 | - include: | 41 | + - name: Test |
| 26 | - - configuration: release | 42 | + run: cargo test --all --exclude niri-visual-tests -- --nocapture |
| 27 | - release-flag: '--release' | 43 | + |
| 44 | + build: | ||
| 45 | + strategy: | ||
| 46 | + fail-fast: false | ||
| 28 | 47 | ||
| 29 | - name: test - ${{ matrix.configuration }} | 48 | + name: check feature combinations |
| 30 | runs-on: ubuntu-24.04 | 49 | runs-on: ubuntu-24.04 |
| 31 | 50 | ||
| 32 | steps: | 51 | steps: |
| @@ -42,35 +61,27 @@ jobs: | |||
| 42 | - uses: dtolnay/rust-toolchain@stable | 61 | - uses: dtolnay/rust-toolchain@stable |
| 43 | 62 | ||
| 44 | - uses: Swatinem/rust-cache@v2 | 63 | - uses: Swatinem/rust-cache@v2 |
| 45 | - with: | ||
| 46 | - key: ${{ matrix.configuration }} | ||
| 47 | 64 | ||
| 48 | - name: Check (no default features) | 65 | - name: Check (no default features) |
| 49 | - run: cargo check ${{ matrix.release-flag }} --no-default-features | 66 | + run: cargo check --no-default-features |
| 50 | 67 | ||
| 51 | - name: Check (just dbus) | 68 | - name: Check (just dbus) |
| 52 | - run: cargo check ${{ matrix.release-flag }} --no-default-features --features dbus | 69 | + run: cargo check --no-default-features --features dbus |
| 53 | 70 | ||
| 54 | - name: Check (just systemd) | 71 | - name: Check (just systemd) |
| 55 | - run: cargo check ${{ matrix.release-flag }} --no-default-features --features systemd | 72 | + run: cargo check --no-default-features --features systemd |
| 56 | 73 | ||
| 57 | - name: Check (just dinit) | 74 | - name: Check (just dinit) |
| 58 | - run: cargo check ${{ matrix.release-flag }} --no-default-features --features dinit | 75 | + run: cargo check --no-default-features --features dinit |
| 59 | 76 | ||
| 60 | - name: Check (just xdp-gnome-screencast) | 77 | - name: Check (just xdp-gnome-screencast) |
| 61 | - run: cargo check ${{ matrix.release-flag }} --no-default-features --features xdp-gnome-screencast | 78 | + run: cargo check --no-default-features --features xdp-gnome-screencast |
| 62 | 79 | ||
| 63 | - name: Check | 80 | - name: Check |
| 64 | - run: cargo check ${{ matrix.release-flag }} | 81 | + run: cargo check |
| 65 | 82 | ||
| 66 | - name: Build (with profiling) | 83 | - name: Build (with profiling) |
| 67 | - run: cargo build ${{ matrix.release-flag }} --features profile-with-tracy | 84 | + run: cargo build --features profile-with-tracy |
| 68 | - | ||
| 69 | - - name: Build tests | ||
| 70 | - run: cargo test --no-run --all --exclude niri-visual-tests ${{ matrix.release-flag }} | ||
| 71 | - | ||
| 72 | - - name: Test | ||
| 73 | - run: cargo test --all --exclude niri-visual-tests ${{ matrix.release-flag }} -- --nocapture | ||
| 74 | 85 | ||
| 75 | build-musl: | 86 | build-musl: |
| 76 | strategy: | 87 | strategy: |
| @@ -93,15 +104,17 @@ jobs: | |||
| 93 | run: cargo build --no-default-features --features dbus,xdp-gnome-screencast | 104 | run: cargo build --no-default-features --features dbus,xdp-gnome-screencast |
| 94 | 105 | ||
| 95 | # Job that runs randomized tests for a longer period of time. | 106 | # Job that runs randomized tests for a longer period of time. |
| 107 | + # Also runs normal slow tests. | ||
| 96 | randomized-tests: | 108 | randomized-tests: |
| 97 | strategy: | 109 | strategy: |
| 98 | fail-fast: false | 110 | fail-fast: false |
| 99 | 111 | ||
| 100 | - name: randomized tests | 112 | + name: randomized and slow tests |
| 101 | runs-on: ubuntu-24.04 | 113 | runs-on: ubuntu-24.04 |
| 102 | 114 | ||
| 103 | env: | 115 | env: |
| 104 | RUST_BACKTRACE: 1 | 116 | RUST_BACKTRACE: 1 |
| 117 | + RUN_SLOW_TESTS: 1 | ||
| 105 | PROPTEST_CASES: 200000 | 118 | PROPTEST_CASES: 200000 |
| 106 | PROPTEST_MAX_LOCAL_REJECTS: 200000 | 119 | PROPTEST_MAX_LOCAL_REJECTS: 200000 |
| 107 | PROPTEST_MAX_GLOBAL_REJECTS: 200000 | 120 | PROPTEST_MAX_GLOBAL_REJECTS: 200000 |
| @@ -311,7 +324,7 @@ jobs: | |||
| 311 | publish-docs: | 324 | publish-docs: |
| 312 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' | 325 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 313 | needs: | 326 | needs: |
| 314 | - - build | 327 | + - test |
| 315 | permissions: | 328 | permissions: |
| 316 | contents: write | 329 | contents: write |
| 317 | runs-on: ubuntu-24.04 | 330 | runs-on: ubuntu-24.04 |