@@ -11,25 +11,73 @@ jobs:
1111 runs-on : ubuntu-latest
1212
1313 steps :
14- - uses : actions/checkout@v3
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
21+
22+ - name : Run tests
23+ run : make -C test
2124
2225 build-macos :
2326 runs-on : macos-latest
2427
2528 steps :
26- - uses : actions/checkout@v3
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 }}
2742
28- - name : Build
29- run : make
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
49+
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
3381
3482 release :
3583 if : startsWith(github.ref, 'refs/tags/v')
@@ -49,28 +97,37 @@ jobs:
4997 ext : .exe
5098
5199 steps :
52- - uses : actions/checkout@v3
53-
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
60-
61- - name : Build (Linux/macOS)
62- if : matrix.os != 'windows-latest'
63- run : make
64-
65- - name : Build (Windows)
66- if : matrix.os == 'windows-latest'
67- shell : msys2 {0}
68- run : make
69-
70- - name : Upload Release Asset
71- uses : softprops/action-gh-release@v1
72- with :
73- files : mzip${{ matrix.ext }}
74- name : mzip-${{ matrix.name }}${{ matrix.ext }}
75- env :
76- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100+ - uses : actions/checkout@v3
101+
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
108+
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
120+
121+ - name : Build (Windows)
122+ if : matrix.os == 'windows-latest'
123+ shell : msys2 {0}
124+ run : make
125+
126+ - name : Upload Release Asset
127+ uses : softprops/action-gh-release@v1
128+ with :
129+ files : mzip${{ matrix.ext }}
130+ name : mzip-${{ matrix.name }}${{ matrix.ext }}
131+ env :
132+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
133+
0 commit comments