44 lines
1.8 KiB
YAML
44 lines
1.8 KiB
YAML
name: Device Core qualification
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
qualify:
|
|
runs-on: nodedc-node22-build
|
|
timeout-minutes: 45
|
|
steps:
|
|
- name: Check the exact pushed commit
|
|
env:
|
|
SOURCE_COMMIT: ${{ gitea.sha }}
|
|
SOURCE_RUN_ID: ${{ gitea.run_id }}
|
|
SOURCE_RUN_NUMBER: ${{ gitea.run_number }}
|
|
run: |
|
|
set -eu
|
|
python3 -c 'import os,re; assert re.fullmatch("[0-9a-f]{40}", os.environ["SOURCE_COMMIT"]), "full commit SHA required"'
|
|
job_root=$(mktemp -d)
|
|
trap 'rm -rf "$job_root"' EXIT
|
|
source_root="$job_root/NODEDC_DEVICE_CORE"
|
|
mkdir "$source_root"
|
|
git -C "$source_root" init --quiet
|
|
git -C "$source_root" remote add origin https://git.dcserve.ru/SILVER/NODEDC_DEVICE_CORE.git
|
|
git -C "$source_root" fetch --quiet --depth=1 origin "$SOURCE_COMMIT"
|
|
git -C "$source_root" checkout --quiet --detach FETCH_HEAD
|
|
python3 "$source_root/infra/ci/qualify.py" fetch-dependencies --commit "$SOURCE_COMMIT"
|
|
python3 "$source_root/infra/ci/qualify.py" check --commit "$SOURCE_COMMIT" --report "$job_root/qualification.json"
|
|
python3 "$source_root/infra/ci/package_release.py" --report "$job_root/qualification.json" --run-id "$SOURCE_RUN_ID" --run-number "$SOURCE_RUN_NUMBER" --output-dir "$GITHUB_WORKSPACE/release"
|
|
- name: Retain the qualified release in this Gitea run
|
|
uses: https://github.com/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5
|
|
with:
|
|
name: device-core-release
|
|
path: release
|
|
if-no-files-found: error
|
|
retention-days: 30
|
|
# Production activation is separate: this job has no production access.
|
|
# Do not label a successful qualification as a successful deployment.
|