From 54399a21209446a56fe36caaa2008b87da960703 Mon Sep 17 00:00:00 2001 From: Simone Date: Mon, 11 May 2026 18:35:24 +0200 Subject: [PATCH] chore: update runner config and workflow example for linux-build label runner/config.yaml: - Add linux-build:host label alongside windows-build:host - capacity remains 4 (concurrent jobs) gitea/workflow-example.yml: - Add linux-build job example (runs-on: linux-build:host) - Document GuestOS auto-detection and SSH transport parameters --- gitea/workflow-example.yml | 49 ++++++++++++++++++++++++++++++++++++++ runner/config.yaml | 5 ++++ 2 files changed, 54 insertions(+) diff --git a/gitea/workflow-example.yml b/gitea/workflow-example.yml index 55fd0a3..55d55bb 100644 --- a/gitea/workflow-example.yml +++ b/gitea/workflow-example.yml @@ -117,3 +117,52 @@ jobs: # -Branch "${{ github.ref_name }}" ` # -Configuration "${{ matrix.config }}" ` # -VMIPAddress "${{ matrix.vm_ip }}" + +--- +# CROSS-PLATFORM MATRIX BUILD (Windows + Linux VMs) +# Runs the same build on both Windows and Linux ephemeral VMs in parallel. +# Requires: +# - runner/config.yaml labels include "windows-build:host" and "linux-build:host" +# - Linux template provisioned: F:\CI\Templates\LinuxBuild2404\LinuxBuild2404.vmx +# - SSH key at F:\CI\keys\ci_linux (ed25519, no passphrase), user ci_build +# +# jobs: +# build: +# strategy: +# matrix: +# target: [windows, linux] +# fail-fast: false +# +# runs-on: ${{ matrix.target }}-build +# +# steps: +# - uses: actions/checkout@v4 +# +# - name: Build on ${{ matrix.target }} +# shell: pwsh +# run: | +# $ErrorActionPreference = 'Stop' +# $ciScriptsDir = Join-Path $env:GITHUB_WORKSPACE 'scripts' +# +# $templatePath = if ('${{ matrix.target }}' -eq 'linux') { +# $env:GITEA_CI_LINUX_TEMPLATE_PATH # F:\CI\Templates\LinuxBuild2404\LinuxBuild2404.vmx +# } else { +# $env:GITEA_CI_TEMPLATE_PATH # F:\CI\Templates\WinBuild2025\WinBuild2025.vmx +# } +# +# & "$ciScriptsDir\Invoke-CIJob.ps1" ` +# -JobId "${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.target }}" ` +# -RepoUrl "${{ github.server_url }}/${{ github.repository }}.git" ` +# -Branch "${{ github.ref_name }}" ` +# -Commit "${{ github.sha }}" ` +# -TemplatePath $templatePath ` +# -BuildCommand 'make all' +# +# - name: Upload artifacts (${{ matrix.target }}) +# if: success() +# uses: actions/upload-artifact@v4 +# with: +# name: build-${{ matrix.target }}-${{ github.sha }} +# path: F:\CI\Artifacts\${{ github.run_id }}-${{ github.run_attempt }}-${{ matrix.target }}\ +# retention-days: 14 +# if-no-files-found: error diff --git a/runner/config.yaml b/runner/config.yaml index f18318f..3df5923 100644 --- a/runner/config.yaml +++ b/runner/config.yaml @@ -29,6 +29,10 @@ runner: # Snapshot to clone from. Default BaseClean — set to BaseClean_ when # refreshing the template. Keep the previous value live for 1 week before deleting. # GITEA_CI_SNAPSHOT_NAME: "BaseClean" + # Path to the Linux (Ubuntu 24.04) template VM + GITEA_CI_LINUX_TEMPLATE_PATH: "F:\\CI\\Templates\\LinuxBuild2404\\LinuxBuild2404.vmx" + # SSH private key for Linux guest authentication + GITEA_CI_SSH_KEY_PATH: "F:\\CI\\keys\\ci_linux" # Optional: load additional env vars from a file (one KEY=VALUE per line) # env_file: "F:\\CI\\runner.env" @@ -43,6 +47,7 @@ runner: - "windows-build:host" - "dotnet:host" - "msbuild:host" + - "linux-build:host" # Uncomment to ignore specific errors # insecure: false