-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
35 lines (31 loc) · 1011 Bytes
/
Copy pathTaskfile.yml
File metadata and controls
35 lines (31 loc) · 1011 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
version: 3
vars:
BINARY_NAME: "swift-precompiler"
tasks:
build-universal:
desc: "Build universal binary"
sources:
- "src/**/*.rs"
- "Cargo.toml"
- "Cargo.lock"
- "assets/**/*"
generates:
- "target/aarch64-apple-darwin/release/{{.BINARY_NAME}}"
- "target/x86_64-apple-darwin/release/{{.BINARY_NAME}}"
- "target/{{.BINARY_NAME}}"
cmds:
- |
cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
lipo -create -output target/{{.BINARY_NAME}} target/x86_64-apple-darwin/release/{{.BINARY_NAME}} \
target/aarch64-apple-darwin/release/{{.BINARY_NAME}}
create-brew-archive:
desc: "Create archive for Homebrew"
sources:
- "target/{{.BINARY_NAME}}"
generates:
- "target/{{.BINARY_NAME}}.tar.gz"
cmds:
- |
tar -czf target/{{.BINARY_NAME}}.tar.gz target/{{.BINARY_NAME}}
sha256sum target/{{.BINARY_NAME}}.tar.gz