diff --git a/.gitea/workflows/continuous_integration.yaml b/.gitea/workflows/continuous_integration.yaml index d12b106..e0541c3 100644 --- a/.gitea/workflows/continuous_integration.yaml +++ b/.gitea/workflows/continuous_integration.yaml @@ -53,7 +53,7 @@ jobs: # Passes the env: values above through as job outputs, since the env context is unavailable in # the `with:` block of a job that calls a reusable workflow (see deploy-test / deploy-production). config: - runs-on: ubuntu-latest + runs-on: linux outputs: artifact_name_test: ${{ steps.set.outputs.artifact_name_test }} artifact_name_production: ${{ steps.set.outputs.artifact_name_production }} @@ -94,7 +94,7 @@ jobs: # workflow_dispatch run has no `before` commit to diff against and is always an explicit request # to run everything, so it force-reports both sides as changed rather than trusting the filter. changes: - runs-on: ubuntu-latest + runs-on: linux outputs: backend: ${{ github.event_name == 'workflow_dispatch' || steps.filter.outputs.backend == 'true' }} frontend: ${{ github.event_name == 'workflow_dispatch' || steps.filter.outputs.frontend == 'true' }} @@ -127,7 +127,7 @@ jobs: backend-build: needs: changes if: needs.changes.outputs.backend == 'true' - runs-on: ubuntu-latest + runs-on: linux steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 @@ -140,7 +140,10 @@ jobs: backend-test: needs: [changes, backend-build] if: needs.changes.outputs.backend == 'true' - runs-on: ubuntu-latest + runs-on: raspberry-pi + # Pi only for now: the job starts MariaDB with the `docker` CLI on fixed host port 3307 (host networking), which + # is not verified on the PC runner (podman, and port 3307 is used there by the local dev database). Switch to + # `linux` after a successful trial run on the PC. # Added for SlpModularCms.Api.Tests (slpsoftware-api feature, NFR-CS-01): its pipeline # regression tests boot the real Api host via WebApplicationFactory, which unconditionally # runs CmsHost.ConfigurePipeline's startup migration (MigrateCoreDatabase) -- unlike every @@ -194,10 +197,14 @@ jobs: # `dotnet list package --vulnerable` always exits 0, even when it reports vulnerabilities, so the # step greps its own output and fails deliberately (FR-22, D-12, OPEN-03 — closed by pinning # Microsoft.OpenApi and System.Security.Cryptography.Xml in the relevant .csproj files). - # Runner labels: `ubuntu-latest` exists only on the Pi (linux-arm64). The independent jobs below (vulnerability-scan, - # frontend-*) use `linux`, which the Pi and the desktop runner (x64) both carry, so they can run in parallel. They need no - # arm64 artefact and each does its own `pnpm install`. NOT moved: backend-test (docker mariadb), publish-* (linux-arm64 - # artefacts for the Pi) and deploy-* (reusable deploy workflow). + # Runner labels: a job runs on a runner that has ALL of its runs-on labels. + # Pi runner: linux-arm64, ubuntu-latest, global, linux, arm64, podman, raspberry-pi + # PC runner: global, linux, x64, podman, bryan-desktop + # `linux` = any free runner (PC or Pi): for everything that is plain build/test/lint work (config, changes, + # backend-build, vulnerability-scan, frontend-*). `raspberry-pi` = the Pi only: for jobs that need the Pi's + # environment -- publish-* (linux-arm64 artefact, uploaded for the Pi) and deploy-* (ssh/sftp to the host, sshpass, + # sudo apt-get; they failed on the PC) -- and backend-test (see there). If the PC is off or busy the Pi takes + # the `linux` jobs too. vulnerability-scan: needs: changes if: needs.changes.outputs.backend == 'true' @@ -364,7 +371,7 @@ jobs: needs.frontend-lint.result != 'failure' && needs.frontend-lint.result != 'cancelled' && (needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true') && (github.event_name != 'workflow_dispatch' || github.event.inputs.deploy_test == 'true') - runs-on: ubuntu-latest + runs-on: raspberry-pi steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 @@ -439,7 +446,7 @@ jobs: needs.frontend-lint.result != 'failure' && needs.frontend-lint.result != 'cancelled' && github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_production == 'true' && (needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true') - runs-on: ubuntu-latest + runs-on: raspberry-pi steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 @@ -537,7 +544,7 @@ jobs: # ========================================================================================== config-asf: if: ${{ vars.ASF_TEST_DEPLOY_ENABLED == 'true' }} - runs-on: ubuntu-latest + runs-on: linux outputs: deploy_path: ${{ steps.set.outputs.deploy_path }} service_name: ${{ steps.set.outputs.service_name }} @@ -576,7 +583,7 @@ jobs: (needs.changes.outputs.backend == 'true' || needs.changes.outputs.frontend == 'true') && ((github.event_name == 'workflow_dispatch' && github.event.inputs.deploy_asf_test == 'true') || (github.event_name == 'push' && github.ref == 'refs/heads/master')) - runs-on: ubuntu-latest + runs-on: raspberry-pi steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v4 diff --git a/.gitea/workflows/deploy-scp.yaml b/.gitea/workflows/deploy-scp.yaml index d46c5e0..9ced0eb 100644 --- a/.gitea/workflows/deploy-scp.yaml +++ b/.gitea/workflows/deploy-scp.yaml @@ -40,7 +40,7 @@ on: jobs: deploy: - runs-on: ubuntu-latest + runs-on: raspberry-pi steps: - name: Compute release timestamp id: release