Skip to content

Commit

Permalink
Switch workflows to self hosted runners (#131)
Browse files Browse the repository at this point in the history
* Switch runner of filter job to a self-hosted runner
  • Loading branch information
bradbown authored Oct 7, 2024
1 parent 04c1924 commit 6ce1066
Show file tree
Hide file tree
Showing 26 changed files with 39 additions and 74 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/all-tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:

jobs:
changes:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Filter commit changes
outputs:
all-tools: ${{ steps.filter.outputs['all-tools'] }}
Expand All @@ -39,7 +39,7 @@ jobs:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml

check_image_tags_exist:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Check image tags exist
needs: [ changes, store_image_name_and_tags ]
if: ${{ needs.changes.outputs['all-tools'] == 'false' }}
Expand All @@ -56,7 +56,7 @@ jobs:
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}

all-tools-tag-only:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: All tools tag only
needs: [ changes, store_image_name_and_tags, check_image_tags_exist ]
if: ${{ github.event_name != 'pull_request' && needs.changes.outputs['all-tools'] == 'false' }}
Expand All @@ -83,7 +83,7 @@ jobs:
build-and-publish:
needs: [ changes, store_image_name_and_tags, all-tools-tag-only ]
if: ${{ always() && (needs.changes.outputs['all-tools'] == 'true' || needs.all-tools-tag-only.result != 'success' || needs.all-tools-tag-only.outputs.image_tagged != 'true') }}
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
env:
COMMIT_TAG: ${{ needs.store_image_name_and_tags.outputs.commit_tag }}
DEVELOP_TAG: ${{ needs.store_image_name_and_tags.outputs.develop_tag }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bridge-ui-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
run-e2e-tests:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/bridge-ui-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
publish:
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.draft == false)
steps:
- name: Checkout
Expand All @@ -35,7 +35,7 @@ jobs:
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cache-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
changes:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Filter commit changes
outputs:
cache-images: ${{ steps.filter.outputs.cache-images }}
Expand All @@ -31,7 +31,7 @@ jobs:
pull-and-cache-images:
needs: [ changes ]
if: ${{ always() && needs.changes.outputs.cache-images == 'true' }}
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-22.04, X64, small]
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coordinator-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ concurrency:

