openpencil/.github/workflows/nix-check.yml
Kayshen-X 6a780c7425 fix(web): pre-open the sign-in popup in the click gesture and use popup wording
Opening the verification page from the async poll callback was popup-
blocked (the 'click sign-in twice' bug); a placeholder window opened
synchronously inside the press is navigated once the URL arrives, and
closed on cancel/failure. The wasm login modal now says 'popup window'
instead of 'your browser' — the web editor already runs in one.
2026-07-25 23:51:27 +08:00

104 lines
3.1 KiB
YAML

name: Nix flake checks
on:
pull_request:
paths:
- "Cargo.toml"
- "Cargo.lock"
- "flake.nix"
- "flake.lock"
- "nix/release-manifest.json"
- "nix/integration/**"
- "crates/op-host-desktop/assets/icon.png"
- ".github/workflows/nix-check.yml"
push:
branches: ["**"]
paths:
- "Cargo.toml"
- "Cargo.lock"
- "flake.nix"
- "flake.lock"
- "nix/release-manifest.json"
- "nix/integration/**"
- "crates/op-host-desktop/assets/icon.png"
- ".github/workflows/nix-check.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
flake:
name: Build and smoke-test prebuilt outputs
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@ef8a148080ab6020fd15196c2084a2eea5ff2d25 # v22
- name: Enable Nix cache
uses: DeterminateSystems/magic-nix-cache-action@908b263ff629f4cc17666315b7fd3ec127c6244d # v14
- name: Evaluate flake checks
run: nix flake check --no-build --show-trace
- name: Build prebuilt packages
run: nix build .#prebuilt .#prebuilt-cli --no-link
- name: Build representative source outputs
run: |
nix build \
.#op-cli \
.#web-server \
.#web-bundle \
.#web-sdk-wasm \
.#web-sdk-packages \
.#appimage \
--no-link
- name: Verify generated integration sidecar
run: nix build .#checks.x86_64-linux.integration-sidecar --no-link
- name: Install headless display server
run: |
sudo apt-get update
sudo apt-get install --yes \
libegl1 libgles2 libgl1-mesa-dri libgbm1 mesa-utils xvfb
- name: Smoke-test prebuilt CLI
run: |
output="$(nix run .#prebuilt-cli -- --version)"
printf '%s\n' "$output"
printf '%s\n' "$output" | grep -Eq '^\{"version":"[0-9]+\.[0-9]+\.[0-9]+"\}$'
- name: Smoke-test prebuilt desktop
shell: bash
run: |
set +e
LIBGL_ALWAYS_SOFTWARE=1 \
MESA_LOADER_DRIVER_OVERRIDE=llvmpipe \
GALLIUM_DRIVER=llvmpipe \
timeout 20s xvfb-run -a -s "-screen 0 1280x720x24" nix run .#prebuilt \
>/tmp/openpencil-desktop.log 2>&1
status=$?
set -e
# A GUI process is expected to remain alive until timeout. Any other
# non-zero status means startup failed before the process was usable.
if [[ "$status" -ne 0 && "$status" -ne 124 ]]; then
cat /tmp/openpencil-desktop.log
exit "$status"
fi
if grep -Eq 'error while loading|cannot open shared object' \
/tmp/openpencil-desktop.log; then
cat /tmp/openpencil-desktop.log
exit 1
fi
- name: Run the clean NixOS runtime test
run: nix build .#checks.x86_64-linux.prebuilt-runtime --no-link