tangled
alpha
login
or
join now
altagos.dev
/
austin-converter
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
ci: add build workflow
altagos.dev
8 months ago
d7540cf3
812a65d7
verified
This commit was signed with the committer's
known signature
.
altagos.dev
SSH Key Fingerprint:
SHA256:UbTjEcCZlc6GzQWLCuDK3D//HESWD2xFPkzue9XMras=
0/1
build.yaml
failed
23s
+70
2 changed files
expand all
collapse all
unified
split
.tangled
workflows
build.yaml
scripts
install-zig.sh
+21
.tangled/workflows/build.yaml
···
1
1
+
when:
2
2
+
- event: ["push", "pull_request"]
3
3
+
branch: ["main"]
4
4
+
- event: ["manual"]
5
5
+
6
6
+
dependencies:
7
7
+
## from nixpkgs
8
8
+
nixpkgs:
9
9
+
- curl
10
10
+
- jq
11
11
+
12
12
+
steps:
13
13
+
- name: "Install zig"
14
14
+
command: "./scripts/install-zig.sh"
15
15
+
- name: "Build ReleaseFast"
16
16
+
command: "./zig/zig build -Doptimize=ReleaseFast"
17
17
+
18
18
+
clone:
19
19
+
skip: false
20
20
+
depth: 1
21
21
+
submodules: true
+49
scripts/install-zig.sh
···
1
1
+
#!/bin/bash
2
2
+
3
3
+
JSON=$(curl -s https://ziglang.org/download/index.json)
4
4
+
5
5
+
# Determine the architecture:
6
6
+
if [ "$(uname -m)" = 'arm64' ] || [ "$(uname -m)" = 'aarch64' ]; then
7
7
+
ZIG_ARCH="aarch64"
8
8
+
else
9
9
+
ZIG_ARCH="x86_64"
10
10
+
fi
11
11
+
12
12
+
# Determine the operating system:
13
13
+
case "$(uname)" in
14
14
+
Linux)
15
15
+
ZIG_OS="linux"
16
16
+
;;
17
17
+
Darwin)
18
18
+
ZIG_OS="macos"
19
19
+
;;
20
20
+
CYGWIN*)
21
21
+
ZIG_OS="windows"
22
22
+
;;
23
23
+
*)
24
24
+
echo "Unknown OS"
25
25
+
exit 1
26
26
+
;;
27
27
+
esac
28
28
+
29
29
+
ZIG_TARGET="$ZIG_ARCH-$ZIG_OS"
30
30
+
31
31
+
URL=$(echo "$JSON" | jq -r ".master.\"$ZIG_TARGET\".tarball")
32
32
+
EXPECTED_SHA=$(echo "$JSON" | jq -r ".master.\"$ZIG_TARGET\".shasum")
33
33
+
34
34
+
curl -O "$URL"
35
35
+
36
36
+
ACTUAL_SHA=$(shasum -a 256 zig*.tar.xz | awk '{print $1}')
37
37
+
if [ "$EXPECTED_SHA" != "$ACTUAL_SHA" ]; then
38
38
+
echo "SHA checksum verification failed."
39
39
+
echo "Expected: $EXPECTED_SHA"
40
40
+
echo "Actual: $ACTUAL_SHA"
41
41
+
exit 1
42
42
+
fi
43
43
+
44
44
+
if [ ! -d "zig" ]; then
45
45
+
mkdir zig
46
46
+
fi
47
47
+
48
48
+
tar -xf zig*.tar.xz -C zig --strip-components=1
49
49
+
rm zig*.tar.xz