Skip to content

Commit 68d10a6

Browse files
GitHub workflows in self-hosted runners (#2073)
* Test self-hosted runners * Force cache rebuild * debug * Disable tmate debug * Disable concurrancy if new commits are sumbitted to same PR/branch * Debug error * Remove tmate debug * Check command output --------- Co-authored-by: Valentin Rodygin <[email protected]>
1 parent 71bdbcf commit 68d10a6

File tree

1 file changed

+26
-21
lines changed

1 file changed

+26
-21
lines changed

.github/workflows/config.yml

+26-21
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,19 @@ on:
44
push:
55
branches:
66
- master
7+
78
pull_request:
89
branches:
910
- master
1011

12+
concurrency:
13+
group: ${{ github.head_ref }}
14+
cancel-in-progress: true
15+
1116
env:
1217
# Increment these to force cache rebuilding
13-
SYSTEM_CONTRACTS_CACHE_VERSION: 2
14-
CHECKOUT_MONOREPO_CACHE_VERSION: 4
18+
SYSTEM_CONTRACTS_CACHE_VERSION: 3
19+
CHECKOUT_MONOREPO_CACHE_VERSION: 5
1520
GO_VERSION: '1.17.5'
1621
# Location where compiled system contracts are stored under the root of this
1722
# repo.
@@ -20,7 +25,7 @@ env:
2025
jobs:
2126
prepare-system-contracts:
2227
name: Build celo-monorepo
23-
runs-on: ubuntu-latest
28+
runs-on: [self-hosted, blockchain, 8-cpu]
2429
env:
2530
NODE_VERSION: 12
2631
PYTHON_VERSION: '2.7'
@@ -81,7 +86,7 @@ jobs:
8186

8287
go-modules:
8388
name: Setup go
84-
runs-on: ubuntu-latest
89+
runs-on: [self-hosted, blockchain, 8-cpu]
8590

8691
steps:
8792
- name: Checkout repo
@@ -96,7 +101,7 @@ jobs:
96101
check-imports:
97102
name: Check imports
98103
needs: go-modules
99-
runs-on: ubuntu-latest
104+
runs-on: [self-hosted, blockchain, 8-cpu]
100105

101106
steps:
102107
- name: Checkout repo
@@ -112,7 +117,7 @@ jobs:
112117

113118
lint:
114119
name: Lint code
115-
runs-on: ubuntu-latest
120+
runs-on: [self-hosted, blockchain, 8-cpu]
116121
needs: go-modules
117122

118123
steps:
@@ -129,7 +134,7 @@ jobs:
129134

130135
unit-tests:
131136
name: Unit tests
132-
runs-on: ubuntu-latest-4-cores
137+
runs-on: [self-hosted, blockchain, 8-cpu]
133138
needs:
134139
- go-modules
135140
- prepare-system-contracts
@@ -157,7 +162,7 @@ jobs:
157162
- name: Generate test report
158163
if: always()
159164
run: |
160-
go-junit-report -set-exit-code < go-test.out > report.xml
165+
go-junit-report -set-exit-code < go-test.out | tee -a report.xml
161166
- name: Test summary
162167
id: unit-tests-summary
163168
if: always()
@@ -181,7 +186,7 @@ jobs:
181186
race:
182187
name: Data race detector
183188
if: ${{ github.ref == 'refs/heads/master' || contains(github.ref, 'release') }}
184-
runs-on: ubuntu-latest-4-cores
189+
runs-on: [self-hosted, blockchain, 8-cpu]
185190
needs:
186191
- go-modules
187192
- prepare-system-contracts
@@ -218,7 +223,7 @@ jobs:
218223

219224
build-and-store-binaries:
220225
name: Build and store binaries
221-
runs-on: ubuntu-latest
226+
runs-on: [self-hosted, blockchain, 8-cpu]
222227
needs:
223228
- go-modules
224229

@@ -242,7 +247,7 @@ jobs:
242247

243248
istanbul-e2e-coverage:
244249
name: Istanbul consensus coverage
245-
runs-on: ubuntu-latest-4-cores
250+
runs-on: [self-hosted, blockchain, 8-cpu]
246251
# Needed to publish the summary PR comment
247252
permissions:
248253
pull-requests: write
@@ -291,7 +296,7 @@ jobs:
291296

292297
lightest-sync-test:
293298
name: Lightest sync test
294-
runs-on: ubuntu-latest
299+
runs-on: [self-hosted, blockchain, 8-cpu]
295300

296301
needs:
297302
- build-and-store-binaries
@@ -319,7 +324,7 @@ jobs:
319324
320325
e2e-benchmarks:
321326
name: End-to-end benchmarks
322-
runs-on: ubuntu-latest-4-cores
327+
runs-on: [self-hosted, blockchain, 8-cpu]
323328

324329
needs:
325330
- go-modules
@@ -353,7 +358,7 @@ jobs:
353358

354359
end-to-end-blockchain-parameters-test:
355360
name: End-to-end blockchain parameters test
356-
runs-on: ubuntu-latest-4-cores
361+
runs-on: [self-hosted, blockchain, 8-cpu]
357362
env:
358363
NODE_VERSION: 12
359364

@@ -399,7 +404,7 @@ jobs:
399404
400405
end-to-end-governance-test:
401406
name: End-to-end governance test
402-
runs-on: ubuntu-latest-4-cores
407+
runs-on: [self-hosted, blockchain, 8-cpu]
403408
env:
404409
NODE_VERSION: 12
405410

@@ -446,7 +451,7 @@ jobs:
446451
447452
end-to-end-sync-test:
448453
name: End-to-end sync test
449-
runs-on: ubuntu-latest-4-cores
454+
runs-on: [self-hosted, blockchain, 8-cpu]
450455
env:
451456
NODE_VERSION: 12
452457

@@ -492,7 +497,7 @@ jobs:
492497
493498
end-to-end-slashing-test:
494499
name: End-to-end slashing test
495-
runs-on: ubuntu-latest-4-cores
500+
runs-on: [self-hosted, blockchain, 8-cpu]
496501
env:
497502
NODE_VERSION: 12
498503

@@ -538,7 +543,7 @@ jobs:
538543
539544
end-to-end-transfers-test:
540545
name: End-to-end transfers test
541-
runs-on: ubuntu-latest-4-cores
546+
runs-on: [self-hosted, blockchain, 8-cpu]
542547
env:
543548
NODE_VERSION: 12
544549

@@ -584,7 +589,7 @@ jobs:
584589
585590
end-to-end-validator-order-test:
586591
name: End-to-end validator order test
587-
runs-on: ubuntu-latest-4-cores
592+
runs-on: [self-hosted, blockchain, 8-cpu]
588593
env:
589594
NODE_VERSION: 12
590595

@@ -630,7 +635,7 @@ jobs:
630635
631636
end-to-end-cip35-eth-compatibility-test:
632637
name: End-to-end CIP35-eth compatibility test
633-
runs-on: ubuntu-latest-4-cores
638+
runs-on: [self-hosted, blockchain, 8-cpu]
634639
env:
635640
NODE_VERSION: 12
636641

@@ -676,7 +681,7 @@ jobs:
676681
677682
end-to-end-replica-test:
678683
name: End-to-end replica test
679-
runs-on: ubuntu-latest-4-cores
684+
runs-on: [self-hosted, blockchain, 8-cpu]
680685
env:
681686
NODE_VERSION: 12
682687

0 commit comments

Comments
 (0)