Skip to content

Commit 86f4ec1

Browse files
authored
Setup Debian CI (#3)
* Update rust.yml * Update rust.yml * Update rust.yml * Update rust.yml * Update rust.yml * Update rust.yml
1 parent b9b0cfa commit 86f4ec1

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/rust.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,48 @@ jobs:
4242
- name: Run all checks
4343
run: cd test-contract && make build test check clippy
4444

45+
debian-build:
46+
47+
runs-on: ubuntu-latest
48+
container:
49+
image: debian:latest
50+
env:
51+
USER: ${{ github.actor }}
52+
53+
steps:
54+
- name: Install dependencies
55+
run: apt-get update && apt-get -y install curl git build-essential pkg-config libssl-dev lsb-release wget software-properties-common gnupg
56+
- name: Install llvm 16
57+
run: wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh 16 && rm llvm.sh
58+
- uses: actions-rust-lang/setup-rust-toolchain@v1
59+
with:
60+
components: clippy
61+
target: riscv64imac-unknown-none-elf
62+
- uses: actions/checkout@v3
63+
with:
64+
submodules: true
65+
- name: Install cargo generate
66+
run: cargo install cargo-generate
67+
- name: Generate workspace
68+
run: cargo generate --path . workspace --name test-workspace
69+
- name: Generate crates && contracts
70+
run: cd test-workspace &&
71+
make generate CRATE=clib TEMPLATE=c-wrapper-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
72+
make generate CRATE=rlib TEMPLATE=x64-simulator-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
73+
make generate CRATE=c1 TEMPLATE=contract TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
74+
make generate CRATE=c2 TEMPLATE=atomics-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
75+
make generate CRATE=c3 TEMPLATE=stack-reorder-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=..
76+
- name: Submodules
77+
run: cd test-workspace &&
78+
git submodule add https://github.com/nervosnetwork/ckb-c-stdlib deps/ckb-c-stdlib &&
79+
git submodule add https://github.com/xxuejie/lib-dummy-atomics deps/lib-dummy-atomics
80+
- name: Run all checks
81+
run: cd test-workspace && make build test check clippy
82+
- name: Generate standalone contract
83+
run: cargo generate --path . standalone-contract --name test-contract
84+
- name: Run all checks
85+
run: cd test-contract && make build test check clippy
86+
4587
fedora-build:
4688

4789
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)