diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 8730e3e..7e1a290 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -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