Files
radiantwave/.gitea/workflows/build.yml
T
NeilClack 23821e1be6 Fix host-mode checkout in Gitea workflow
Replace actions/checkout@v4 with a manual token-based clone — its files
were being copied into the act_runner workspace instead of the repo,
leaving nix to evaluate the wrong flake. Add a workspace inspection
step before the build to aid diagnosis.
2026-08-07 15:21:47 -05:00

48 lines
1.6 KiB
YAML

name: build
on:
push:
branches: [dev, main]
pull_request:
jobs:
nix-build:
runs-on: build-server
steps:
# actions/checkout@v4 is unreliable on host-mode runners (its files are
# copied into the workspace instead of the repo), so clone explicitly.
- name: Checkout
run: |
rm -rf ./* ./.[!.]* 2>/dev/null || true
git config --global http.extraheader "Authorization: token ${{ github.token }}"
git clone --depth 1 --branch "${{ gitea.ref_name }}" \
"${{ gitea.server_url }}/${{ gitea.repository }}.git" .
test -f flake.nix
git log --oneline -1
- name: Inspect workspace
run: |
pwd
ls -la
git rev-parse --show-toplevel 2>&1 || true
git remote -v 2>&1 || true
test -f flake.nix && echo "flake.nix present" || echo "NO flake.nix"
- name: Build + offline test suite
run: nix build -L .#checks.default
- name: Live portal tests
if: ${{ secrets.RW_LIVE_API_KEY != '' }}
env:
RW_LIVE_API_KEY: ${{ secrets.RW_LIVE_API_KEY }}
RW_LIVE_ACCOUNT_EMAIL: ${{ secrets.RW_LIVE_ACCOUNT_EMAIL }}
RW_LIVE_LICENSE_EMAIL: ${{ secrets.RW_LIVE_LICENSE_EMAIL }}
RW_LIVE_LICENSE_KEY: ${{ secrets.RW_LIVE_LICENSE_KEY }}
run: |
nix develop --command bash -c '
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target test_api_client test_license_service
./build/test_api_client
./build/test_license_service
'