-
Notifications
You must be signed in to change notification settings - Fork 12
ci: bake custom ARC runner image and migrate CI off depot #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,7 +36,7 @@ jobs: | |
| ######################## | ||
| commit-message: | ||
| name: Commit Message | ||
| runs-on: depot-ubuntu-24.04 | ||
| runs-on: [self-hosted] | ||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v5 | ||
|
|
@@ -67,7 +67,7 @@ jobs: | |
| ######################## | ||
| static-checks: | ||
| name: Static Checks | ||
| runs-on: depot-ubuntu-24.04 | ||
| runs-on: [self-hosted] | ||
| steps: | ||
| - name: Git checkout | ||
| uses: actions/checkout@v5 | ||
|
|
@@ -137,16 +137,13 @@ jobs: | |
| ######################## | ||
| lint: | ||
| name: Lint code | ||
| runs-on: depot-ubuntu-24.04-8 | ||
| runs-on: [self-hosted] | ||
| steps: | ||
| - name: git checkout | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Clean up runner space | ||
| uses: ./.github/actions/cleanup-space | ||
|
|
||
| - name: setup go ${{ env.GO_VERSION }} | ||
| uses: ./.github/actions/setup-go | ||
| with: | ||
|
|
@@ -162,7 +159,7 @@ jobs: | |
| ######################## | ||
| cross-compile: | ||
| name: Cross compilation | ||
| runs-on: depot-ubuntu-24.04-4 | ||
| runs-on: [self-hosted] | ||
| strategy: | ||
| fail-fast: true | ||
| matrix: | ||
|
|
@@ -183,9 +180,6 @@ jobs: | |
| - name: Git checkout | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: Clean up runner space | ||
| uses: ./.github/actions/cleanup-space | ||
|
|
||
| - name: Setup go ${{ env.GO_VERSION }} | ||
| uses: ./.github/actions/setup-go | ||
| with: | ||
|
|
@@ -201,7 +195,7 @@ jobs: | |
| ######################## | ||
| unit-test: | ||
| name: Run unit tests | ||
| runs-on: depot-ubuntu-24.04-4 | ||
| runs-on: [self-hosted] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Switching to Useful? React with 👍 / 👎. |
||
| strategy: | ||
| # Allow other tests in the matrix to continue if one fails. | ||
| fail-fast: false | ||
|
|
@@ -218,9 +212,6 @@ jobs: | |
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Clean up runner space | ||
| uses: ./.github/actions/cleanup-space | ||
|
|
||
| - name: Fetch and rebase on ${{ github.base_ref }} | ||
| if: github.event_name == 'pull_request' | ||
| uses: ./.github/actions/rebase | ||
|
|
@@ -234,7 +225,10 @@ jobs: | |
| - name: Run ${{ matrix.unit_type }} | ||
| # Run with sudo as harness uses user 0:0 which needs extra permissions | ||
| # on the github runner in order for docker mounts to work correctly. | ||
| run: sudo env "PATH=$PATH" "GOPATH=$GOPATH" make ${{ matrix.unit_type }} | ||
| # Bump the per-package test timeout from Go's 10m default because the | ||
| # ARC runners boot the test harness slower than Depot/local; 30m is | ||
| # generous headroom while still failing on a real hang. | ||
| run: sudo env "PATH=$PATH" "GOPATH=$GOPATH" make ${{ matrix.unit_type }} timeout=30m | ||
|
|
||
| - name: Clean coverage | ||
| run: grep -Ev '(\.pb\.go|\.pb\.json\.go|\.pb\.gw\.go|db/sqlc/)' coverage.txt > coverage-norpc.txt | ||
|
|
@@ -280,7 +274,7 @@ jobs: | |
| ######################## | ||
| systest: | ||
| name: Run system tests | ||
| runs-on: depot-ubuntu-24.04-8 | ||
| runs-on: [self-hosted] | ||
| strategy: | ||
| # Allow other tests in the matrix to continue if one fails. | ||
| fail-fast: false | ||
|
|
@@ -295,9 +289,6 @@ jobs: | |
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Clean up runner space | ||
| uses: ./.github/actions/cleanup-space | ||
|
|
||
| - name: Fetch and rebase on ${{ github.base_ref }} | ||
| if: github.event_name == 'pull_request' | ||
| uses: ./.github/actions/rebase | ||
|
|
@@ -311,7 +302,10 @@ jobs: | |
| - name: Run systest with ${{ matrix.db_backend }} | ||
| # Run with sudo as harness uses user 0:0 which needs extra permissions | ||
| # on the github runner in order for docker mounts to work correctly. | ||
| run: sudo env "PATH=$PATH" "GOPATH=$GOPATH" make systest-verbose db=${{ matrix.db_backend }} | ||
| # Bump per-package test timeout above the Makefile default for the | ||
| # same ARC-vs-Depot harness-boot speed reasons documented in the unit | ||
| # test job above. | ||
| run: sudo env "PATH=$PATH" "GOPATH=$GOPATH" make systest-verbose db=${{ matrix.db_backend }} SYSTEST_TIMEOUT=30m | ||
|
|
||
| - name: Fix artifact permissions | ||
| if: always() | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow still runs on
pull_request(lines 7-9), and after this change every job executes onself-hosted; that means PR code from contributors can run directly on your own runner infrastructure instead of isolated hosted workers. In repositories where fork PRs are enabled, this is a high-risk execution path because attacker-controlled workflow code can probe the runner host and any credentials available to it, so self-hosted should be limited to trusted events or tightly restricted runner groups.Useful? React with 👍 / 👎.