Skip to content

Commit 29a849e

Browse files
committed
FEATURE-ci-v3-integration: enforce native CI and selected-archive release acceptance
Run TLS-off/on native suites and independent bounded fuzz shards, repair installed platform prerequisites, and route legacy CI by source capability. Bind one selected archive to fresh platform bundles and the existing complete readiness validator before an isolated inline publisher can release an existing tag. Local verification: native 239/270 tests (two documented nonlocal skips each), eleven sanitizer fuzz targets, GCC QUIC replay, real Doxygen/Graphviz, 99 focused contracts, actionlint and workflow policy checks pass. A failed full Linux installed attempt remains unsuccessful at unprivileged TCP443; focused genuine isolated public TLS passes all four 82-check cells. Fresh full 18-gate and three nonlocal receipts plus actual GitHub PR verification remain CI/root-owned.
1 parent 1cfe830 commit 29a849e

28 files changed

Lines changed: 2299 additions & 122 deletions

‎.github/workflows/changelog-check.yml‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,29 @@ name: "ChangeLog Check"
22

33
on:
44
pull_request:
5-
branches: [master]
5+
branches: [master, v3]
6+
7+
permissions:
8+
contents: read
69

710
jobs:
811
changelog:
912
name: Verify ChangeLog updated
1013
runs-on: ubuntu-latest
1114
steps:
1215
- name: Checkout repository
13-
uses: actions/checkout@v4
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
1417
with:
1518
fetch-depth: 0
1619

1720
- name: Check for ChangeLog update
21+
env:
22+
BASE_REF: ${{ github.base_ref }}
1823
run: |
1924
# Get list of changed files
20-
changed_files=$(git diff --name-only origin/master...HEAD)
25+
git check-ref-format "refs/heads/$BASE_REF"
26+
base=$(git rev-parse --verify "refs/remotes/origin/$BASE_REF^{commit}")
27+
changed_files=$(git diff "$base...HEAD" --name-only --)
2128
2229
if [ -z "$changed_files" ]; then
2330
echo "No files changed."

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ name: "CodeQL"
1818

1919
on:
2020
push:
21-
branches: [master]
21+
branches: [master, v3]
2222
pull_request:
2323
# The branches below must be a subset of the branches above
24-
branches: [master]
24+
branches: [master, v3]
2525
schedule:
2626
- cron: '0 4 * * 4'
2727

@@ -68,18 +68,32 @@ jobs:
6868
with:
6969
languages: ${{ matrix.language }}
7070

71-
# CodeQL's C/C++ database extractor traces the actual compile commands, so
72-
# the library is built explicitly here rather than via the CodeQL Autobuild
73-
# action (autobuild guesses the build and is intentionally not used). The
74-
# build must be a clean from-scratch `make` so every TU is extracted; the
75-
# in-source build (--enable-same-directory-build) keeps object files where
76-
# the extractor expects them.
71+
- name: Install build prerequisites
72+
run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool pkg-config perl
73+
- name: Select source configuration
74+
id: source
75+
run: |
76+
if grep -q 'libhttpserver_v3core_la_SOURCES' src/Makefile.am; then
77+
echo 'native=true' >> "$GITHUB_OUTPUT"
78+
fi
79+
- name: Provision private native TLS provider
80+
if: steps.source.outputs.native == 'true'
81+
run: python3 scripts/prepare-v3-package-ci.py --output "$RUNNER_TEMP/codeql-prerequisites"
7782
- name: Build the library (CodeQL manual mode)
7883
run: |
79-
./bootstrap ;
80-
./configure --enable-same-directory-build ;
81-
make ;
82-
timeout-minutes: 30
84+
./bootstrap
85+
mkdir "$RUNNER_TEMP/codeql-build"
86+
cd "$RUNNER_TEMP/codeql-build"
87+
if grep -q 'libhttpserver_v3core_la_SOURCES' "$GITHUB_WORKSPACE/src/Makefile.am"; then
88+
export LD_LIBRARY_PATH="$RUNNER_TEMP/codeql-prerequisites/provider/lib"
89+
export V3_TLS_CFLAGS="-I$RUNNER_TEMP/codeql-prerequisites/provider/include"
90+
export V3_TLS_LIBS="-L$RUNNER_TEMP/codeql-prerequisites/provider/lib -lssl -lcrypto"
91+
"$GITHUB_WORKSPACE/./configure" --enable-v3-tls
92+
else
93+
"$GITHUB_WORKSPACE/./configure"
94+
fi
95+
make -j2
96+
timeout-minutes: 40
8397

