Skip to content

Commit

Permalink
CI: Update macOS and FreeBSD builders.
Browse files Browse the repository at this point in the history
  • Loading branch information
heiher committed Feb 28, 2025
1 parent 765de54 commit 059e869
Showing 1 changed file with 60 additions and 27 deletions.
87 changes: 60 additions & 27 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,69 @@ jobs:
if-no-files-found: error
retention-days: 1

macos:
name: macOS
runs-on: macos-14
strategy:
matrix:
include:
- name: arm64
flags: -arch arm64 -mmacosx-version-min=11.0
- name: x86_64
flags: -arch x86_64 -mmacosx-version-min=10.6
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Build ${{ matrix.name }}
run: |
make CC=clang CFLAGS="${{ matrix.flags }}" LFLAGS="${{ matrix.flags }}" -j $(sysctl -n hw.logicalcpu)
cp bin/hev-socks5-tunnel hev-socks5-tunnel-darwin-${{ matrix.name }}
- name: Upload ${{ matrix.name }}
uses: actions/upload-artifact@v4
with:
name: hev-socks5-tunnel-darwin-${{ matrix.name }}
path: hev-socks5-tunnel-darwin-${{ matrix.name }}
if-no-files-found: error
retention-days: 1

freebsd:
name: FreeBSD
runs-on: ubuntu-22.04
if: github.event_name != 'release'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Build
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y gmake gcc
run: |
gmake
cp bin/hev-socks5-tunnel hev-socks5-tunnel-freebsd-x86_64
- name: Upload
uses: actions/upload-artifact@v4
with:
name: hev-socks5-tunnel-freebsd-x86_64
path: hev-socks5-tunnel-freebsd-x86_64
if-no-files-found: error
retention-days: 1

release:
name: Release
runs-on: ubuntu-22.04
needs:
- source
- linux
- macos
- freebsd
if: github.event_name == 'release'
steps:
- name: Checkout
Expand All @@ -142,8 +199,8 @@ jobs:
gh release upload ${{ github.event.release.tag_name }} $i
done
macos:
name: macOS
apple:
name: Apple
runs-on: macos-14
if: github.event_name != 'release'
steps:
Expand All @@ -152,34 +209,10 @@ jobs:
with:
fetch-depth: 1
submodules: true
- name: Build native
run: |
make
make clean
- name: Build cross
- name: Build
run: |
./build-apple.sh
freebsd:
name: FreeBSD
runs-on: ubuntu-22.04
if: github.event_name != 'release'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: true
- name: Build native
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y gmake gcc
run: |
gmake
android:
name: Android
runs-on: ubuntu-22.04
Expand Down

0 comments on commit 059e869

Please sign in to comment.