77 workflow_call :
88jobs :
99 build-libc :
10- runs-on : ubuntu-latest-8-cores
10+ runs-on : ubuntu-22.04
1111 steps :
1212 - name : show git config
1313 run : |
@@ -17,10 +17,10 @@ jobs:
1717 ls -lha ./wasix-libc || true
1818
1919 - name : Check out wasix-libc
20- uses : actions/checkout@v3
20+ uses : actions/checkout@v4
2121 with :
2222 repository : wasix-org/wasix-libc
23- ref : main
23+ ref : wasm64-rust-toolchain
2424 path : wasix-libc
2525 submodules : " recursive"
2626
@@ -33,10 +33,10 @@ jobs:
3333 uses : dtolnay/rust-toolchain@stable
3434
3535 - name : Check out cargo-wasix
36- uses : actions/checkout@v3
36+ uses : actions/checkout@v4
3737 with :
3838 repository : wasix-org/cargo-wasix
39- ref : main
39+ ref : target-fix
4040 path : cargo-wasix
4141 fetch-depth : 2
4242
5757 touch $GITHUB_WORKSPACE/.stub
5858
5959 - name : Archive build output
60- uses : actions/upload-artifact@v3
60+ uses : actions/upload-artifact@v4
6161 with :
6262 name : wasix-libc
6363 path : |
@@ -71,36 +71,30 @@ jobs:
7171 matrix :
7272 include :
7373 - name : Windows (x86)
74- os : windows-latest-8-cores
74+ os : windows-latest
7575 arch : x86
7676
7777 - name : Ubuntu (x86)
78- os : ubuntu-latest-8-cores
78+ os : ubuntu-22.04
7979 arch : x86
8080
8181 - name : Mac (x86)
82- os : macos-12-large
82+ os : macos-13
8383 arch : x86
8484
8585 - name : Mac (aarch64)
86- os : macos-13-xlarge
86+ os : macos-15
8787 arch : aarch64
8888
8989 runs-on : ${{ matrix.os }}
9090 steps :
91- - name : Install Rust
92- uses : actions-rs/toolchain@v1
93- if : ${{ !contains(matrix.os, 'windows') }}
94- with :
95- toolchain : stable
96-
9791 - name : Download wasix-libc artifact
98- uses : actions/download-artifact@v3
92+ uses : actions/download-artifact@v4
9993 with :
10094 name : wasix-libc
10195
10296 - name : Check out repository code
103- uses : actions/checkout@v3
97+ uses : actions/checkout@v4
10498 with :
10599 path : wasix-rust
106100 submodules : " recursive"
@@ -121,44 +115,12 @@ jobs:
121115 # uses: dtolnay/rust-toolchain@stable
122116
123117 - name : Check out cargo-wasix
124- uses : actions/checkout@v3
118+ uses : actions/checkout@v4
125119 with :
126120 repository : wasix-org/cargo-wasix
127- ref : main
121+ ref : target-fix
128122 path : cargo-wasix
129123
130- # Linux!
131-
132- - name : Setup (Ubuntu)
133- if : matrix.arch == 'x86' && contains(matrix.os, 'ubuntu')
134- shell : bash
135- run : |
136- sudo apt-get update
137- sudo apt-get install -y build-essential curl wget xz-utils git python3 ninja-build cmake
138-
139- - name : Build (Linux)
140- if : matrix.arch == 'x86' && contains(matrix.os, 'ubuntu')
141- shell : bash
142- env :
143- WASIX_NO_UPDATE_REPOS : " 1"
144- WASIX_COMPONENTS : rust
145- WASIX_RUST_HOST : x86_64-unknown-linux-gnu
146- run : |
147- cd cargo-wasix
148- # NOTE: must unset GITHUB_ACTIONS env var, because Rst bootstrap checks for it.
149- # (see bootstrap config.rs)
150- GITHUB_ACTIONS=false WASIX_BUILD_DIR=$GITHUB_WORKSPACE cargo run -- wasix build-toolchain
151-
152- - name : Archive build output (Linux)
153- uses : actions/upload-artifact@v3
154- if : contains(matrix.os, 'ubuntu')
155- with :
156- name : rust-toolchain-x86_64-unknown-linux-gnu
157- path : |
158- wasix-rust/build/x86_64-unknown-linux-gnu/stage2
159- !wasix-rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/src
160- !wasix-rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src
161-
162124 # Mac - x86
163125
164126 - name : Setup (Mac OS)
@@ -169,9 +131,22 @@ jobs:
169131 # Need ninja for building llvm (for aarch64 cross compile)
170132 brew install ninja
171133
134+ # Interlude: install rust now. For some reason, brew install removes cargo, so
135+ # we're doing this after as it keeps mac builds happy. This is ultimately a
136+ # hack, so if anybody knows why brew install removes cargo, please fix it and
137+ # move this step back up to where it originally was.
138+
139+ - name : Install Rust
140+ uses : actions-rs/toolchain@v1
141+ if : ${{ !contains(matrix.os, 'windows') }}
142+ with :
143+ toolchain : stable
144+
145+ # Mac - continued
146+
172147 - name : Build (Mac Os, x86)
173148 shell : bash
174- if : contains(matrix.os, 'macos-12 ') && matrix.arch == 'x86'
149+ if : contains(matrix.os, 'macos-13 ') && matrix.arch == 'x86'
175150 env :
176151 WASIX_NO_UPDATE_REPOS : " 1"
177152 GITHUB_ACTIONS : " false"
@@ -184,7 +159,7 @@ jobs:
184159 GITHUB_ACTIONS=false WASIX_BUILD_DIR=$GITHUB_WORKSPACE cargo run -- wasix build-toolchain
185160
186161 - name : Archive build output (Mac OS - x86)
187- uses : actions/upload-artifact@v3
162+ uses : actions/upload-artifact@v4
188163 if : contains(matrix.os, 'macos') && matrix.arch == 'x86'
189164 with :
190165 name : rust-toolchain-x86_64-apple-darwin
@@ -210,7 +185,7 @@ jobs:
210185 GITHUB_ACTIONS=false WASIX_BUILD_DIR=$GITHUB_WORKSPACE cargo run -- wasix build-toolchain
211186
212187 - name : Archive build output (Mac OS - aarch64)
213- uses : actions/upload-artifact@v3
188+ uses : actions/upload-artifact@v4
214189 if : contains(matrix.os, 'macos') && matrix.arch == 'aarch64'
215190 with :
216191 name : rust-toolchain-aarch64-apple-darwin
@@ -219,6 +194,38 @@ jobs:
219194 !wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib/src
220195 !wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib/rustc-src
221196
197+ # Linux!
198+
199+ - name : Setup (Ubuntu)
200+ if : matrix.arch == 'x86' && contains(matrix.os, 'ubuntu')
201+ shell : bash
202+ run : |
203+ sudo apt-get update
204+ sudo apt-get install -y build-essential curl wget xz-utils git python3 ninja-build cmake
205+
206+ - name : Build (Linux)
207+ if : matrix.arch == 'x86' && contains(matrix.os, 'ubuntu')
208+ shell : bash
209+ env :
210+ WASIX_NO_UPDATE_REPOS : " 1"
211+ WASIX_COMPONENTS : rust
212+ WASIX_RUST_HOST : x86_64-unknown-linux-gnu
213+ run : |
214+ cd cargo-wasix
215+ # NOTE: must unset GITHUB_ACTIONS env var, because Rst bootstrap checks for it.
216+ # (see bootstrap config.rs)
217+ GITHUB_ACTIONS=false WASIX_BUILD_DIR=$GITHUB_WORKSPACE cargo run -- wasix build-toolchain
218+
219+ - name : Archive build output (Linux)
220+ uses : actions/upload-artifact@v4
221+ if : contains(matrix.os, 'ubuntu')
222+ with :
223+ name : rust-toolchain-x86_64-unknown-linux-gnu
224+ path : |
225+ wasix-rust/build/x86_64-unknown-linux-gnu/stage2
226+ !wasix-rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/src
227+ !wasix-rust/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/rustc-src
228+
222229 # Windows
223230
224231 # - name: Install chocolatey deps (Windows)
@@ -258,11 +265,12 @@ jobs:
258265
259266 - name : Archive build output (Windows)
260267 if : contains(matrix.os, 'windows') && matrix.arch == 'x86'
261- uses : actions/upload-artifact@v3
268+ uses : actions/upload-artifact@v4
262269 with :
263270 name : rust-toolchain-x86_64-pc-windows-msvc
264271 # name: rust-toolchain-x86_64-pc-windows-gnu
265272 path : |
266273 wasix-rust/build/x86_64-pc-windows-msvc/stage2
267274 !wasix-rust/build/x86_64-pc-windows-msvc/stage2/lib/rustlib/src
268275 !wasix-rust/build/x86_64-pc-windows-msvc/stage2/lib/rustlib/rustc-src
276+
0 commit comments