mirror of
https://github.com/devmobasa/wayscriber.git
synced 2026-11-01 07:36:42 +01:00
147 lines
4.3 KiB
YAML
147 lines
4.3 KiB
YAML
name: Checks
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
name: Rust lint and test
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up repository tool SDK
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
global-json-file: global.json
|
|
|
|
- name: Cache repository tool packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.nuget/packages
|
|
key: ${{ runner.os }}-nuget-${{ hashFiles('global.json', 'tools/**/*.cs') }}
|
|
|
|
- name: Build repository tool once
|
|
run: dotnet build tools/wayscriber.cs
|
|
|
|
- name: Build one-command C# installer
|
|
run: dotnet build tools/install.cs --disable-build-servers
|
|
|
|
- name: Build repository tool tests once
|
|
run: dotnet build tools/wayscriber.tests.cs
|
|
|
|
- name: Install system dependencies
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci install-dependencies checks
|
|
|
|
- name: Build gtk4-layer-shell
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci prepare-gtk4-layer-shell --library-mode both
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@1.98.1
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo builds
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: |
|
|
.
|
|
|
|
- name: Check dynamic gtk4-layer-shell linkage
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci build-linkage dynamic
|
|
|
|
- name: Run canonical workspace and standalone release validation
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci lint-and-test
|
|
|
|
- name: Check static gtk4-layer-shell linkage
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci build-linkage static
|
|
|
|
- name: Record code health
|
|
if: always()
|
|
continue-on-error: true
|
|
run: dotnet run tools/wayscriber.cs --no-build -- report code-health --output code-health-report.txt --github-summary
|
|
|
|
- name: Upload code-health report
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: wayscriber-code-health
|
|
path: code-health-report.txt
|
|
if-no-files-found: warn
|
|
|
|
gtk-widgets:
|
|
name: Required GTK widget contracts
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up repository tool SDK
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
global-json-file: global.json
|
|
|
|
- name: Cache repository tool packages
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.nuget/packages
|
|
key: ${{ runner.os }}-nuget-${{ hashFiles('global.json', 'tools/**/*.cs') }}
|
|
|
|
- name: Build repository tools once
|
|
run: dotnet build tools/wayscriber.cs
|
|
|
|
- name: Install system dependencies
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci install-dependencies widgets
|
|
|
|
- name: Build gtk4-layer-shell
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci prepare-gtk4-layer-shell --library-mode both
|
|
|
|
- name: Set up Rust
|
|
uses: dtolnay/rust-toolchain@1.98.1
|
|
with:
|
|
components: clippy, rustfmt
|
|
|
|
- name: Cache cargo builds
|
|
uses: Swatinem/rust-cache@v2
|
|
with:
|
|
workspaces: |
|
|
.
|
|
|
|
- name: Exercise widgets on an isolated display
|
|
run: dotnet run tools/wayscriber.cs --no-build -- ci gtk-widgets
|
|
|
|
nix-flake:
|
|
name: Nix flake
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up repository tool SDK
|
|
uses: actions/setup-dotnet@v4
|
|
with:
|
|
global-json-file: global.json
|
|
|
|
- name: Build repository tools once
|
|
run: dotnet build tools/wayscriber.cs
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v31
|
|
with:
|
|
github_access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
|
|
- name: Check flake package versions
|
|
run: dotnet run tools/wayscriber.cs --no-build -- check nix-versions
|
|
|
|
- name: Check flake package and development shell instantiation
|
|
run: dotnet run tools/wayscriber.cs --no-build -- check nix-instantiation
|