File tree 3 files changed +35
-9
lines changed
3 files changed +35
-9
lines changed Original file line number Diff line number Diff line change @@ -7,28 +7,28 @@ platform:
7
7
8
8
steps :
9
9
- name : build
10
- image : ziglang/static-base:llvm12-aarch64-3
10
+ image : ziglang/static-base:llvm12-aarch64-5
11
11
commands :
12
12
- ./ci/drone/linux_script_build
13
13
14
14
- name : test-1
15
15
depends_on :
16
16
- build
17
- image : ziglang/static-base:llvm12-aarch64-3
17
+ image : ziglang/static-base:llvm12-aarch64-5
18
18
commands :
19
19
- ./ci/drone/linux_script_test 1
20
20
21
21
- name : test-2
22
22
depends_on :
23
23
- build
24
- image : ziglang/static-base:llvm12-aarch64-3
24
+ image : ziglang/static-base:llvm12-aarch64-5
25
25
commands :
26
26
- ./ci/drone/linux_script_test 2
27
27
28
28
- name : test-3
29
29
depends_on :
30
30
- build
31
- image : ziglang/static-base:llvm12-aarch64-3
31
+ image : ziglang/static-base:llvm12-aarch64-5
32
32
commands :
33
33
- ./ci/drone/linux_script_test 3
34
34
38
38
- test-1
39
39
- test-2
40
40
- test-3
41
- image : ziglang/static-base:llvm12-aarch64-3
41
+ image : ziglang/static-base:llvm12-aarch64-5
42
42
environment :
43
43
SRHT_OAUTH_TOKEN :
44
44
from_secret : SRHT_OAUTH_TOKEN
Original file line number Diff line number Diff line change 2
2
3
3
. ./ci/drone/linux_script_base
4
4
5
- apk update
6
- apk add samurai
5
+ PREFIX=" /deps/local"
6
+ ZIG=" $PREFIX /bin/zig"
7
+ TARGET=" $TRIPLEARCH -linux-musl"
8
+ MCPU=" baseline"
9
+
10
+ export CC=" $ZIG cc -target $TARGET -mcpu=$MCPU "
11
+ export CXX=" $ZIG c++ -target $TARGET -mcpu=$MCPU "
12
+ export AR=" $ZIG ar"
13
+ export RANLIB=" $ZIG ranlib"
7
14
8
15
# Make the `zig version` number consistent.
9
16
# This will affect the cmake command below.
@@ -13,6 +20,25 @@ git fetch --tags
13
20
14
21
mkdir build
15
22
cd build
16
- cmake .. -DCMAKE_BUILD_TYPE=Release " -DCMAKE_INSTALL_PREFIX=$DISTDIR " -DZIG_STATIC=ON -DCMAKE_PREFIX_PATH=/deps/local -GNinja
23
+ cmake .. \
24
+ -DCMAKE_INSTALL_PREFIX=" $DISTDIR " \
25
+ -DCMAKE_PREFIX_PATH=" $PREFIX " \
26
+ -DCMAKE_BUILD_TYPE=Release \
27
+ -DZIG_TARGET_TRIPLE=" $TARGET " \
28
+ -DZIG_TARGET_MCPU=" $MCPU " \
29
+ -DZIG_STATIC=ON \
30
+ -DCMAKE_CROSSCOMPILING=True \
31
+ -DCMAKE_SYSTEM_NAME=Linux \
32
+ -GNinja
33
+
34
+ # Now CMake will use Zig as the C/C++ compiler. We reset the environment variables
35
+ # so that installation and testing do not get affected by them.
36
+ unset CC
37
+ unset CXX
38
+ samu install
17
39
40
+ # Here we rebuild Zig but this time using the Zig binary we just now produced to
41
+ # build zig1.o rather than relying on the one built with stage0. See
42
+ # https://github.com/ziglang/zig/issues/6830 for more details.
43
+ cmake .. -DZIG_EXECUTABLE=" $DISTDIR /bin/zig"
18
44
samu install
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if [ -n "$DRONE_PULL_REQUEST" ]; then
7
7
fi
8
8
9
9
apk update
10
- apk add py3-pip xz perl-utils jq curl samurai
10
+ apk add py3-pip perl-utils jq curl
11
11
pip3 install s3cmd
12
12
13
13
cd build
You can’t perform that action at this time.
0 commit comments