Skip to content

Commit 84c4aeb

Browse files
authored
github runner overhaul (#3751)
- More isolated per job - Moderate speed increase - Moderate Cost reduction - Better security as jobs and tasks are fully isolated and run on ephemeral instances
1 parent 1c081a0 commit 84c4aeb

File tree

2 files changed

+41
-47
lines changed

2 files changed

+41
-47
lines changed

.github/workflows/run-tests.yml

Lines changed: 37 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,42 @@ on:
2424
- cron: '0 0 * * *'
2525

2626
jobs:
27-
preclear:
28-
runs-on: self-hosted
29-
if: always()
30-
steps:
31-
- name: 'Cleanup build folder'
32-
run: |
33-
ls -la ./
34-
rm -rf ./* || true
35-
rm -rf ./.??* || true
36-
ls -la ./
37-
3827
table_of_contents:
39-
runs-on: self-hosted
40-
needs: preclear
28+
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
4129
steps:
42-
- name: Checkout this repo
43-
uses: actions/[email protected]
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '20'
36+
cache: ''
4437
- name: Check table of contents
45-
run: sudo npm install -g [email protected] && make check_toc
38+
run: npm install -g [email protected] && make check_toc
4639

4740
codespell:
48-
runs-on: self-hosted
49-
needs: preclear
41+
runs-on: [self-hosted-ghr-custom, size-s-x64, profile-consensusSpecs]
5042
steps:
51-
- name: Checkout this repo
52-
uses: actions/[email protected]
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
- name: Setup Python
46+
uses: actions/setup-python@v5
47+
with:
48+
python-version: '3.10'
49+
cache: ''
5350
- name: Check codespell
54-
run: pip install 'codespell<3.0.0,>=2.0.0' --user && make codespell
51+
run: make codespell
5552

5653
lint:
57-
runs-on: self-hosted
58-
needs: preclear
54+
runs-on: [self-hosted-ghr-custom, size-l-x64, profile-consensusSpecs]
5955
steps:
60-
- name: Checkout this repo
61-
uses: actions/[email protected]
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
- name: Setup Python
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: '3.10'
62+
cache: ''
6263
- name: Install pyspec requirements
6364
run: make install_test
6465
- name: Run linter for pyspec
@@ -67,14 +68,19 @@ jobs:
6768
run: make lint_generators
6869

6970
pyspec-tests:
70-
runs-on: self-hosted
71-
needs: [preclear,lint,codespell,table_of_contents]
71+
runs-on: [self-hosted-ghr-custom, size-xl-x64, profile-consensusSpecs]
72+
needs: [lint,codespell,table_of_contents]
7273
strategy:
7374
matrix:
7475
version: ["phase0", "altair", "bellatrix", "capella", "deneb", "electra", "whisk", "eip7594"]
7576
steps:
76-
- name: Checkout this repo
77-
uses: actions/[email protected]
77+
- name: Checkout repository
78+
uses: actions/checkout@v4
79+
- name: Setup Python
80+
uses: actions/setup-python@v5
81+
with:
82+
python-version: '3.10'
83+
cache: ''
7884
- name: set TEST_PRESET_TYPE
7985
if: github.event.inputs.test_preset_type != ''
8086
run: |
@@ -95,20 +101,8 @@ jobs:
95101
run: make install_test
96102
- name: test-${{ matrix.version }}
97103
run: make citest fork=${{ matrix.version }} TEST_PRESET_TYPE=${{env.spec_test_preset_type}}
98-
- uses: actions/upload-artifact@v3
104+
- uses: actions/upload-artifact@v4
99105
if: always()
100106
with:
101-
name: test-${{ matrix.version }}
107+
name: test-reports-${{ matrix.version }}
102108
path: tests/core/pyspec/test-reports
103-
104-
cleanup:
105-
runs-on: self-hosted
106-
needs: [preclear,pyspec-tests,codespell,lint,table_of_contents]
107-
if: always()
108-
steps:
109-
- name: 'Cleanup build folder'
110-
run: |
111-
ls -la ./
112-
rm -rf ./* || true
113-
rm -rf ./.??* || true
114-
ls -la ./

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,13 @@ pyspec:
107107

108108
# check the setup tool requirements
109109
preinstallation:
110-
python3 -m venv venv; . venv/bin/activate; \
110+
python3 -m venv venv && \
111+
. venv/bin/activate && \
111112
python3 -m pip install -r requirements_preinstallation.txt
112113

113-
# installs the packages to run pyspec tests
114114
install_test: preinstallation
115-
python3 -m venv venv; . venv/bin/activate; \
116-
python3 -m pip install -e .[lint]; python3 -m pip install -e .[test]
115+
. venv/bin/activate && \
116+
python3 -m pip install -e .[lint,test]
117117

118118
# Testing against `minimal` or `mainnet` config by default
119119
test: pyspec

0 commit comments

Comments
 (0)