Skip to content

Commit

Permalink
[CI] build precompiles (#165)
Browse files Browse the repository at this point in the history
Add a CI job to check that precompiles compile.
  • Loading branch information
jpcenteno authored Oct 17, 2023
1 parent 23fb8d0 commit ea7c283
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,19 @@ jobs:

- name: Run clippy
run: cd tests && cargo clippy --all-targets --all-features -- -D warnings

build-precompiles:
name: "Build precompiles"
runs-on: ubuntu-latest
steps:
- name: "Build precompiles"
uses: actions/checkout@v3

- name: "Setup requirements"
run: make setup

- name: copy-precompiles
run: make copy-precompiles

- name: "Build precompiles"
run: make build-precompiles
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,16 @@ setup:
update:
git submodule update

run:
cp -r precompiles/ submodules/era-test-node/etc/system-contracts/contracts/precompiles && \
cd submodules/era-test-node && \
make build-precompiles && \
cargo run -- --show-calls=all --resolve-hashes run
.PHONY: copy-precompiles
copy-precompiles:
cp precompiles/*.yul submodules/era-test-node/etc/system-contracts/contracts/precompiles/

.PHONY: build-precompiles
build-precompiles: copy-precompiles
cd submodules/era-test-node && make build-precompiles

run: build-precompiles
cd submodules/era-test-node && cargo run -- --show-calls=all --resolve-hashes run

test:
cd tests && \
Expand Down
File renamed without changes.

0 comments on commit ea7c283

Please sign in to comment.