29dfbf1cae
The job command previously discarded --use-git-clone and --submodules
(`del`) and always in-guest cloned with submodules off — making both
action inputs dead no-ops (submodule repos silently broken).
- job.py: --use-git-clone/--host-clone and --submodules/--no-submodules
are real booleans defaulting to ON. Default = in-guest clone with
submodules. --host-clone clones on the host into a temp dir
(_host_clone) and transfers a zip; temp dir cleaned in finally.
clone_submodules now honoured (was hardcoded False).
- action.yml: use-git-clone / submodules default 'true'; forward the
explicit positive/negative flag so the Python default is overridden
deterministically.
- self-test.yml: add smoke-{windows,linux}-hostclone jobs covering the
host-side transport (default jobs already cover in-guest).
- tests: default-transport, host-clone, and --no-submodules coverage.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
73 lines
3.2 KiB
YAML
73 lines
3.2 KiB
YAML
# CI Self-Test (smoke) — Local CI/CD System
|
|
#
|
|
# On-demand smoke test that validates the full pipeline end-to-end:
|
|
# VM clone -> start -> IP detect -> trivial build -> artifact collect -> destroy
|
|
#
|
|
# Trigger: workflow_dispatch only (never runs on push/tag).
|
|
# Jobs are independent — a failure in one does not cancel the others.
|
|
# Covers both source transports: in-guest git clone (default) and the
|
|
# host-side clone + zip transfer variant (use-git-clone: 'false').
|
|
#
|
|
# Prerequisites (must be in place before running):
|
|
# - Runner labels: windows-build:host and linux-build:host active
|
|
# - Templates at GITEA_CI_TEMPLATE_PATH / GITEA_CI_LINUX_TEMPLATE_PATH
|
|
# - Snapshots BaseClean (Windows) and BaseClean-Linux (Linux) exist
|
|
# - ci-report-ip.service enabled in LinuxBuild2404 template
|
|
|
|
name: CI Self-Test (smoke)
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
smoke-windows:
|
|
runs-on: windows-build
|
|
steps:
|
|
- uses: https://gitea.emulab.it/Simone/local-ci-cd-system/.gitea/actions/local-ci-build@main
|
|
with:
|
|
# Trivial no-op build: write a marker file to the CI output directory.
|
|
# The Windows build VM maps C:\CI\output as the artifact source.
|
|
build-command: 'New-Item -ItemType Directory -Path C:\CI\output -Force | Out-Null; Set-Content C:\CI\output\smoke.txt "smoke-ok"'
|
|
artifact-source: 'C:\CI\output'
|
|
guest-os: 'Windows'
|
|
job-id-suffix: 'smoke-win'
|
|
artifact-name: 'smoke-windows-${{ github.run_id }}'
|
|
|
|
smoke-linux:
|
|
runs-on: linux-build
|
|
steps:
|
|
- uses: https://gitea.emulab.it/Simone/local-ci-cd-system/.gitea/actions/local-ci-build@main
|
|
with:
|
|
# Trivial no-op build: write a marker file to the CI output directory.
|
|
# The Linux build VM uses /opt/ci/output as the artifact source.
|
|
build-command: 'mkdir -p /opt/ci/output && echo smoke-ok > /opt/ci/output/smoke.txt'
|
|
artifact-source: '/opt/ci/output'
|
|
guest-os: 'Linux'
|
|
job-id-suffix: 'smoke-linux'
|
|
artifact-name: 'smoke-linux-${{ github.run_id }}'
|
|
|
|
# ── Host-side clone + zip transfer variant (use-git-clone: 'false') ───────
|
|
smoke-windows-hostclone:
|
|
runs-on: windows-build
|
|
steps:
|
|
- uses: https://gitea.emulab.it/Simone/local-ci-cd-system/.gitea/actions/local-ci-build@main
|
|
with:
|
|
build-command: 'New-Item -ItemType Directory -Path C:\CI\output -Force | Out-Null; Set-Content C:\CI\output\smoke.txt "smoke-ok"'
|
|
artifact-source: 'C:\CI\output'
|
|
guest-os: 'Windows'
|
|
use-git-clone: 'false'
|
|
job-id-suffix: 'smoke-win-hostclone'
|
|
artifact-name: 'smoke-windows-hostclone-${{ github.run_id }}'
|
|
|
|
smoke-linux-hostclone:
|
|
runs-on: linux-build
|
|
steps:
|
|
- uses: https://gitea.emulab.it/Simone/local-ci-cd-system/.gitea/actions/local-ci-build@main
|
|
with:
|
|
build-command: 'mkdir -p /opt/ci/output && echo smoke-ok > /opt/ci/output/smoke.txt'
|
|
artifact-source: '/opt/ci/output'
|
|
guest-os: 'Linux'
|
|
use-git-clone: 'false'
|
|
job-id-suffix: 'smoke-linux-hostclone'
|
|
artifact-name: 'smoke-linux-hostclone-${{ github.run_id }}' |