77 branches : [ main ]
88
99jobs :
10- build-linux :
11- runs-on : ubuntu-latest
10+ build-linux :
11+ runs-on : ubuntu-latest
1212
13- steps :
14- - uses : actions/checkout@v3
13+ steps :
14+ - uses : actions/checkout@v3
1515
16- - name : Build
17- run : make
16+ - name : Install dependencies
17+ run : sudo apt-get update && sudo apt-get install -y meson ninja-build
1818
19- - name : Run tests
20- run : make -C test
19+ - name : Build
20+ run : make
2121
22- build-macos :
23- runs-on : macos-latest
22+ - name : Run tests
23+ run : make -C test
2424
25- steps :
26- - uses : actions/checkout@v3
25+ build-macos :
26+ runs-on : macos-latest
2727
28- - name : Build
29- run : make
28+ steps :
29+ - uses : actions/checkout@v3
30+
31+ - name : Install dependencies
32+ run : brew install meson ninja
33+
34+ - name : Build
35+ run : make
36+
37+ - name : Run tests
38+ run : make -C test
39+
40+ test-make :
41+ runs-on : ${{ matrix.os }}
42+
43+ strategy :
44+ matrix :
45+ os : [ubuntu-latest, macos-latest, windows-latest]
3046
31- - name : Run tests
32- run : make -C test
47+ steps :
48+ - uses : actions/checkout@v3
3349
34- release :
50+ - name : Setup MSYS2 (Windows)
51+ if : matrix.os == 'windows-latest'
52+ uses : msys2/setup-msys2@v2
53+ with :
54+ msystem : MINGW64
55+ install : mingw-w64-x86_64-gcc mingw-w64-x86_64-zlib mingw-w64-x86_64-meson mingw-w64-x86_64-ninja
56+
57+ - name : Install dependencies (Linux)
58+ if : matrix.os == 'ubuntu-latest'
59+ run : sudo apt-get update && sudo apt-get install -y meson ninja-build
60+
61+ - name : Install dependencies (macOS)
62+ if : matrix.os == 'macos-latest'
63+ run : brew install meson ninja
64+
65+ - name : Test make build
66+ if : matrix.os != 'windows-latest'
67+ run : |
68+ make clean
69+ make
70+ ls -la mzip
71+ ./mzip --help
72+
73+ - name : Test make build (Windows)
74+ if : matrix.os == 'windows-latest'
75+ shell : msys2 {0}
76+ run : |
77+ make clean
78+ make
79+ ls -la mzip.exe
80+ ./mzip.exe --help
81+
82+ release :
3583 if : startsWith(github.ref, 'refs/tags/v')
3684 runs-on : ${{ matrix.os }}
3785
@@ -51,16 +99,24 @@ jobs:
5199 steps :
52100 - uses : actions/checkout@v3
53101
54- - name : Setup MSYS2 (Windows)
55- if : matrix.os == 'windows-latest'
56- uses : msys2/setup-msys2@v2
57- with :
58- msystem : MINGW64
59- install : mingw-w64-x86_64-gcc mingw-w64-x86_64-zlib
102+ - name : Setup MSYS2 (Windows)
103+ if : matrix.os == 'windows-latest'
104+ uses : msys2/setup-msys2@v2
105+ with :
106+ msystem : MINGW64
107+ install : mingw-w64-x86_64-gcc mingw-w64-x86_64-zlib mingw-w64-x86_64-meson mingw-w64-x86_64-ninja
60108
61- - name : Build (Linux/macOS)
62- if : matrix.os != 'windows-latest'
63- run : make
109+ - name : Install dependencies (Linux)
110+ if : matrix.os == 'ubuntu-latest'
111+ run : sudo apt-get update && sudo apt-get install -y meson ninja-build
112+
113+ - name : Install dependencies (macOS)
114+ if : matrix.os == 'macos-latest'
115+ run : brew install meson ninja
116+
117+ - name : Build (Linux/macOS)
118+ if : matrix.os != 'windows-latest'
119+ run : make
64120
65121 - name : Build (Windows)
66122 if : matrix.os == 'windows-latest'
0 commit comments