File tree Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Expand file tree Collapse file tree 2 files changed +40
-3
lines changed Original file line number Diff line number Diff line change @@ -196,3 +196,40 @@ jobs:
196
196
run : cargo generate --path . standalone-contract --name test-contract
197
197
- name : Run all checks
198
198
run : cd test-contract && make build test check clippy
199
+
200
+ freebsd-build :
201
+
202
+ runs-on : ubuntu-latest
203
+
204
+ steps :
205
+ - uses : actions/checkout@v3
206
+ with :
207
+ submodules : true
208
+ - name : Build in FreeBSD VM
209
+ uses : vmactions/freebsd-vm@v1
210
+ with :
211
+ usesh : true
212
+ prepare : |
213
+ set -ex
214
+ pkg install -y llvm16 git gmake bash
215
+ curl https://sh.rustup.rs -sSf | sh -s -- -y
216
+ . $HOME/.cargo/env
217
+ rustup target add riscv64imac-unknown-none-elf
218
+ cargo install cargo-generate
219
+ run : |
220
+ set -ex
221
+ . $HOME/.cargo/env
222
+ cargo generate --path . standalone-contract --name test-contract
223
+ cd test-contract
224
+ gmake build test check clippy
225
+ cd ..
226
+ cargo generate --path . workspace --name test-workspace
227
+ cd test-workspace
228
+ gmake generate CRATE=clib TEMPLATE=c-wrapper-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=..
229
+ gmake generate CRATE=rlib TEMPLATE=x64-simulator-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=..
230
+ gmake generate CRATE=c1 TEMPLATE=contract TEMPLATE_TYPE=--path TEMPLATE_REPO=..
231
+ gmake generate CRATE=c2 TEMPLATE=atomics-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=..
232
+ gmake generate CRATE=c3 TEMPLATE=stack-reorder-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=..
233
+ git submodule add https://github.com/nervosnetwork/ckb-c-stdlib deps/ckb-c-stdlib
234
+ git submodule add https://github.com/xxuejie/lib-dummy-atomics deps/lib-dummy-atomics
235
+ gmake build test check clippy
Original file line number Diff line number Diff line change @@ -42,18 +42,18 @@ build:
42
42
@set -eu; \
43
43
if [ " x$( CONTRACT) " = " x" ]; then \
44
44
for contract in $( wildcard contracts/* ) ; do \
45
- make -e -C $$ contract build; \
45
+ $( MAKE ) -e -C $$ contract build; \
46
46
done ; \
47
47
else \
48
- make -e -C contracts/$(CONTRACT ) build; \
48
+ $( MAKE ) -e -C contracts/$(CONTRACT ) build; \
49
49
fi
50
50
51
51
# Run a single make task for a specific contract. For example:
52
52
#
53
53
# make run CONTRACT=stack-reorder TASK=adjust_stack_size STACK_SIZE=0x200000
54
54
TASK :=
55
55
run :
56
- make -e -C contracts/$(CONTRACT ) $(TASK )
56
+ $( MAKE ) -e -C contracts/$(CONTRACT ) $(TASK )
57
57
58
58
# test, check, clippy and fmt here are provided for completeness,
59
59
# there is nothing wrong invoking cargo directly instead of make.
You can’t perform that action at this time.
0 commit comments