Skip to content
Open
Show file tree
Hide file tree
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
50 changes: 46 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,52 @@ jobs:
# Show warnings but don't fail the CI
bazel run //:buildifier -- --lint=warn --mode=check -r . || true

hermiticity-check:
name: Hermiticity Check
runs-on: ubuntu-latest
needs: lint

steps:
- uses: actions/checkout@v5

- name: Install Bazelisk
run: |
curl -LO https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64
chmod +x bazelisk-linux-amd64
sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Build with Execution Log
run: |
echo "🔍 Building with execution logging to analyze hermiticity..."
bazel build --execution_log_json_file=/tmp/exec.json //examples/go_component:calculator_component

- name: Analyze Hermiticity
run: |
echo "📊 Analyzing build hermiticity..."
python3 tools/hermetic_test/analyze_exec_log.py /tmp/exec.json

- name: Run Comprehensive Hermetic Test Suite
run: |
echo "🧪 Running comprehensive hermetic test suite..."
chmod +x .hermetic_test.sh
./.hermetic_test.sh

- name: Upload Execution Log (on failure)
if: failure()
uses: actions/upload-artifact@v4
with:
name: hermiticity-execution-log
path: /tmp/exec.json

test-linux:
name: Test on ubuntu-latest
runs-on: ubuntu-latest
needs: lint # Run tests only after lint passes
needs: [lint, hermiticity-check]

services:
registry:
Expand Down Expand Up @@ -148,7 +190,7 @@ jobs:
test-macos:
name: Test on macos-latest
runs-on: macos-latest
needs: lint # Run tests only after lint passes
needs: [lint, hermiticity-check]

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -261,7 +303,7 @@ jobs:
bcr-docker-test:
name: BCR Docker Environment Test
runs-on: ubuntu-latest
needs: lint # Run in parallel with regular tests
needs: [lint, hermiticity-check]

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -433,7 +475,7 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
needs: [test-linux, test-macos, integration, bcr-docker-test]
needs: [test-linux, test-macos, integration, bcr-docker-test, hermiticity-check]
if: github.ref == 'refs/heads/main'

steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,4 @@ coverage/
# Profiling output
perf.data
flamegraph.svg
__pycache__/
Loading