12
12
jobs :
13
13
build :
14
14
name : Build for ${{ matrix.target }}
15
- runs-on : ${{ matrix.os }}
15
+ runs-on : ubuntu-latest
16
16
strategy :
17
17
matrix :
18
- include :
19
- - os : ubuntu-latest
20
- target : x86_64-unknown-linux-gnu
21
- - os : ubuntu-latest
22
- target : aarch64-apple-darwin
23
- - os : ubuntu-latest
24
- target : x86_64-apple-darwin
25
- - os : windows-latest
26
- target : x86_64-pc-windows-gnu
18
+ target :
19
+ - x86_64-unknown-linux-gnu
20
+ - aarch64-apple-darwin
21
+ - x86_64-apple-darwin
22
+ - x86_64-pc-windows-gnu
27
23
28
24
steps :
29
25
- uses : actions/checkout@v3
@@ -39,25 +35,22 @@ jobs:
39
35
uses : taiki-e/install-action@cargo-binstall
40
36
41
37
- name : Install Zig
42
- if : ${{ matrix.os != 'windows-latest' }}
43
38
uses : goto-bus-stop/setup-zig@v2
44
39
with :
45
40
version : 0.10.1
46
41
47
42
- name : Install cargo-zigbuild
48
- if : ${{ matrix.os != 'windows-latest' }}
49
43
run : cargo binstall --no-confirm cargo-zigbuild
50
44
51
45
- name : Install cargo-xwin
52
- if : ${{ matrix.os == 'windows-latest' }}
53
46
run : cargo binstall --no-confirm cargo-xwin
54
47
55
- - name : Build with cargo-zigbuild
56
- if : ${{ matrix.os != 'windows-latest' }}
48
+ - name : Build with cargo-zigbuild (non-Windows)
49
+ if : ${{ !endsWith( matrix.target, 'windows-gnu') }}
57
50
run : cargo zigbuild --target ${{ matrix.target }} --release
58
51
59
- - name : Build with cargo-xwin
60
- if : ${{ matrix.os == 'windows-latest' }}
52
+ - name : Build with cargo-xwin (Windows)
53
+ if : ${{ endsWith( matrix.target, 'windows-gnu') }}
61
54
run : cargo xwin build --target ${{ matrix.target }} --release
62
55
63
56
- name : Upload artifacts
0 commit comments