jobs:
build-and-publish:
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Coordinator build
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
env:
Expand Down
36 changes: 1 addition & 35 deletions .github/workflows/coordinator-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
COMMIT_TAG: ${{ inputs.commit_tag }}
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, medium]
name: Coordinator tests
steps:
- name: Checkout
Expand Down Expand Up @@ -64,40 +64,6 @@ jobs:
if-no-files-found: error
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/jacocoRootReport.xml
- name: Setup .NET Core # Required to execute ReportGenerator
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
with:
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
reporttypes: MarkdownSummary
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
title: 'Kotlin Code Coverage'
- name: DeltaReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.4
with:
reports: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/*.xml'
targetdir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports'
reporttypes: MarkdownDeltaSummary
historydir: '${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports'
title: 'Kotlin Code Coverage'
- name: Upload coverage report artifact
id: upload
uses: actions/upload-artifact@v4
with:
name: CoverageReport
path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageReports
- name: Write code coverage delta to PR
uses: mshick/add-pr-comment@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
message-path: |
${{ github.workspace }}/build/reports/jacoco/jacocoRootReport/coverageDeltaReports/DeltaSummary.md
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/finalized-tag-updater-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
release:
runs-on: ubuntu-24.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ concurrency:

jobs:
run-load-test:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Run Load Test
steps:
- name: Checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
uses: ./.github/workflows/reuse-store-image-name-and-tags.yml

filter-commit-changes:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Filter commit changes
outputs:
coordinator: ${{ steps.filter.outputs.coordinator }}
Expand Down Expand Up @@ -191,7 +191,7 @@ jobs:
cleanup-deployments:
needs: [ run-e2e-tests, run-e2e-tests-geth-tracing ]
if: ${{ always() }}
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- uses: strumwolf/delete-deployment-environment@v2
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maven-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on:

jobs:
release:
runs-on: ubuntu-24.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postman-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ concurrency:

jobs:
build-and-publish:
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Postman build
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postman-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
run-tests:
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Postman & SDK tests
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/prover-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ env:

jobs:
build-and-publish:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Prover build
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
jobs:

build-linux:
runs-on: ubuntu-24.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand Down Expand Up @@ -117,7 +117,7 @@ jobs:
release_artefacts:
name: Release artefacts
needs: [ build-linux, build-linux-arm64, build-mac-os]
runs-on: besu-arm64
runs-on: [self-hosted,ubuntu-22.04ARM64, small]
steps:
- name: Load cached binaries
uses: actions/download-artifact@v4
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/prover-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ concurrency:

jobs:
staticcheck:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Prover static check
steps:
- name: install Go
Expand Down Expand Up @@ -58,8 +58,7 @@ jobs:
strategy:
matrix:
go-version: [1.23.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
runs-on: [self-hosted, ubuntu-22.04, X64, medium]
name: Prover testing
needs:
- staticcheck
Expand Down Expand Up @@ -90,7 +89,7 @@ jobs:
go test -p=1 -tags=nocorset,fuzzlight -timeout=30m ./...
- name: Test (32 bits & race)
working-directory: prover
if: (matrix.os == 'ubuntu-latest') && (matrix.go-version == '1.20.x')
if: matrix.go-version == '1.20.x'
run: |
go test -p=1 -tags=nocorset,fuzzlight -timeout=30m -short -race ./...
Expand All @@ -100,7 +99,7 @@ jobs:
needs:
- staticcheck
- test
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Notify slack -- workflow failed
id: slack
Expand All @@ -123,7 +122,7 @@ jobs:
needs:
- staticcheck
- test
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: Notify slack -- workflow succeeded
id: slack
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/reuse-check-images-tags-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ concurrency:

jobs:
check_image_tags_exist:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Check image tags exist
outputs:
last_commit_tag_exists_coordinator: ${{ steps.check_image_tags_exist_coordinator.outputs.last_commit_tag_exists }}
Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:
docker_password: ${{ secrets.DOCKERHUB_TOKEN }}

image_tag_push:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Tag and push images
needs: [ check_image_tags_exist ]
outputs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse-run-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets._GITHUB_TOKEN_RELEASE_ACCESS }}
outputs:
tests_outcome: ${{ steps.run_e2e_tests.outcome }}
runs-on: ubuntu-22.04
runs-on: [self-hosted, ubuntu-22.04, X64, medium]
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
steps:
- name: Setup upterm session
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse-store-image-name-and-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ concurrency:

jobs:
store_image_name_and_tags:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Compute version tags
env:
# REF_NAME: ${{ github.ref_name }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reuse-tag-without-untested-suffix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:

jobs:
tag-without-untested-suffix:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: tag without untested suffix
strategy:
matrix:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/run-smc-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:

jobs:
run-contract-tests:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Run smart contracts tests
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -61,7 +61,7 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}

solidity-format-check:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Solidity format check
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-report-to-csv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Export Security Report to CSV
on: workflow_dispatch
jobs:
data_gathering:
runs-on: ubuntu-20.04
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- name: CSV export
uses: advanced-security/ghas-to-csv@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:

jobs:
stale:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
steps:
- uses: actions/stale@v8
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/traces-api-facade-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ concurrency:

jobs:
build-and-publish:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Traces api facade build
environment: ${{ github.ref != 'refs/heads/main' && 'docker-build-and-e2e' || '' }}
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/traces-api-facade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ concurrency:

jobs:
run-tests:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]
name: Traces api facade tests
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/valid-audit-pr-has-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
check:
runs-on: besu-arm64
runs-on: [self-hosted, ubuntu-22.04, X64, small]

steps:
- name: Checkout code
Expand Down

0 comments on commit 6ce1066

Please sign in to comment.