-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc57274
commit 3bd98d3
Showing
6 changed files
with
281 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: ["master", "fix-*"] | ||
pull_request: | ||
branches: ["master"] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: wasm32-unknown-unknown | ||
components: rust-src, rustfmt, clippy | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Check format | ||
run: cargo fmt --all -- --check | ||
|
||
- name: Make dummpy poc-guest.polkavm file | ||
run: mkdir -p output; touch output/poc-guest.polkavm | ||
|
||
- name: Cargo clippy | ||
run: SKIP_WASM_BUILD= cargo clippy -- -D warnings | ||
|
||
- name: Check no-std | ||
run: make check-wasm | ||
|
||
- name: Check std | ||
run: SKIP_WASM_BUILD= cargo check | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install toolchain | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
targets: wasm32-unknown-unknown | ||
components: rustfmt, clippy | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
workspaces: poc/guest -> poc/guest/target | ||
cache-all-crates: true | ||
|
||
- name: Install toolchain targeting RV32E | ||
run: | | ||
curl -sL https://github.com/paritytech/rustc-rv32e-toolchain/releases/download/v1.1.0/rust-rve-nightly-2024-01-05-x86_64-unknown-linux-gnu.tar.zst -o rv32e.tar.zst | ||
tar --zstd -xf rv32e.tar.zst | ||
mv rve-nightly ~/.rustup/toolchains/ | ||
- name: Cargo clippy | ||
run: cd poc/guest; cargo clippy -- -D warnings | ||
|
||
- name: Install polkatool | ||
run: make polkatool | ||
|
||
- name: Generate poc-guest.polkavm | ||
run: make poc-guest | ||
|
||
- name: build host | ||
run: make poc-host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.