niri
Clone
https://git.tahinli.com/Tahinli/niri.git
0 watching0 forksRustGPL-3.012.1 MiB64a9351Ivan Molodetskikh2 years ago1319 commits
| 1 | name: CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | pull_request: |
| 6 | workflow_dispatch: |
| 7 | schedule: |
| 8 | - cron: '0 0 1 * *' # Monthly |
| 9 | |
| 10 | env: |
| 11 | RUN_SLOW_TESTS: 1 |
| 12 | |
| 13 | jobs: |
| 14 | build: |
| 15 | strategy: |
| 16 | fail-fast: false |
| 17 | |
| 18 | matrix: |
| 19 | configuration: |
| 20 | |
| 21 | include: |
| 22 | - configuration: release |
| 23 | release-flag: '--release' |
| 24 | |
| 25 | name: test - ${{ matrix.configuration }} |
| 26 | runs-on: ubuntu-22.04 |
| 27 | container: ubuntu:23.10 |
| 28 | |
| 29 | steps: |
| 30 | - uses: actions/checkout@v4 |
| 31 | with: |
| 32 | show-progress: false |
| 33 | |
| 34 | - name: Install dependencies |
| 35 | run: | |
| 36 | apt-get update -y |
| 37 | apt-get install -y 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 |
| 38 | |
| 39 | - uses: dtolnay/rust-toolchain@stable |
| 40 | |
| 41 | - uses: Swatinem/rust-cache@v2 |
| 42 | with: |
| 43 | key: ${{ matrix.configuration }} |
| 44 | |
| 45 | - name: Check (no default features) |
| 46 | run: cargo check ${{ matrix.release-flag }} --no-default-features |
| 47 | |
| 48 | - name: Check (just dbus) |
| 49 | run: cargo check ${{ matrix.release-flag }} --no-default-features --features dbus |
| 50 | |
| 51 | - name: Check (just systemd) |
| 52 | run: cargo check ${{ matrix.release-flag }} --no-default-features --features systemd |
| 53 | |
| 54 | - name: Check (just dinit) |
| 55 | run: cargo check ${{ matrix.release-flag }} --no-default-features --features dinit |
| 56 | |
| 57 | - name: Check (just xdp-gnome-screencast) |
| 58 | run: cargo check ${{ matrix.release-flag }} --no-default-features --features xdp-gnome-screencast |
| 59 | |
| 60 | - name: Check |
| 61 | run: cargo check ${{ matrix.release-flag }} |
| 62 | |
| 63 | - name: Build (with profiling) |
| 64 | run: cargo build ${{ matrix.release-flag }} --features profile-with-tracy |
| 65 | |
| 66 | - name: Build Tests |
| 67 | run: cargo test --no-run --all --exclude niri-visual-tests ${{ matrix.release-flag }} |
| 68 | |
| 69 | - name: Test |
| 70 | run: cargo test --all --exclude niri-visual-tests ${{ matrix.release-flag }} -- --nocapture |
| 71 | |
| 72 | visual-tests: |
| 73 | strategy: |
| 74 | fail-fast: false |
| 75 | |
| 76 | name: visual tests |
| 77 | runs-on: ubuntu-22.04 |
| 78 | container: ubuntu:23.10 |
| 79 | |
| 80 | steps: |
| 81 | - uses: actions/checkout@v4 |
| 82 | with: |
| 83 | show-progress: false |
| 84 | |
| 85 | - name: Install dependencies |
| 86 | run: | |
| 87 | apt-get update -y |
| 88 | apt-get install -y 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 libadwaita-1-dev |
| 89 | |
| 90 | - uses: dtolnay/rust-toolchain@stable |
| 91 | |
| 92 | - uses: Swatinem/rust-cache@v2 |
| 93 | |
| 94 | - name: Build |
| 95 | run: cargo build --package niri-visual-tests |
| 96 | |
| 97 | msrv: |
| 98 | strategy: |
| 99 | fail-fast: false |
| 100 | |
| 101 | name: 'msrv - 1.77.0' |
| 102 | runs-on: ubuntu-22.04 |
| 103 | container: ubuntu:23.10 |
| 104 | |
| 105 | steps: |
| 106 | - uses: actions/checkout@v4 |
| 107 | with: |
| 108 | show-progress: false |
| 109 | |
| 110 | - name: Install dependencies |
| 111 | run: | |
| 112 | apt-get update -y |
| 113 | apt-get install -y 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 libadwaita-1-dev |
| 114 | |
| 115 | - uses: dtolnay/rust-toolchain@1.77.0 |
| 116 | |
| 117 | - uses: Swatinem/rust-cache@v2 |
| 118 | |
| 119 | - run: cargo check --all-targets |
| 120 | |
| 121 | clippy: |
| 122 | strategy: |
| 123 | fail-fast: false |
| 124 | |
| 125 | name: clippy |
| 126 | runs-on: ubuntu-22.04 |
| 127 | container: ubuntu:23.10 |
| 128 | |
| 129 | steps: |
| 130 | - uses: actions/checkout@v4 |
| 131 | with: |
| 132 | show-progress: false |
| 133 | |
| 134 | - name: Install dependencies |
| 135 | run: | |
| 136 | apt-get update -y |
| 137 | apt-get install -y 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 libadwaita-1-dev |
| 138 | |
| 139 | - uses: dtolnay/rust-toolchain@stable |
| 140 | with: |
| 141 | components: clippy |
| 142 | |
| 143 | - uses: Swatinem/rust-cache@v2 |
| 144 | |
| 145 | - name: Run clippy |
| 146 | run: cargo clippy --all --all-targets |
| 147 | |
| 148 | rustfmt: |
| 149 | runs-on: ubuntu-22.04 |
| 150 | |
| 151 | steps: |
| 152 | - uses: actions/checkout@v4 |
| 153 | with: |
| 154 | show-progress: false |
| 155 | |
| 156 | - uses: dtolnay/rust-toolchain@nightly |
| 157 | with: |
| 158 | components: rustfmt |
| 159 | |
| 160 | - name: Run rustfmt |
| 161 | run: cargo fmt --all -- --check |
| 162 | |
| 163 | fedora: |
| 164 | runs-on: ubuntu-22.04 |
| 165 | container: fedora:39 |
| 166 | |
| 167 | steps: |
| 168 | - uses: actions/checkout@v4 |
| 169 | with: |
| 170 | show-progress: false |
| 171 | |
| 172 | - name: Install dependencies |
| 173 | run: | |
| 174 | sudo dnf update -y |
| 175 | sudo dnf install -y cargo gcc libudev-devel libgbm-devel libxkbcommon-devel wayland-devel libinput-devel dbus-devel systemd-devel libseat-devel pipewire-devel pango-devel cairo-gobject-devel clang libadwaita-devel |
| 176 | |
| 177 | - uses: Swatinem/rust-cache@v2 |
| 178 | - run: cargo build --all |
| 179 | |
| 180 | nix: |
| 181 | runs-on: ubuntu-22.04 |
| 182 | steps: |
| 183 | - uses: actions/checkout@v4 |
| 184 | with: |
| 185 | show-progress: false |
| 186 | |
| 187 | - name: Check flake inputs |
| 188 | uses: DeterminateSystems/flake-checker-action@v4 |
| 189 | continue-on-error: true |
| 190 | |
| 191 | - name: Install Nix |
| 192 | uses: DeterminateSystems/nix-installer-action@v3 |
| 193 | continue-on-error: true |
| 194 | |
| 195 | - run: nix build |
| 196 | continue-on-error: true |
| 197 | |
| 198 | publish-wiki: |
| 199 | if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 200 | needs: build |
| 201 | permissions: |
| 202 | contents: write |
| 203 | runs-on: ubuntu-22.04 |
| 204 | steps: |
| 205 | - uses: actions/checkout@v4 |
| 206 | with: |
| 207 | lfs: true |
| 208 | show-progress: false |
| 209 | - uses: Andrew-Chen-Wang/github-wiki-action@86138cbd6328b21d759e89ab6e6dd6a139b22270 |