Skip to content

Commit 6221bea

Browse files
committed
CI: Update macOS and FreeBSD builders.
1 parent 3d95ae8 commit 6221bea

File tree

1 file changed

+60
-7
lines changed

1 file changed

+60
-7
lines changed

.github/workflows/build.yaml

+60-7
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,69 @@ jobs:
157157
if-no-files-found: error
158158
retention-days: 1
159159

160+
macos:
161+
name: macOS
162+
runs-on: macos-14
163+
strategy:
164+
matrix:
165+
include:
166+
- name: arm64
167+
flags: -arch arm64 -mmacosx-version-min=11.0
168+
- name: x86_64
169+
flags: -arch x86_64 -mmacosx-version-min=10.6
170+
steps:
171+
- name: Checkout
172+
uses: actions/checkout@v4
173+
with:
174+
fetch-depth: 1
175+
submodules: true
176+
- name: Build ${{ matrix.name }}
177+
run: |
178+
make CC=clang CFLAGS="${{ matrix.flags }}" LFLAGS="${{ matrix.flags }}" -j $(sysctl -n hw.logicalcpu)
179+
cp bin/hev-socks5-server hev-socks5-server-darwin-${{ matrix.name }}
180+
- name: Upload ${{ matrix.name }}
181+
uses: actions/upload-artifact@v4
182+
with:
183+
name: hev-socks5-server-darwin-${{ matrix.name }}
184+
path: hev-socks5-server-darwin-${{ matrix.name }}
185+
if-no-files-found: error
186+
retention-days: 1
187+
188+
freebsd:
189+
name: FreeBSD
190+
runs-on: ubuntu-22.04
191+
if: github.event_name != 'release'
192+
steps:
193+
- name: Checkout
194+
uses: actions/checkout@v4
195+
with:
196+
fetch-depth: 1
197+
submodules: true
198+
- name: Build
199+
uses: vmactions/freebsd-vm@v1
200+
with:
201+
usesh: true
202+
prepare: |
203+
pkg install -y gmake gcc
204+
run: |
205+
gmake
206+
cp bin/hev-socks5-server hev-socks5-server-freebsd-x86_64
207+
- name: Upload
208+
uses: actions/upload-artifact@v4
209+
with:
210+
name: hev-socks5-server-freebsd-x86_64
211+
path: hev-socks5-server-freebsd-x86_64
212+
if-no-files-found: error
213+
retention-days: 1
214+
160215
release:
161216
name: Release
162217
runs-on: ubuntu-22.04
163218
needs:
164219
- source
165220
- linux
221+
- macos
222+
- freebsd
166223
- windows
167224
if: github.event_name == 'release'
168225
steps:
@@ -184,8 +241,8 @@ jobs:
184241
gh release upload ${{ github.event.release.tag_name }} $i
185242
done
186243
187-
macos:
188-
name: macOS
244+
apple:
245+
name: Apple
189246
runs-on: macos-14
190247
if: github.event_name != 'release'
191248
steps:
@@ -194,11 +251,7 @@ jobs:
194251
with:
195252
fetch-depth: 1
196253
submodules: true
197-
- name: Build native
198-
run: |
199-
make
200-
make clean
201-
- name: Build cross
254+
- name: Build
202255
run: |
203256
./build-apple.sh
204257

0 commit comments

Comments
 (0)