ci: follow the submodule pins in the nix flake inputs
The flake pinned jian/casement as fixed github revs while the repo advances the same code as submodules, so every submodule bump that forgot the flake broke the whole workflow — most recently op-pen-loader failing to compile against a jian without the widget-style fields. The workflow now derives --override-input values from the checked-out submodule HEADs (with --no-write-lock-file), so it follows the gitlinks by construction, and the flake.nix default revs are refreshed to the current pins for local use.
This commit is contained in:
parent
c4a2d5e0d7
commit
ba2f55d4b5
32
.github/workflows/nix-check.yml
vendored
32
.github/workflows/nix-check.yml
vendored
|
|
@ -43,11 +43,29 @@ jobs:
|
|||
- name: Enable Nix cache
|
||||
uses: DeterminateSystems/magic-nix-cache-action@908b263ff629f4cc17666315b7fd3ec127c6244d # v14
|
||||
|
||||
# The flake pins its vendor inputs as github revs while the repository
|
||||
# pins the same code as submodules; the two drift the moment a submodule
|
||||
# bump forgets the flake (this broke the whole workflow when jian gained
|
||||
# the widget-style fields). Deriving the overrides from the checked-out
|
||||
# submodule HEADs makes the workflow follow the gitlinks by construction.
|
||||
- name: Derive flake input overrides from the submodule pins
|
||||
run: |
|
||||
{
|
||||
printf 'NIX_VENDOR_OVERRIDES=--no-write-lock-file'
|
||||
printf ' --override-input jian github:ZSeven-W/jian/%s' \
|
||||
"$(git -C vendor/jian rev-parse HEAD)"
|
||||
printf ' --override-input casement github:ZSeven-W/casement/%s' \
|
||||
"$(git -C vendor/casement rev-parse HEAD)"
|
||||
printf ' --override-input agent github:ZSeven-W/agent-rs/%s' \
|
||||
"$(git -C vendor/agent rev-parse HEAD)"
|
||||
printf '\n'
|
||||
} >> "$GITHUB_ENV"
|
||||
|
||||
- name: Evaluate flake checks
|
||||
run: nix flake check --no-build --show-trace
|
||||
run: nix flake check --no-build --show-trace $NIX_VENDOR_OVERRIDES
|
||||
|
||||
- name: Build prebuilt packages
|
||||
run: nix build .#prebuilt .#prebuilt-cli --no-link
|
||||
run: nix build .#prebuilt .#prebuilt-cli --no-link $NIX_VENDOR_OVERRIDES
|
||||
|
||||
- name: Build representative source outputs
|
||||
run: |
|
||||
|
|
@ -58,10 +76,10 @@ jobs:
|
|||
.#web-sdk-wasm \
|
||||
.#web-sdk-packages \
|
||||
.#appimage \
|
||||
--no-link
|
||||
--no-link $NIX_VENDOR_OVERRIDES
|
||||
|
||||
- name: Verify generated integration sidecar
|
||||
run: nix build .#checks.x86_64-linux.integration-sidecar --no-link
|
||||
run: nix build .#checks.x86_64-linux.integration-sidecar --no-link $NIX_VENDOR_OVERRIDES
|
||||
|
||||
- name: Install headless display server
|
||||
run: |
|
||||
|
|
@ -71,7 +89,7 @@ jobs:
|
|||
|
||||
- name: Smoke-test prebuilt CLI
|
||||
run: |
|
||||
output="$(nix run .#prebuilt-cli -- --version)"
|
||||
output="$(nix run .#prebuilt-cli $NIX_VENDOR_OVERRIDES -- --version)"
|
||||
printf '%s\n' "$output"
|
||||
printf '%s\n' "$output" | grep -Eq '^\{"version":"[0-9]+\.[0-9]+\.[0-9]+"\}$'
|
||||
|
||||
|
|
@ -82,7 +100,7 @@ jobs:
|
|||
LIBGL_ALWAYS_SOFTWARE=1 \
|
||||
MESA_LOADER_DRIVER_OVERRIDE=llvmpipe \
|
||||
GALLIUM_DRIVER=llvmpipe \
|
||||
timeout 20s xvfb-run -a -s "-screen 0 1280x720x24" nix run .#prebuilt \
|
||||
timeout 20s xvfb-run -a -s "-screen 0 1280x720x24" nix run .#prebuilt $NIX_VENDOR_OVERRIDES \
|
||||
>/tmp/openpencil-desktop.log 2>&1
|
||||
status=$?
|
||||
set -e
|
||||
|
|
@ -100,4 +118,4 @@ jobs:
|
|||
fi
|
||||
|
||||
- name: Run the clean NixOS runtime test
|
||||
run: nix build .#checks.x86_64-linux.prebuilt-runtime --no-link
|
||||
run: nix build .#checks.x86_64-linux.prebuilt-runtime --no-link $NIX_VENDOR_OVERRIDES
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@
|
|||
flake = false;
|
||||
};
|
||||
casement = {
|
||||
url = "github:ZSeven-W/casement/451173eb3353a4166d2d0f241f2e0606051064bd";
|
||||
url = "github:ZSeven-W/casement/ffdd672cbda3abe5cd78d056fb75683f2a74f7fe";
|
||||
flake = false;
|
||||
};
|
||||
jian = {
|
||||
url = "github:ZSeven-W/jian/df2376a018acbd8ec8d9fac58b05dde14a405aca";
|
||||
url = "github:ZSeven-W/jian/453bd70b646417e58f0d5c9a51594e27d399d849";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue