Skip to content

Commit 56e615e

Browse files
chore(ci): only install a native build toolchain for PyPy jobs (#3171)
Co-authored-by: spencer <spencer.tb@ethereum.org>
1 parent 49a20ed commit 56e615e

12 files changed

Lines changed: 34 additions & 40 deletions

File tree

.github/actions/build-evmone/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,10 @@ runs:
6666
with:
6767
cmake-version: '3.x'
6868

69-
- name: Install GMP Linux
69+
- name: Install build dependencies Linux
7070
if: runner.os == 'Linux' && steps.cache-restore.outputs.cache-hit != 'true'
7171
shell: bash
72-
run: sudo apt-get -q update && sudo apt-get -qy install libgmp-dev
72+
run: sudo apt-get -q update && sudo apt-get -qy install build-essential libgmp-dev
7373

7474
- name: Install GMP macOS
7575
if: runner.os == 'macOS' && steps.cache-restore.outputs.cache-hit != 'true'

.github/actions/build-fixtures/action.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ runs:
2828
- uses: ./.github/actions/setup-uv
2929
with:
3030
enable-cache: "false"
31-
- uses: ./.github/actions/setup-env
3231
- name: Install EEST
3332
shell: bash
3433
run: uv sync --no-progress
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Setup PyPy Build Toolchain
2+
description: |
3+
Install the native toolchain needed to build sdists for PyPy jobs.
4+
Several dependencies publish no PyPy wheels and are built from source:
5+
libcst needs Rust; pycryptodome, PyYAML, regex, and MarkupSafe need a C
6+
compiler. CPython jobs install wheels only and must not use this action.
7+
runs:
8+
using: "composite"
9+
steps:
10+
- name: Install C and Rust toolchains
11+
shell: bash
12+
run: |
13+
sudo apt-get -q update
14+
sudo DEBIAN_FRONTEND=noninteractive apt-get -qy install build-essential rustup
15+
rustup update --no-self-update 1.89.0 && rustup default 1.89.0

.github/actions/setup-env/action.yaml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.github/workflows/hive-consume.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,6 @@ jobs:
161161
with:
162162
cache-dependency-glob: "execution-specs/uv.lock"
163163

164-
- name: Setup environment
165-
if: matrix.mode == 'dev'
166-
uses: ./execution-specs/.github/actions/setup-env
167-
168164
- name: Load cached Docker images
169165
uses: ./execution-specs/.github/actions/load-docker-images
170166

.github/workflows/hive-execute.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,6 @@ jobs:
7171
with:
7272
cache-dependency-glob: "execution-specs/uv.lock"
7373

74-
- name: Setup environment
75-
uses: ./execution-specs/.github/actions/setup-env
76-
7774
- name: Load cached Docker images
7875
uses: ./execution-specs/.github/actions/load-docker-images
7976

.github/workflows/test.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ jobs:
3737
- name: Ensure SHA pinned actions
3838
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@70c4af2ed5282c51ba40566d026d6647852ffa3e # v5.0.1
3939
- uses: ./.github/actions/setup-uv
40-
- name: Install build dependencies
41-
shell: bash
42-
run: sudo DEBIAN_FRONTEND=noninteractive apt-get install --yes --force-yes build-essential pkg-config
4340
- name: Detect Python version
4441
id: python
4542
shell: bash
@@ -99,7 +96,6 @@ jobs:
9996
- uses: ./.github/actions/setup-uv
10097
with:
10198
python-version: "3.14"
102-
- uses: ./.github/actions/setup-env
10399
- name: Run fill (${{ matrix.label }})
104100
run: >
105101
just fill --from ${{ matrix.from_fork }} --until ${{ matrix.until_fork }}
@@ -121,7 +117,7 @@ jobs:
121117
- uses: ./.github/actions/setup-uv
122118
with:
123119
python-version: "pypy3.11"
124-
- uses: ./.github/actions/setup-env
120+
- uses: ./.github/actions/setup-env-pypy
125121
- name: Run fill-pypy tests
126122
run: just fill-pypy
127123
env:
@@ -136,7 +132,6 @@ jobs:
136132
- uses: ./.github/actions/setup-uv
137133
with:
138134
python-version: "3.14"
139-
- uses: ./.github/actions/setup-env
140135
- name: Fill and run json-loader tests
141136
run: just json-loader
142137
env:
@@ -156,7 +151,6 @@ jobs:
156151
- uses: ./.github/actions/setup-uv
157152
with:
158153
python-version: "3.14"
159-
- uses: ./.github/actions/setup-env
160154
- name: Run spec-tools tests
161155
run: just spec-tools
162156
env:
@@ -168,7 +162,6 @@ jobs:
168162
steps:
169163
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
170164
- uses: ./.github/actions/setup-uv
171-
- uses: ./.github/actions/setup-env
172165
- uses: ./.github/actions/build-evmone
173166
- name: Run test-tests
174167
run: just test-tests
@@ -183,7 +176,7 @@ jobs:
183176
- uses: ./.github/actions/setup-uv
184177
with:
185178
python-version: "pypy3.11"
186-
- uses: ./.github/actions/setup-env
179+
- uses: ./.github/actions/setup-env-pypy
187180
- uses: ./.github/actions/build-evmone
188181
- name: Run test-tests-pypy
189182
run: just test-tests-pypy

Justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ deadcode:
6464
format-check *args:
6565
uv run ruff format --check "$@"
6666

67-
# Run type checking with mypy
67+
# Run type checking with mypy (installs the optimized dependency group)
6868
[group('static analysis')]
6969
typecheck *args:
70-
uv run mypy "$@"
70+
uv run --group optimized mypy "$@"
7171

7272
# Check EELS import isolation
7373
[group('static analysis')]

docs/dev/deps_and_packaging.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ Development dependencies are grouped into `[dependency-groups]`, one group per c
6161
Groups defined by the specs package:
6262

6363
- `test`, `lint`, `actionlint`, `doc`, `mkdocs`.
64-
- `dev` includes all of the above plus the `optimized` extra.
64+
- `dev` includes all of the above.
65+
- `optimized` pulls in the `optimized` extra for the sync tool. It is not part of `dev` because `ethash` has no CPython 3.14 wheels and would require a C toolchain to install; enable it with `uv sync --group optimized` when needed.
6566

6667
Groups defined by the testing package:
6768

docs/specs/writing_specs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ The following must be updated manually afterwards:
161161

162162
The sync tool uses an RPC provider to fetch and validate blocks against EELS. The validated state can be stored in a local DB. Because syncing directly with the specs is very slow, the sync tool can also leverage the `ethereum_optimized` module, which contains alternative implementations of routines in EELS optimized for speed rather than clarity/readability.
163163

164-
Invoke the tool with `ethereum-spec-sync`. Arguments:
164+
Invoke the tool with `uv run --group optimized ethereum-spec-sync` (the `optimized` dependency group provides the `ethereum_optimized` module). Arguments:
165165

166166
- `rpc-url`: Endpoint providing the Ethereum RPC API. Defaults to `http://localhost:8545/`.
167167
- `unoptimized`: Don't use the optimized state/ethash (this can be extremely slow).

0 commit comments

Comments
 (0)