8498
- name: Perform CodeQL Analysis
8599
uses: github/codeql-action/analyze@411c4c9a36b3fca4d674f06b6396b2c6d23522c6 # v3.36.3

‎.github/workflows/release.yml‎

Lines changed: 55 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ on:
1111
required: true
1212

1313
permissions:
14-
contents: write
14+
contents: read
15+
actions: read
1516

1617
jobs:
1718
validate:
@@ -20,43 +21,43 @@ jobs:
2021
outputs:
2122
version: ${{ steps.version.outputs.version }}
2223
is_prerelease: ${{ steps.version.outputs.is_prerelease }}
24+
commit: ${{ steps.version.outputs.commit }}
25+
native: ${{ steps.version.outputs.native }}
2326
steps:
2427
- name: Checkout repository
25-
uses: actions/checkout@v4
28+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
29+
with:
30+
fetch-depth: 0
2631

27-
- name: Determine version
32+
- name: Resolve existing tag and source version
2833
id: version
34+
env:
35+
REQUEST_TAG: ${{ inputs.tag || github.ref_name }}
2936
run: |
30-
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
31-
VERSION="${{ github.event.inputs.tag }}"
32-
else
33-
VERSION="${GITHUB_REF#refs/tags/}"
34-
fi
35-
VERSION="${VERSION#v}"
36-
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
37-
38-
if echo "$VERSION" | grep -qE '-(rc|alpha|beta)'; then
39-
echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
40-
else
41-
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
42-
fi
43-
44-
echo "Version: $VERSION"
45-
46-
- name: Validate version consistency
47-
run: |
48-
chmod +x scripts/validate-version.sh
49-
scripts/validate-version.sh "${{ steps.version.outputs.version }}"
37+
python3 - <<'PYTHON'
38+
import os,re,subprocess
39+
from pathlib import Path
40+
version=os.environ['REQUEST_TAG']
41+
if not re.fullmatch(r'[0-9]+\.[0-9]+\.[0-9]+(?:-(?:rc|alpha|beta)[0-9]+)?',version): raise SystemExit('invalid version tag')
42+
commit=subprocess.check_output(['git','rev-parse','--verify','refs/tags/'+version+'^{commit}'],text=True).strip()
43+
subprocess.run(['git','checkout','--detach',commit],check=True)
44+
subprocess.run(['bash','scripts/validate-version.sh',version],check=True)
45+
native='true' if 'libhttpserver_v3core_la_SOURCES' in Path('src/Makefile.am').read_text() else 'false'
46+
with open(os.environ['GITHUB_OUTPUT'],'a') as out:
47+
out.write('version='+version+'\ncommit='+commit+'\nnative='+native+'\nis_prerelease='+str('-' in version).lower()+'\n')
48+
PYTHON
5049
5150
- name: Extract release notes
51+
env:
52+
VERSION: ${{ steps.version.outputs.version }}
5253
run: |
5354
chmod +x scripts/extract-release-notes.sh
54-
scripts/extract-release-notes.sh "${{ steps.version.outputs.version }}" > release-notes.md
55+
scripts/extract-release-notes.sh "$VERSION" > release-notes.md
5556
echo "--- Release notes ---"
5657
cat release-notes.md
5758
5859
- name: Upload release notes
59-
uses: actions/upload-artifact@v4
60+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
6061
with:
6162
name: release-notes
6263
path: release-notes.md
@@ -65,9 +66,12 @@ jobs:
6566
name: Build distribution tarball
6667
runs-on: ubuntu-latest
6768
needs: validate
69+
if: needs.validate.outputs.native == 'false'
6870
steps:
6971
- name: Checkout repository
70-
uses: actions/checkout@v4
72+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
73+
with:
74+
ref: ${{ needs.validate.outputs.commit }}
7175

