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