50
50
command : sudo apt install -y clang gcc-mingw-w64-x86-64 llvm-4.0-dev musl-tools
51
51
- run :
52
52
name : install-rust-deps
53
- command : rustup target add x86_64-apple-darwin && rustup target add x86_64-unknown-linux-musl && rustup target add x86_64-pc-windows-gnu
54
- - run :
55
- name : install osxcross-with-clang
56
- command : curl -O https://dark-osxcross-files.storage.googleapis.com/osxcross-with-clang.tar.gz && tar --strip-components=1 -xf osxcross-with-clang.tar.gz && rm osxcross-with-clang.tar.gz
53
+ command : rustup target add x86_64-unknown-linux-musl && rustup target add x86_64-pc-windows-gnu
57
54
- run :
58
55
name : Build all targets
59
56
command : PATH=bin:$PATH ./build --release
63
60
- target/
64
61
- run :
65
62
name : prep-artifacts
66
- command : mkdir artifacts && cp target/x86_64-apple-darwin/release/dark-cli artifacts/dark-cli-apple && cp target/x86_64-unknown-linux-musl/release/dark-cli artifacts/dark-cli-linux && cp target/x86_64-pc-windows-gnu/release/dark-cli.exe artifacts/dark-cli.exe
63
+ command : mkdir artifacts && cp target/x86_64-unknown-linux-musl/release/dark-cli artifacts/dark-cli-linux && cp target/x86_64-pc-windows-gnu/release/dark-cli.exe artifacts/dark-cli.exe
64
+ - store_artifacts :
65
+ path :
66
+ artifacts
67
+ - save_cache :
68
+ name : Cargo.lock cache
69
+ paths :
70
+ - target
71
+ key : v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
72
+ build-osx :
73
+ macos :
74
+ xcode : " 11.0.0"
75
+ steps :
76
+ - checkout
77
+ - run :
78
+ name : Install rustup
79
+ command : curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
80
+ - run :
81
+ name : Version information
82
+ command : source ~/.cargo/env; rustc --version; cargo --version; rustup --version
83
+ - run :
84
+ name : Calculate dependencies
85
+ command : source ~/.cargo/env; cargo generate-lockfile
86
+ - restore_cache :
87
+ name : Cargo.lock cache
88
+ keys :
89
+ - v1-cargo-cache-{{ arch }}-{{ checksum "Cargo.lock" }}
90
+ - run :
91
+ name : install-rust-deps
92
+ command : source ~/.cargo/env; rustup target add x86_64-apple-darwin
93
+ - run :
94
+ name : Build all targets
95
+ command : source ~/.cargo/env; ln -s $(which clang) ~/.cargo/bin/x86_64-apple-darwin15-clang ; ./build-osx --release
96
+ - persist_to_workspace :
97
+ root : .
98
+ paths :
99
+ - target/
100
+ - run :
101
+ name : prep-artifacts
102
+ command : mkdir artifacts && cp target/x86_64-apple-darwin/release/dark-cli artifacts/dark-cli-apple
67
103
- store_artifacts :
68
104
path :
69
105
artifacts
@@ -78,3 +114,4 @@ workflows:
78
114
jobs :
79
115
- test
80
116
- build
117
+ - build-osx
0 commit comments