Skip to content

Commit 6feb459

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

2 files changed

Lines changed: 125 additions & 67 deletions

File tree

.github/workflows/ci.yml

Lines changed: 123 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -7,70 +7,126 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
build-linux:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- uses: actions/checkout@v3
15-
16-
- name: Build
17-
run: make
18-
19-
- name: Run tests
20-
run: make -C test
21-
22-
build-macos:
23-
runs-on: macos-latest
24-
25-
steps:
26-
- uses: actions/checkout@v3
27-
28-
- name: Build
29-
run: make
30-
31-
- name: Run tests
32-
run: make -C test
33-
34-
release:
35-
if: startsWith(github.ref, 'refs/tags/v')
36-
runs-on: ${{ matrix.os }}
37-
38-
strategy:
39-
matrix:
40-
include:
41-
- os: ubuntu-latest
42-
name: linux
43-
ext: ""
44-
- os: macos-latest
45-
name: macos
46-
ext: ""
47-
- os: windows-latest
48-
name: windows
49-
ext: .exe
50-
51-
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 }}
10+
build-linux:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Install dependencies
17+
run: sudo apt-get update && sudo apt-get install -y meson ninja-build
18+
19+
- name: Build
20+
run: make
21+
22+
- name: Run tests
23+
run: make -C test
24+
25+
build-macos:
26+
runs-on: macos-latest
27+
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]
46+
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
81+
82+
release:
83+
if: startsWith(github.ref, 'refs/tags/v')
84+
runs-on: ${{ matrix.os }}
85+
86+
strategy:
87+
matrix:
88+
include:
89+
- os: ubuntu-latest
90+
name: linux
91+
ext: ""
92+
- os: macos-latest
93+
name: macos
94+
ext: ""
95+
- os: windows-latest
96+
name: windows
97+
ext: .exe
98+
99+
steps:
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 }}

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)