Lead the landing page with the rival comparison #193
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Reference environments | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: usagebench-reference-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| contract: | |
| name: validate reproduction contract | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| fetch-depth: 1 | |
| lfs: false | |
| persist-credentials: false | |
| - name: Validate candidate classes and smoke coverage | |
| run: | | |
| scripts/validate-reproduction-contract.sh | |
| python3 -m unittest tests/test_reference_image.py | |
| build-and-smoke: | |
| name: ${{ matrix.runner }} reference image | |
| needs: contract | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| timeout-minutes: 35 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: bifrost | |
| case_path: containers/reference/v1/smoke/bifrost-case.yaml | |
| case_id: reference-bifrost-unused-function | |
| - runner: gopls | |
| case_path: benchmarks/cases/go-baseline.yaml | |
| case_id: go-package-function-call | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| fetch-depth: 1 | |
| lfs: false | |
| persist-credentials: false | |
| - name: Force recipe rebuild and run offline smoke | |
| env: | |
| USAGEBENCH_REFERENCE_IMAGE_FORCE_REBUILD: '1' | |
| run: scripts/reference-environment-ci.sh "${{ matrix.runner }}" "${{ matrix.case_path }}" "${{ matrix.case_id }}" v0.0.0 "${{ github.sha }}" | |
| publish-and-smoke: | |
| name: publish ${{ matrix.runner }} reference image | |
| needs: contract | |
| if: github.event_name != 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runner: bifrost | |
| case_path: containers/reference/v1/smoke/bifrost-case.yaml | |
| case_id: reference-bifrost-unused-function | |
| - runner: gopls | |
| case_path: benchmarks/cases/go-baseline.yaml | |
| case_id: go-package-function-call | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 | |
| with: | |
| fetch-depth: 1 | |
| lfs: false | |
| persist-credentials: false | |
| - name: Authenticate checksum-addressed image publication | |
| env: | |
| GHCR_TOKEN: ${{ github.token }} | |
| run: printf '%s' "$GHCR_TOKEN" | docker login ghcr.io --username "$GITHUB_ACTOR" --password-stdin | |
| - name: Publish or restore image and run offline smoke | |
| env: | |
| USAGEBENCH_REFERENCE_IMAGE_PUBLISH: '1' | |
| run: scripts/reference-environment-ci.sh "${{ matrix.runner }}" "${{ matrix.case_path }}" "${{ matrix.case_id }}" v0.0.0 "${{ github.sha }}" |