This repository was archived by the owner on Dec 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHydrunfile
executable file
·58 lines (42 loc) · 1.52 KB
/
Hydrunfile
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
#!/bin/bash
set -e
# Test
if [ "$1" = "test" ]; then
# Configure Git
git config --global --add safe.directory '*'
# Generate dependencies
make depend
# Run tests
make test
exit 0
fi
# Go
if [ "$1" = "go" ]; then
# Install native dependencies
apt update
apt install -y curl make
# Configure Git
git config --global --add safe.directory '*'
# Install bagop
curl -L -o /tmp/bagop "https://github.com/pojntfx/bagop/releases/latest/download/bagop.linux-$(uname -m)"
install /tmp/bagop /usr/local/bin
# Generate dependencies
make depend
# Build
CGO_ENABLED=0 bagop -j "$(nproc)" -b "$2" -x '(aix/*|android/*|darwin/*|dragonfly/*|freebsd/*|illumos/*|ios/*|js/*|linux/386|linux/arm|linux/arm64|linux/loong64|linux/mips|linux/mips64|linux/mips64le|linux/mipsle|linux/ppc64|linux/ppc64le|linux/riscv64|linux/s390x|netbsd/*|openbsd/*|plan9/*|solaris/*|windows/*|wasip1/wasm)' -p "make build/$2 DST=\$DST" -d out
exit 0
fi
# gccgo
if [ "$1" = "gccgo" ]; then
# Install native dependencies
apt update
apt install -y curl git
# Install bagccgop
curl -L -o /tmp/bagccgop "https://github.com/pojntfx/bagccgop/releases/latest/download/bagccgop.linux-$(uname -m)"
install /tmp/bagccgop /usr/local/bin
# Configure Git
git config --global --add safe.directory '*'
# Build
GOFLAGS='-gccgoflags=-static' bagccgop -x '(linux/alpha|linux/mipsle|linux/ppc|linux/sparc64)' -j1 -b "$2" -n -s 'make' -p "make build/$2 DST=\$DST" -d out
exit 0
fi