Complete original edition rules, season safety and verified 1.0 releases (by Codex)
This commit is contained in:
1 parent
e432f20ae7
commit
f0ef79a119
21 files changed
+563
-30
No files matched your search
@@ -39,7 +39,10 @@ jobs:
|
||||
# Audit the selected tree shipped in source archives. Full repository
|
||||
# history auditing is available separately with --history.
|
||||
- name: Verify source export
|
||||
run: python3 tools/public_release/check_public_tree.py --root .
|
||||
run: |
|
||||
python3 tools/public_release/check_public_tree.py --root .
|
||||
python3 tools/ci/test_build_runnable_tests.py
|
||||
python3 tools/package/test_verify_ci_release.py
|
||||
- name: Set up MSVC x64
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@a102174a2b586eec2ea151a69e6fd14404a8ce7c # v1.13.0
|
||||
@@ -64,10 +67,20 @@ jobs:
|
||||
run: |
|
||||
test "$(uname -m)" = arm64
|
||||
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DBMH_DATA= -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
|
||||
- name: Build every target
|
||||
run: cmake --build build --config Release --parallel 2
|
||||
- name: Build products and every runnable test
|
||||
run: python3 tools/ci/build_runnable_tests.py --build build --config Release --parallel 2
|
||||
- name: Run synthetic tests and report data tests as skipped
|
||||
run: ctest --test-dir build -C Release --output-on-failure --output-junit test-results.xml
|
||||
- name: Verify product versions
|
||||
shell: python
|
||||
run: |
|
||||
import pathlib, subprocess, sys
|
||||
build = pathlib.Path('build').resolve()
|
||||
version = (build / 'product-version.txt').read_text().strip()
|
||||
suffix = '.exe' if sys.platform == 'win32' else ''
|
||||
cli = subprocess.run([str(build / ('openbmh_cli' + suffix)), '--version'], check=True, capture_output=True, text=True)
|
||||
assert cli.stdout.strip() == 'OpenBMH console ' + version
|
||||
subprocess.run([str(build / ('OpenBMH' + suffix)), '--version'], check=True)
|
||||
- name: Package products and licenses
|
||||
run: python3 tools/package/make_package.py --build build --out dist --platform ${{ matrix.platform }}
|
||||
- name: Package corresponding source and pinned dependencies
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
name: Prepare release packages
|
||||
name: Prepare verified release
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -7,34 +7,59 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
draft:
|
||||
needs: build
|
||||
runs-on: ubuntu-24.04
|
||||
permissions:
|
||||
contents: write
|
||||
actions: read
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Locate successful CI for this exact revision
|
||||
id: ci
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
EXPECTED_SHA: ${{ github.sha }}
|
||||
run: |
|
||||
gh api "repos/$GITHUB_REPOSITORY/actions/workflows/ci.yml/runs?status=success&event=push&per_page=100" > ci-runs.json
|
||||
python3 - <<'PY'
|
||||
import json, os
|
||||
runs = json.load(open('ci-runs.json'))['workflow_runs']
|
||||
matches = [r for r in runs if r['head_sha'] == os.environ['EXPECTED_SHA'] and
|
||||
r['conclusion'] == 'success' and r['event'] == 'push' and
|
||||
r['head_repository']['full_name'].lower() == os.environ['GITHUB_REPOSITORY'].lower()]
|
||||
if not matches:
|
||||
raise SystemExit('Run the full CI successfully for this revision before tagging a release')
|
||||
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
|
||||
output.write('run_id=' + str(matches[0]['id']) + '\n')
|
||||
PY
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
run-id: ${{ steps.ci.outputs.run_id }}
|
||||
pattern: OpenBMH-*
|
||||
path: dist
|
||||
merge-multiple: true
|
||||
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
run-id: ${{ steps.ci.outputs.run_id }}
|
||||
pattern: tests-*
|
||||
path: test-reports
|
||||
- name: Verify archives, corresponding source and platform reports
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
CI_RUN: ${{ steps.ci.outputs.run_id }}
|
||||
run: |
|
||||
python3 tools/package/verify_ci_release.py --dist dist --reports test-reports --tag "$RELEASE_TAG" --source-sha "$GITHUB_SHA" --ci-run "$CI_RUN" --repository "$GITHUB_REPOSITORY"
|
||||
- name: Create draft for review
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
RELEASE_TAG: ${{ github.ref_name }}
|
||||
run: |
|
||||
for package in dist/*.zip; do
|
||||
case "$(basename "$package")" in
|
||||
OpenBMH-${RELEASE_TAG#v}-*.zip) ;;
|
||||
*) echo "Release tag and package version differ" >&2; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
gh release create "$RELEASE_TAG" dist/*.zip --draft --verify-tag --title "OpenBMH $RELEASE_TAG" --notes-file docs/release/1.0/RELEASE_NOTES.md
|
||||
gh release create "$RELEASE_TAG" dist/*.zip dist/SHA256SUMS dist/QA-REPORT.json --draft --verify-tag --title "OpenBMH $RELEASE_TAG" --notes-file docs/release/1.0/RELEASE_NOTES.md
|
||||
Reference in new issue
Block a user