From 53ce2807c0dd2a45227e2351bc634f6a53412c6a Mon Sep 17 00:00:00 2001 From: Dante Niewenhuis Date: Mon, 15 Jun 2026 15:16:28 +0200 Subject: Updated build and benchmark to only run on atlarge-research/opendc repo (#429) * Made build and benchmark only run on atlarge-research/opendc repo * added error message to benchmark-comment.yml --- .github/workflows/benchmark-comment.yml | 4 ++-- .github/workflows/benchmark.yml | 7 ++++--- .github/workflows/build.yml | 2 ++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/benchmark-comment.yml b/.github/workflows/benchmark-comment.yml index 760804d2..f45b188e 100644 --- a/.github/workflows/benchmark-comment.yml +++ b/.github/workflows/benchmark-comment.yml @@ -48,8 +48,8 @@ jobs: gh release download benchmark-data \ --repo atlarge-research/opendc \ -A benchmark-history.json \ - -O baseline.json 2>/dev/null \ - || echo "[]" > baseline.json + -O baseline.json \ + || { echo "Warning: Could not fetch baseline, using empty baseline"; echo "[]" > baseline.json; } env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 3e5407bb..74b88e65 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -15,6 +15,7 @@ concurrency: jobs: benchmark: name: Run CIBenchmark + if: github.repository == 'atlarge-research/opendc' runs-on: ubuntu-latest permissions: @@ -61,7 +62,7 @@ jobs: # ── Master push: store results in the benchmark-data GitHub Release ─────────── store-results: name: Store benchmark results - if: github.event_name == 'push' + if: github.event_name == 'push' && github.repository == 'atlarge-research/opendc' needs: benchmark runs-on: ubuntu-latest @@ -81,8 +82,8 @@ jobs: run: | gh release download benchmark-data \ --repo atlarge-research/opendc \ - --pattern benchmark-history.json \ - --output existing-history.json 2>/dev/null \ + -A benchmark-history.json \ + -O existing-history.json 2>/dev/null \ || echo "[]" > existing-history.json env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5e9f6d54..d91c4281 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,6 +11,7 @@ on: jobs: build: name: Build (Java ${{ matrix.java }} - ${{ matrix.os }}) + if: github.repository == 'atlarge-research/opendc' runs-on: ${{ matrix.os }} strategy: matrix: @@ -75,6 +76,7 @@ jobs: files: ./build/reports/jacoco/codeCoverageReport/codeCoverageReport.xml build-docker: name: Build Docker Images + if: github.repository == 'atlarge-research/opendc' runs-on: ubuntu-22.04 steps: - name: Checkout repository -- cgit v1.2.3