Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.85.0
toolchain: 1.92.0
override: true

- name: Cache Rust dependencies
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/riscv64-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: RISC-V 64 Test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
qemu-riscv64:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.92.0
override: true

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-riscv64-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup RISC-V environment
run: |
sudo apt-get update -y
sudo apt install -y gcc-riscv64-linux-gnu \
qemu-user-static
rustup target add riscv64gc-unknown-linux-gnu

- name: Add RISC-V contract target
run: rustup target add riscv64imac-unknown-none-elf

- name: Build Contracts
run: |
cd demo
make build

- name: Run Tests
run: |
export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc
export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUSTFLAGS="-C link-args=-L -C link-args=/usr/lib/gcc-cross/riscv64-linux-gnu/13"
export CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER="setarch linux64 --addr-no-randomize qemu-riscv64-static -L /usr/riscv64-linux-gnu"
cargo test --release --verbose --target riscv64gc-unknown-linux-gnu
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
Loading
Loading