Skip to content

Commit 1d42b4c

Browse files
committed
action: build from freebsd
Signed-off-by: Date Huang <tjjh89017@hotmail.com>
1 parent 46a1a12 commit 1d42b4c

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
with:
7474
go-version: ${{ env.GO_VERSION }}
7575
- name: Build
76-
run: make APP=${{ env.APP}}-${{ matrix.os }}-${{ matrix.arch }}
76+
run: make APP=${{ env.APP }}-${{ matrix.os }}-${{ matrix.arch }}
7777
env:
7878
GOARCH: ${{ matrix.arch }}
7979
GOOS: ${{ matrix.os }}
@@ -82,6 +82,33 @@ jobs:
8282
name: ${{ env.APP }}-${{ matrix.os }}-${{ matrix.arch }}
8383
path: ${{ env.APP }}-${{ matrix.os }}-${{ matrix.arch }}
8484

85+
build-freebsd:
86+
name: Build FreeBSD
87+
runs-on: ubuntu-latest
88+
needs:
89+
- lint
90+
- test
91+
strategy:
92+
matrix:
93+
os: [freebsd]
94+
arch: [amd64, arm64]
95+
steps:
96+
- uses: actions/checkout@v4
97+
- name: Build in FreeBSD
98+
uses: vmactions/freebsd-vm@v1.2.1
99+
with:
100+
arch: ${{ matrix.arch }}
101+
mem: 2048
102+
cpu: 2
103+
prepare: |
104+
pkg install -y gmake go
105+
run: |
106+
gmake APP=${{ env.APP }}-${{ matrix.os }}-${{ matrix.arch }}
107+
- uses: actions/upload-artifact@v4
108+
with:
109+
name: ${{ env.APP }}-${{ matrix.os }}-${{ matrix.arch }}
110+
path: ${{ env.APP }}-${{ matrix.os }}-${{ matrix.arch }}
111+
85112
docker:
86113
if: github.event_name != 'pull_request'
87114
name: Build Docker container

0 commit comments

Comments
 (0)