@@ -178,6 +178,51 @@ jobs:
178
178
run : brew install llvm@16
179
179
- name : Install coreutils
180
180
run : brew install coreutils
181
+ - name : Install docker
182
+ run : rustup target add riscv64imac-unknown-none-elf
183
+ - name : Install cargo generate
184
+ run : cargo install cargo-generate
185
+ - name : Generate workspace
186
+ run : cargo generate --path . workspace --name test-workspace
187
+ - name : Generate crates && contracts
188
+ run : cd test-workspace &&
189
+ make generate CRATE=clib TEMPLATE=c-wrapper-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
190
+ make generate CRATE=rlib TEMPLATE=x64-simulator-crate DESTINATION=crates TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
191
+ make generate CRATE=c1 TEMPLATE=contract TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
192
+ make generate CRATE=c2 TEMPLATE=atomics-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=.. &&
193
+ make generate CRATE=c3 TEMPLATE=stack-reorder-contract TEMPLATE_TYPE=--path TEMPLATE_REPO=..
194
+ - name : Submodules
195
+ run : cd test-workspace &&
196
+ git submodule add https://github.com/nervosnetwork/ckb-c-stdlib deps/ckb-c-stdlib &&
197
+ git submodule add https://github.com/xxuejie/lib-dummy-atomics deps/lib-dummy-atomics
198
+ - name : Run all checks
199
+ run : cd test-workspace && make build test check clippy
200
+ - name : Generate standalone contract
201
+ run : cargo generate --path . standalone-contract --name test-contract
202
+ - name : Run all checks
203
+ run : cd test-contract && make build test check clippy
204
+
205
+ # For now, github action's latest arm64-based macos runner does not support docker. We will have to
206
+ # Use an order version for now to test reproducible build on macOS. Maybe when macOS 15 is out we can
207
+ # re-test later.
208
+ #
209
+ # References:
210
+ # * https://github.com/orgs/community/discussions/69211
211
+ # * https://github.com/marketplace/actions/setup-docker-on-macos
212
+ macos-x64-reproducible-build :
213
+
214
+ runs-on : macos-13
215
+
216
+ steps :
217
+ - uses : actions/checkout@v3
218
+ with :
219
+ submodules : true
220
+ - name : Setup Docker on macOS
221
+ uses : douglascamata/setup-docker-macos-action@v1-alpha
222
+ - name : Install llvm 16
223
+ run : brew install llvm@16
224
+ - name : Install coreutils
225
+ run : brew install coreutils
181
226
- name : Install riscv64 target
182
227
run : rustup target add riscv64imac-unknown-none-elf
183
228
- name : Install cargo generate
0 commit comments