Skip to content

Commit 6d86e11

Browse files
committed
Release 0.1.0
1 parent 62d3202 commit 6d86e11

2 files changed

Lines changed: 84 additions & 26 deletions

File tree

.github/workflows/ci.yml

Lines changed: 82 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,79 @@ on:
77
branches: [ main ]
88

99
jobs:
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'

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ all: mzip
88

99
mzip: main.c mzip.c mzip.h config.h
1010
meson build && ninja -C build
11+
# Ensure a convenient top-level binary exists for quick invocation
12+
cp -f build/mzip ./mzip
1113

1214
install:
1315
mkdir -p $(DESTDIR)$(BINDIR)

0 commit comments

Comments
 (0)