7276
- name: Install dependencies
7377
run: |
@@ -89,7 +93,7 @@ jobs:
8993
make dist
9094
9195
- name: Upload tarball
92-
uses: actions/upload-artifact@v4
96+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
9397
with:
9498
name: dist-tarball
9599
path: build/libhttpserver-*.tar.gz
@@ -105,7 +109,7 @@ jobs:
105109
sudo apt-get install -y libcurl4-openssl-dev
106110
107111
- name: Download tarball
108-
uses: actions/download-artifact@v4
112+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
109113
with:
110114
name: dist-tarball
111115

@@ -135,7 +139,7 @@ jobs:
135139

136140
- name: Fetch curl from cache
137141
id: cache-curl
138-
uses: actions/cache@v4
142+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684
139143
with:
140144
path: curl-7.75.0
141145
key: macos-latest-CURL-pre-built-v3
@@ -155,7 +159,7 @@ jobs:
155159
sudo make install
156160
157161
- name: Download tarball
158-
uses: actions/download-artifact@v4
162+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
159163
with:
160164
name: dist-tarball
161165

@@ -184,7 +188,7 @@ jobs:
184188
shell: msys2 {0}
185189
steps:
186190
- name: Setup MSYS2
187-
uses: msys2/setup-msys2@v2
191+
uses: msys2/setup-msys2@e9898307ac31d1a803454791be09ab9973336e1c
188192
with:
189193
msystem: MINGW64
190194
update: true
@@ -197,7 +201,7 @@ jobs:
197201
pacman --noconfirm -S --needed mingw-w64-x86_64-{toolchain,libtool,make,pkg-config,libsystre,doxygen,graphviz,curl,python}
198202
199203
- name: Download tarball
200-
uses: actions/download-artifact@v4
204+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
201205
with:
202206
name: dist-tarball
203207

@@ -221,24 +225,27 @@ jobs:
221225
name: Create GitHub Release
222226
runs-on: ubuntu-latest
223227
needs: [validate, verify-dist-linux, verify-dist-macos, verify-dist-windows]
228+
if: needs.validate.outputs.native == 'false'
229+
permissions:
230+
contents: write
224231
steps:
225232
- name: Download tarball
226-
uses: actions/download-artifact@v4
233+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
227234
with:
228235
name: dist-tarball
229236

230237
- name: Download release notes
231-
uses: actions/download-artifact@v4
238+
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
232239
with:
233240
name: release-notes
234241

235242
- name: Create release
236243
env:
237244
GH_TOKEN: ${{ github.token }}
238245
GH_REPO: ${{ github.repository }}
246+
VERSION: ${{ needs.validate.outputs.version }}
247+
IS_PRERELEASE: ${{ needs.validate.outputs.is_prerelease }}
239248
run: |
240-
VERSION="${{ needs.validate.outputs.version }}"
241-
IS_PRERELEASE="${{ needs.validate.outputs.is_prerelease }}"
242249
243250
PRERELEASE_FLAG=""
244251
if [ "$IS_PRERELEASE" = "true" ]; then
@@ -250,3 +257,15 @@ jobs:
250257
--notes-file release-notes.md \
251258
$PRERELEASE_FLAG \
252259
libhttpserver-*.tar.gz
260+
261+
v3-acceptance:
262+
needs: validate
263+
if: needs.validate.outputs.native == 'true'
264+
permissions:
265+
contents: write
266+
actions: read
267+
uses: ./.github/workflows/v3-release-acceptance.yml
268+
with:
269+
source_commit: ${{ needs.validate.outputs.commit }}
270+
source_version: ${{ needs.validate.outputs.version }}
271+
publication: true

0 commit comments

Comments
 (0)