@@ -15,84 +15,76 @@ permissions:
15
15
# Sets permission policy for `GITHUB_TOKEN`
16
16
contents : read
17
17
jobs :
18
- aarch64-macos-debug :
19
- runs-on : macos-13-xlarge
20
- env :
21
- ARCH : " aarch64"
22
- TARGET : " aarch64-macos-none"
23
- CACHE_BASENAME : " zig+llvm+lld+clang-aarch64-macos-none-0.14.0-dev.1622+2ac543388"
24
- MCPU : " baseline"
25
- BUILD_TYPE : " Debug"
18
+ build :
19
+ runs-on : big-ubuntu
20
+ strategy :
21
+ matrix :
22
+ target :
23
+ - x86_64-macos-none
24
+ - x86_64-linux-musl
25
+ - x86_64-windows-gnu
26
+ - aarch64-macos-none
27
+ - aarch64-linux-musl
26
28
steps :
27
- - name : Checkout
28
- uses : actions/checkout@v4
29
- - name : Cache Zig toolchain
30
- uses : actions/cache@v4
29
+ - run : sudo apt-get install -y ninja-build
30
+ - uses : actions/checkout@v4
31
31
with :
32
- path : ${{ runner.home }}/${{ env.CACHE_BASENAME }}
33
- key : ${{ env.CACHE_BASENAME }}
34
- restore-keys : |
35
- ${{ env.CACHE_BASENAME }}
36
- - name : Install Ninja
37
- run : brew install ninja
38
- - name : Build
39
- run : ci/macos.sh
40
- - name : Upload Artifact
41
- uses : actions/upload-artifact@v4
32
+ repository : ziglang/zig-bootstrap
33
+ ref : 50d8e88ba329b5d58a212f9fd2e9b1ad59a88e7d
34
+ - run : rm -rf zig
35
+ - uses : actions/checkout@v4
42
36
with :
43
- name : aarch64-macos-debug
44
- path : build/stage3/bin/zig
45
- aarch64-macos-release :
46
- runs-on : macos-13-xlarge
47
- env :
48
- ARCH : " aarch64"
49
- TARGET : " aarch64-macos-none"
50
- CACHE_BASENAME : " zig+llvm+lld+clang-aarch64-macos-none-0.14.0-dev.1622+2ac543388"
51
- MCPU : " baseline"
52
- BUILD_TYPE : " Release"
53
- steps :
54
- - name : Checkout
55
- uses : actions/checkout@v4
56
- - name : Cache Zig toolchain
57
- uses : actions/cache@v4
58
- with :
59
- path : ${{ runner.home }}/${{ env.CACHE_BASENAME }}
60
- key : ${{ env.CACHE_BASENAME }}
61
- restore-keys : |
62
- ${{ env.CACHE_BASENAME }}
63
- - name : Install Ninja
64
- run : brew install ninja
65
- - name : Build
66
- run : ci/macos.sh
67
- - name : Upload Artifact
68
- uses : actions/upload-artifact@v4
37
+ path : zig
38
+ - run : sed -i 's/ZIG_VERSION="0.14.0-dev.2257+e6d2e1641"/ZIG_VERSION="0.14.0-dev.2987+183bb8b08"/' build
39
+ - run : cat build
40
+ - run : CMAKE_GENERATOR=Ninja ./build ${{ matrix.target }} baseline
41
+ - uses : actions/upload-artifact@v4
69
42
with :
70
- name : aarch64-macos-release
71
- path : build/stage3/bin/zig
72
- x86_64-macos-release :
73
- runs-on : macos-13-large
74
- env :
75
- ARCH : " x86_64"
76
- TARGET : " x86_64-macos-none"
77
- CACHE_BASENAME : " zig+llvm+lld+clang-x86_64-macos-none-0.14.0-dev.1622+2ac543388"
78
- MCPU : " baseline"
79
- BUILD_TYPE : " Release"
43
+ name : bootstrap-${{ matrix.target }}
44
+ path : out/zig-${{ matrix.target }}-baseline
45
+ release :
46
+ needs : build
47
+ permissions :
48
+ contents : write
49
+ runs-on : big-ubuntu
80
50
steps :
81
- - name : Checkout
82
- uses : actions/checkout@v4
83
- - name : Cache Zig toolchain
84
- uses : actions/cache@v4
51
+ - uses : actions/checkout@v4
85
52
with :
86
- path : ${{ runner.home }}/${{ env.CACHE_BASENAME }}
87
- key : ${{ env.CACHE_BASENAME }}
88
- restore-keys : |
89
- ${{ env.CACHE_BASENAME }}
90
- - name : Install Ninja
91
- run : brew install ninja
92
- - name : Build
93
- run : ci/macos.sh
94
- - name : Upload Artifact
95
- uses : actions/upload-artifact@v4
53
+ repository : zigtools/zls
54
+ ref : d746d19a27729c519c58581838e17e733d35444d
55
+ - uses : actions/download-artifact@v4
56
+ - name : chmod
57
+ run : |
58
+ chmod +x bootstrap-x86_64-macos-none/zig
59
+ chmod +x bootstrap-x86_64-linux-musl/zig
60
+ chmod +x bootstrap-x86_64-windows-gnu/zig.exe
61
+ chmod +x bootstrap-aarch64-macos-none/zig
62
+ chmod +x bootstrap-aarch64-linux-musl/zig
63
+ - name : Build ZLS
64
+ run : |
65
+ ./bootstrap-x86_64-linux-musl/zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-macos-none --prefix . --prefix-exe-dir ./bootstrap-x86_64-macos-none &
66
+ ./bootstrap-x86_64-linux-musl/zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux-musl --prefix . --prefix-exe-dir ./bootstrap-x86_64-linux-musl &
67
+ ./bootstrap-x86_64-linux-musl/zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-windows-gnu --prefix . --prefix-exe-dir ./bootstrap-x86_64-windows-gnu &
68
+ ./bootstrap-x86_64-linux-musl/zig build -Doptimize=ReleaseSafe -Dtarget=aarch64-macos-none --prefix . --prefix-exe-dir ./bootstrap-aarch64-macos-none &
69
+ ./bootstrap-x86_64-linux-musl/zig build -Doptimize=ReleaseSafe -Dtarget=aarch64-linux-musl --prefix . --prefix-exe-dir ./bootstrap-aarch64-linux-musl &
70
+ wait
71
+ - name : Compress artifacts
72
+ run : |
73
+ zip -r bootstrap-x86_64-macos-none.zip bootstrap-x86_64-macos-none &
74
+ zip -r bootstrap-x86_64-linux-musl.zip bootstrap-x86_64-linux-musl &
75
+ zip -r bootstrap-x86_64-windows-gnu.zip bootstrap-x86_64-windows-gnu &
76
+ zip -r bootstrap-aarch64-macos-none.zip bootstrap-aarch64-macos-none &
77
+ zip -r bootstrap-aarch64-linux-musl.zip bootstrap-aarch64-linux-musl &
78
+ wait
79
+ - name : Release
80
+ uses : softprops/action-gh-release@v1
81
+ id : release
96
82
with :
97
- name : x86_64-macos-release
98
- path : build/stage3/bin/zig
83
+ generate_release_notes : true
84
+ tag_name : " autobuild-${{github.sha}}"
85
+ files : |
86
+ bootstrap-x86_64-macos-none.zip
87
+ bootstrap-x86_64-linux-musl.zip
88
+ bootstrap-x86_64-windows-gnu.zip
89
+ bootstrap-aarch64-macos-none.zip
90
+ bootstrap-aarch64-linux-musl.zip
0 commit comments