|
2 | 2 | on: |
3 | 3 | push: |
4 | 4 | branches: |
5 | | - - "**" |
| 5 | + - "wasix*" |
6 | 6 | pull_request: |
7 | 7 | workflow_call: |
8 | 8 | jobs: |
|
12 | 12 | - name: show git config |
13 | 13 | run: | |
14 | 14 | env |
15 | | - cat ~/.config/git/config || true |
| 15 | + cat ~/.config/git/config || true |
16 | 16 | cat ~/.gitconfig || true |
17 | 17 | ls -lha ./wasix-libc || true |
18 | 18 |
|
@@ -69,17 +69,23 @@ jobs: |
69 | 69 | needs: build-libc |
70 | 70 | strategy: |
71 | 71 | matrix: |
72 | | - os: [ubuntu-latest-8-cores, macos-12, windows-latest-8-cores] |
73 | | - arch: [x86, aarch64] |
74 | | - exclude: |
75 | | - - os: windows-latest-8-cores |
76 | | - arch: aarch64 |
77 | | - - os: windows-latest-8-cores |
78 | | - arch: aarch64 |
79 | | - - os: ubuntu-latest-8-cores |
80 | | - arch: aarch64 |
81 | | - - os: ubuntu-latest-8-cores |
| 72 | + include: |
| 73 | + - name: Windows (x86) |
| 74 | + os: windows-latest-8-cores |
| 75 | + arch: x86 |
| 76 | + |
| 77 | + - name: Ubuntu (x86) |
| 78 | + os: ubuntu-latest-8-cores |
| 79 | + arch: x86 |
| 80 | + |
| 81 | + - name: Mac (x86) |
| 82 | + os: macos-12-large |
| 83 | + arch: x86 |
| 84 | + |
| 85 | + - name: Mac (aarch64) |
| 86 | + os: macos-13-xlarge |
82 | 87 | arch: aarch64 |
| 88 | + |
83 | 89 | runs-on: ${{ matrix.os }} |
84 | 90 | steps: |
85 | 91 | - name: Install Rust |
@@ -189,40 +195,29 @@ jobs: |
189 | 195 |
|
190 | 196 | # Mac - aarch64 |
191 | 197 |
|
192 | | - # Not running this on GitHub Actions yet, because the underlying runners use x86_64 and not aarch64. |
193 | | - # This results in a cross-compile, which results in an erroneous build. |
194 | | - |
195 | | - # TODO: Come back to this and enable it once GitHub Actions supports aarch64 runners. |
196 | | - |
197 | | - # - name: Build (Mac Os, aarch64) |
198 | | - # shell: bash |
199 | | - # if: contains(matrix.os, 'macos-12') && matrix.arch == 'aarch64' |
200 | | - # env: |
201 | | - # WASIX_NO_UPDATE_REPOS: "1" |
202 | | - # GITHUB_ACTIONS: "false" |
203 | | - # WASIX_COMPONENTS: rust |
204 | | - # WASIX_RUST_HOST: aarch64-apple-darwin |
205 | | - # run: | |
206 | | - # cd cargo-wasix |
207 | | - # # NOTE: must unset GITHUB_ACTIONS env var, because Rst bootstrap checks for it. |
208 | | - # # (see bootstrap config.rs) |
209 | | - # GITHUB_ACTIONS=false WASIX_BUILD_DIR=$GITHUB_WORKSPACE cargo run -- wasix build-toolchain |
210 | | - |
211 | | - # - name: Copy wasm* builds from x86_64-apple-darwin to aarch64-apple-darwin |
212 | | - # shell: bash |
213 | | - # if: contains(matrix.os, 'macos-12') && matrix.arch == 'aarch64' |
214 | | - # run: | |
215 | | - # cp -r wasix-rust/build/x86_64-apple-darwin/stage2/lib/rustlib/wasm* wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib |
| 198 | + - name: Build (Mac Os, aarch64) |
| 199 | + shell: bash |
| 200 | + if: contains(matrix.os, 'macos') && matrix.arch == 'aarch64' |
| 201 | + env: |
| 202 | + WASIX_NO_UPDATE_REPOS: "1" |
| 203 | + GITHUB_ACTIONS: "false" |
| 204 | + WASIX_COMPONENTS: rust |
| 205 | + WASIX_RUST_HOST: aarch64-apple-darwin |
| 206 | + run: | |
| 207 | + cd cargo-wasix |
| 208 | + # NOTE: must unset GITHUB_ACTIONS env var, because Rst bootstrap checks for it. |
| 209 | + # (see bootstrap config.rs) |
| 210 | + GITHUB_ACTIONS=false WASIX_BUILD_DIR=$GITHUB_WORKSPACE cargo run -- wasix build-toolchain |
216 | 211 |
|
217 | | - # - name: Archive build output (Mac OS - aarch64) |
218 | | - # uses: actions/upload-artifact@v3 |
219 | | - # if: contains(matrix.os, 'macos-12') && matrix.arch == 'aarch64' |
220 | | - # with: |
221 | | - # name: rust-toolchain-aarch64-apple-darwin |
222 | | - # path: | |
223 | | - # wasix-rust/build/aarch64-apple-darwin/stage2 |
224 | | - # !wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib/src |
225 | | - # !wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib/rustc-src |
| 212 | + - name: Archive build output (Mac OS - aarch64) |
| 213 | + uses: actions/upload-artifact@v3 |
| 214 | + if: contains(matrix.os, 'macos') && matrix.arch == 'aarch64' |
| 215 | + with: |
| 216 | + name: rust-toolchain-aarch64-apple-darwin |
| 217 | + path: | |
| 218 | + wasix-rust/build/aarch64-apple-darwin/stage2 |
| 219 | + !wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib/src |
| 220 | + !wasix-rust/build/aarch64-apple-darwin/stage2/lib/rustlib/rustc-src |
226 | 221 |
|
227 | 222 | # Windows |
228 | 223 |
|
|
0 commit comments