Skip to content

Commit

Permalink
Update rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
xxuejie authored Jan 10, 2024
1 parent b9b0cfa commit 1cbb568
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,48 @@ jobs:
- name: Run all checks
run: cd test-contract && make build test check clippy

debian-build:

runs-on: ubuntu-latest
container:
image: debian:latest
env:
USER: ${{ github.actor }}

steps:
- name: Install dependencies
run: sudo apt-get -y install git build-essential libssl-devel
- name: Install llvm 16
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && sudo ./llvm.sh 16 && rm llvm.sh
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
target: riscv64imac-unknown-none-elf
- uses: actions/checkout@v3
with:
submodules: true
- name: Install cargo generate
run: cargo install cargo-generate
- name: Generate workspace
run: cargo generate --path . workspace --name test-workspace
- name: Generate crates && contracts
run: cd test-workspace &&
make generate CRATE=clib TEMPLATE=c-wrapper-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
make generate CRATE=rlib TEMPLATE=x64-simulator-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
make generate CRATE=c1 TEMPLATE=contract TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
make generate CRATE=c2 TEMPLATE=atomics-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
make generate CRATE=c3 TEMPLATE=stack-reorder-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=..
- name: Submodules
run: cd test-workspace &&
git submodule add https://github.com/nervosnetwork/ckb-c-stdlib deps/ckb-c-stdlib &&
git submodule add https://github.com/xxuejie/lib-dummy-atomics deps/lib-dummy-atomics
- name: Run all checks
run: cd test-workspace && make build test check clippy
- name: Generate standalone contract
run: cargo generate --path . standalone-contract --name test-contract
- name: Run all checks
run: cd test-contract && make build test check clippy

fedora-build:

runs-on: ubuntu-latest
Expand Down

0 comments on commit 1cbb568

Please sign in to comment.