Skip to content

Commit

Permalink
ci: use self-hosted runners
Browse files Browse the repository at this point in the history
  • Loading branch information
azahi committed Sep 4, 2024
1 parent 9c4e2e5 commit ef6641e
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 37 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

build:
runs-on: ubuntu-cpu16-ram64
runs-on: [self-hosted, ubuntu]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
Expand All @@ -33,28 +33,22 @@ jobs:
- run: |
make build
if: "env.GIT_DIFF != ''"
build-nix:
runs-on: ubuntu-cpu16-ram64
runs-on: [self-hosted, nixos]
steps:
- uses: actions/checkout@v4
- uses: haqq-network/nix-action@master
with:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
cacheKeyPostfix: ${{ hashFiles('**/go.sum') }}
- name: Build nix package
run: |
nix build .#haqq --print-build-logs
check-nix:
runs-on: ubuntu-latest
runs-on: [self-hosted, nixos]
steps:
- uses: actions/checkout@v4
- uses: haqq-network/nix-action@master
with:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
cacheKeyPostfix: ${{ hashFiles('**/go.sum') }}
- name: Check if nix package and Makefile versions match
- name: Check if Nix package and Makefile versions match
run: |
nix develop --impure .#ci --command ci-check-version
- name: Check if gomod2nix is up to date
- name: Check if gomod2nix file is up to date
run: |
nix develop --impure .#ci --command ci-check-gomod2nix
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
golangci:
name: Run golangci-lint
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
timeout-minutes: 10
steps:
- uses: actions/setup-go@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/proto-registry.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:

jobs:
push:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
steps:
- uses: actions/checkout@v4
- uses: bufbuild/[email protected]
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
proto-pass:
name: Proto Pass
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
needs:
- build
- lint
Expand All @@ -18,18 +18,15 @@ jobs:

build:
name: Check that proto builds and committed
runs-on: ubuntu-latest
runs-on: [self-hosted, nixos]
steps:
- uses: actions/checkout@v4
- uses: haqq-network/nix-action@master
with:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
- run: |
nix develop --impure #ci --command ci-proto
lint:
name: Proto lint
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
Expand All @@ -41,7 +38,7 @@ jobs:
# NOTE: This is disabled only for this merge request, it will be enabled in master branch
# break-check:
# name: Proto break-check
# runs-on: ubuntu-latest
# runs-on: [self-hosted, ubuntu]
# steps:
# - uses: actions/checkout@v4
# - uses: bufbuild/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: push

jobs:
security:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
steps:
- uses: actions/checkout@v4
- uses: snyk/actions/setup@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
stale:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
steps:
- uses: actions/stale@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-node-bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
lockfile:
runs-on: ubuntu-cpu16-ram64
runs-on: [self-hosted, nixos]
steps:
- name: Test node bootstrap
run: |
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"

install-tparse:
runs-on: ubuntu-latest
runs-on: [self-hosted, ubuntu]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -32,7 +32,7 @@ jobs:
key: ${{ runner.os }}-go-tparse-binary

test-unit:
runs-on: ubuntu-cpu16-ram64
runs-on: [self-hosted, ubuntu]
steps:
- name: Set up go
uses: actions/setup-go@v5
Expand Down Expand Up @@ -64,14 +64,11 @@ jobs:
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-nix:
runs-on: ubuntu-cpu16-ram64
runs-on: [self-hosted, nixos]
steps:
- uses: actions/checkout@v4
- uses: haqq-network/nix-action@master
with:
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
cacheKeyPostfix: ${{ hashFiles('**/go.sum') }}
- name: Run nix package tests
- name: Run Nix package tests
run: |
nix build .#haqq-with-tests --print-build-logs
4 changes: 1 addition & 3 deletions .github/workflows/update-flake-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ on:

jobs:
lockfile:
runs-on: ubuntu-latest
runs-on: [self-hosted, nixos]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main
with:
Expand Down

0 comments on commit ef6641e

Please sign in to comment.