-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sh
executable file
·72 lines (57 loc) · 4.18 KB
/
build.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
[[ -d "bin" ]] && rm -rf bin
mkdir bin
docker run -d \
--name qsc-builder \
-v "$(pwd):/usr/src/qsc" \
-v "$HOME/.cargo:/root/.cargo" \
-e "GITHUB_SHA=$GITHUB_SHA" \
ghcr.io/redstonewizard08/quickscript/builder:latest \
sleep infinity
# ================= Build =================
docker exec qsc-builder cargo zigbuild --target aarch64-unknown-linux-gnu
docker exec qsc-builder cargo zigbuild --target aarch64-unknown-linux-musl
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-gnueabi
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-musleabi
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-gnueabihf
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-musleabihf
docker exec qsc-builder cargo zigbuild --target x86_64-unknown-linux-gnu
docker exec qsc-builder cargo zigbuild --target x86_64-unknown-linux-musl
docker exec qsc-builder cargo zigbuild --target i686-unknown-linux-gnu
# docker exec qsc-builder cargo zigbuild --target i686-unknown-linux-musl
docker exec qsc-builder cargo zigbuild --target aarch64-unknown-linux-gnu --release
docker exec qsc-builder cargo zigbuild --target aarch64-unknown-linux-musl --release
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-gnueabi --release
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-musleabi --release
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-gnueabihf --release
# docker exec qsc-builder cargo zigbuild --target arm-unknown-linux-musleabihf --release
docker exec qsc-builder cargo zigbuild --target x86_64-unknown-linux-gnu --release
docker exec qsc-builder cargo zigbuild --target x86_64-unknown-linux-musl --release
docker exec qsc-builder cargo zigbuild --target i686-unknown-linux-gnu --release
# docker exec qsc-builder cargo zigbuild --target i686-unknown-linux-musl --release
# ================= Copy Artifacts =================
# Compiler
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-gnu/debug/qsc bin/qsc-aarch64-gnu-debug
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-musl/debug/qsc bin/qsc-aarch64-musl-debug
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-gnu/debug/qsc bin/qsc-x86_64-gnu-debug
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-musl/debug/qsc bin/qsc-x86_64-musl-debug
docker cp qsc-builder:/usr/src/qsc/target/i686-unknown-linux-gnu/debug/qsc bin/qsc-i686-gnu-debug
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-gnu/release/qsc bin/qsc-aarch64-gnu-release
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-musl/release/qsc bin/qsc-aarch64-musl-release
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-gnu/release/qsc bin/qsc-x86_64-gnu-release
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-musl/release/qsc bin/qsc-x86_64-musl-release
docker cp qsc-builder:/usr/src/qsc/target/i686-unknown-linux-gnu/release/qsc bin/qsc-i686-gnu-release
# Language Server
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-gnu/debug/qsc-lsp bin/qsc-lsp-aarch64-gnu-debug
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-musl/debug/qsc-lsp bin/qsc-lsp-aarch64-musl-debug
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-gnu/debug/qsc-lsp bin/qsc-lsp-x86_64-gnu-debug
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-musl/debug/qsc-lsp bin/qsc-lsp-x86_64-musl-debug
docker cp qsc-builder:/usr/src/qsc/target/i686-unknown-linux-gnu/debug/qsc-lsp bin/qsc-lsp-i686-gnu-debug
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-gnu/release/qsc-lsp bin/qsc-lsp-aarch64-gnu-release
docker cp qsc-builder:/usr/src/qsc/target/aarch64-unknown-linux-musl/release/qsc-lsp bin/qsc-lsp-aarch64-musl-release
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-gnu/release/qsc-lsp bin/qsc-lsp-x86_64-gnu-release
docker cp qsc-builder:/usr/src/qsc/target/x86_64-unknown-linux-musl/release/qsc-lsp bin/qsc-lsp-x86_64-musl-release
docker cp qsc-builder:/usr/src/qsc/target/i686-unknown-linux-gnu/release/qsc-lsp bin/qsc-lsp-i686-gnu-release
# ================= Clean up =================
docker stop qsc-builder
docker rm qsc-builder