From ea7c283167c26e186f833e2a2701bdc2a0281f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Centeno?= Date: Tue, 17 Oct 2023 18:19:06 -0300 Subject: [PATCH] [CI] build precompiles (#165) Add a CI job to check that precompiles compile. --- .github/workflows/ci.yaml | 16 ++++++++++++++++ Makefile | 15 ++++++++++----- precompiles/{P256Verify.yul => P256VERIFY.yul} | 0 3 files changed, 26 insertions(+), 5 deletions(-) rename precompiles/{P256Verify.yul => P256VERIFY.yul} (100%) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index de07f37a..b7c393ed 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/Makefile b/Makefile index 092de5ad..a2a1b28e 100644 --- a/Makefile +++ b/Makefile @@ -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 && \ diff --git a/precompiles/P256Verify.yul b/precompiles/P256VERIFY.yul similarity index 100% rename from precompiles/P256Verify.yul rename to precompiles/P256VERIFY.yul