Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 26 additions & 4 deletions .github/workflows/release-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,75 +72,90 @@ jobs:
build-artifacts:
name: "Release Validation / build-artifacts"
needs: check-paths
if: needs.check-paths.outputs.should_run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 20
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Skip — only docs/website changes
if: needs.check-paths.outputs.should_run != 'true'
run: echo "Skipping — no release-relevant files changed"

- uses: actions/checkout@v4
if: needs.check-paths.outputs.should_run == 'true'

- uses: actions/setup-python@v4
if: needs.check-paths.outputs.should_run == 'true'
with:
python-version: '3.12'
cache: pip

- uses: actions/setup-node@v4
if: needs.check-paths.outputs.should_run == 'true'
with:
node-version: '20'
cache: npm
cache-dependency-path: telemetry/ui/package-lock.json

- uses: actions/setup-java@v4
if: needs.check-paths.outputs.should_run == 'true'
with:
distribution: temurin
java-version: '17'

- name: Install system deps
if: needs.check-paths.outputs.should_run == 'true'
run: sudo apt-get install -y --no-install-recommends graphviz

- name: Install Python build deps
if: needs.check-paths.outputs.should_run == 'true'
run: pip install flit twine

- name: Cache Apache RAT
if: needs.check-paths.outputs.should_run == 'true'
id: cache-rat
uses: actions/cache@v4
with:
path: ~/.cache/apache-rat
key: apache-rat-0.16.1

- name: Download Apache RAT if not cached
if: steps.cache-rat.outputs.cache-hit != 'true'
if: needs.check-paths.outputs.should_run == 'true' && steps.cache-rat.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.cache/apache-rat
curl -fL -o ~/.cache/apache-rat/apache-rat-0.16.1.jar \
https://repo1.maven.org/maven2/org/apache/rat/apache-rat/0.16.1/apache-rat-0.16.1.jar

- name: Extract version
if: needs.check-paths.outputs.should_run == 'true'
id: version
run: |
VERSION=$(python -c 'import re; print(re.search(r"version\s*=\s*\"([^\"]+)\"", open("pyproject.toml").read()).group(1))')
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "BURR_VERSION=$VERSION" >> "$GITHUB_ENV"

- name: Build release artifacts (no signing, no upload)
if: needs.check-paths.outputs.should_run == 'true'
run: |
python scripts/apache_release.py all "$BURR_VERSION" 0 ci-runner \
--skip-signing --no-upload

- name: Verify all 3 artifacts exist
if: needs.check-paths.outputs.should_run == 'true'
run: |
test -f "dist/apache-burr-${BURR_VERSION}-incubating-src.tar.gz"
test -f "dist/apache-burr-${BURR_VERSION}-incubating-sdist.tar.gz"
test -f "dist/apache_burr-${BURR_VERSION}-py3-none-any.whl"

- name: Run Apache RAT on source and sdist tarballs
if: needs.check-paths.outputs.should_run == 'true'
run: |
python scripts/verify_apache_artifacts.py licenses \
--rat-jar ~/.cache/apache-rat/apache-rat-0.16.1.jar \
--artifacts-dir dist

- name: Upload release artifacts
if: needs.check-paths.outputs.should_run == 'true'
uses: actions/upload-artifact@v4
with:
name: release-artifacts
Expand All @@ -155,7 +170,6 @@ jobs:
install-and-smoke:
name: "Release Validation / install-and-smoke"
needs: [check-paths, build-artifacts]
if: needs.check-paths.outputs.should_run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
Expand All @@ -165,28 +179,36 @@ jobs:
# (dict | None) which requires Python 3.10+. Tracked separately.
python-version: ['3.10', '3.11', '3.12']
steps:
- name: Skip — only docs/website changes
if: needs.check-paths.outputs.should_run != 'true'
run: echo "Skipping — no release-relevant files changed"

- uses: actions/checkout@v4
if: needs.check-paths.outputs.should_run == 'true'

- name: Set up Python ${{ matrix.python-version }}
if: needs.check-paths.outputs.should_run == 'true'
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Download release artifacts
if: needs.check-paths.outputs.should_run == 'true'
uses: actions/download-artifact@v4
with:
name: release-artifacts
path: dist

- name: Run smoke test
if: needs.check-paths.outputs.should_run == 'true'
env:
BURR_VERSION: ${{ needs.build-artifacts.outputs.version }}
run: |
python scripts/ci_smoke_server.py \
--wheel "dist/apache_burr-${BURR_VERSION}-py3-none-any.whl"

- name: Upload smoke workspace on failure
if: failure()
if: failure() && needs.check-paths.outputs.should_run == 'true'
uses: actions/upload-artifact@v4
with:
name: smoke-workspace-${{ matrix.python-version }}
Expand Down
Loading