Skip to content

Commit 6d2ce02

Browse files
authored
Add build substrate and subkey binaries for MacOS (#5538)
1 parent 2056678 commit 6d2ce02

File tree

1 file changed

+21
-13
lines changed

1 file changed

+21
-13
lines changed

.gitlab-ci.yml

+21-13
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ check-line-width:
138138
interruptible: true
139139
allow_failure: true
140140

141-
142-
143-
144141
check-polkadot-companion-build:
145142
stage: build
146143
<<: *docker-env
@@ -149,7 +146,6 @@ check-polkadot-companion-build:
149146
interruptible: true
150147
allow_failure: true
151148

152-
153149
cargo-audit:
154150
stage: test
155151
<<: *docker-env
@@ -181,7 +177,6 @@ cargo-check-benches:
181177
- BUILD_DUMMY_WASM_BINARY=1 time cargo +nightly check --benches --all
182178
- sccache -s
183179

184-
185180
cargo-check-subkey:
186181
stage: test
187182
<<: *docker-env
@@ -192,7 +187,6 @@ cargo-check-subkey:
192187
- BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
193188
- sccache -s
194189

195-
196190
test-linux-stable: &test-linux
197191
stage: test
198192
<<: *docker-env
@@ -361,6 +355,14 @@ test-full-crypto-feature:
361355
- time cargo +nightly build --verbose --no-default-features --features full_crypto
362356
- sccache -s
363357

358+
cargo-check-macos:
359+
stage: test
360+
<<: *docker-env
361+
script:
362+
- BUILD_DUMMY_WASM_BINARY=1 time cargo check --release
363+
- sccache -s
364+
tags:
365+
- osx
364366

365367
#### stage: build
366368

@@ -391,32 +393,39 @@ build-linux-substrate: &build-binary
391393
echo "${CI_COMMIT_TAG}" | tee ./artifacts/substrate/VERSION;
392394
else
393395
./artifacts/substrate/substrate --version |
394-
sed -n -r 's/^substrate ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p' |
396+
sed -n -E 's/^substrate ([0-9.]+.*-[0-9a-f]{7,13})-.*$/\1/p' |
395397
tee ./artifacts/substrate/VERSION;
396398
fi
397399
- sha256sum ./artifacts/substrate/substrate | tee ./artifacts/substrate/substrate.sha256
398400
- printf '\n# building node-template\n\n'
399401
- ./.maintain/node-template-release.sh ./artifacts/substrate/substrate-node-template.tar.gz
400-
- cp -r .maintain/docker/substrate.Dockerfile ./artifacts/substrate/
401402
- sccache -s
403+
402404

403-
build-linux-subkey:
405+
build-linux-subkey: &build-subkey
404406
<<: *build-binary
405407
before_script:
406408
- mkdir -p ./artifacts/subkey
407409
script:
408-
- cd ./bin/utils/subkey
410+
- cd ./bin/utils/subkey
409411
- BUILD_DUMMY_WASM_BINARY=1 time cargo build --release --verbose
410412
- cd -
411413
- mv ./target/release/subkey ./artifacts/subkey/.
412414
- echo -n "Subkey version = "
413415
- ./artifacts/subkey/subkey --version |
414-
sed -n -r 's/^subkey ([0-9.]+.*)/\1/p' |
416+
sed -n -E 's/^subkey ([0-9.]+.*)/\1/p' |
415417
tee ./artifacts/subkey/VERSION;
416418
- sha256sum ./artifacts/subkey/subkey | tee ./artifacts/subkey/subkey.sha256
417-
- cp -r .maintain/docker/subkey.Dockerfile ./artifacts/subkey/
418419
- sccache -s
419420

421+
build-macos-subkey:
422+
<<: *build-subkey
423+
only:
424+
- master
425+
- /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1
426+
tags:
427+
- osx
428+
420429
build-rust-doc-release:
421430
stage: build
422431
<<: *docker-env
@@ -445,7 +454,6 @@ check-polkadot-companion-status:
445454
- ./.maintain/gitlab/check_polkadot_companion_status.sh
446455

447456

448-
449457
trigger-contracts-ci:
450458
stage: publish
451459
needs:

0 commit comments

Comments
 (0)