Skip to content

Commit daba5b2

Browse files
committed
Create FreeBSD build target
1 parent 6ea7368 commit daba5b2

File tree

2 files changed

+69
-3
lines changed

2 files changed

+69
-3
lines changed

.github/workflows/build.yml

+43-3
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
- name: Upload debug symbols
6464
uses: actions/upload-artifact@v3
6565
with:
66-
name: debug-Linux${{matrix.bits}}${{matrix.flags}}${{matrix.android}}
66+
name: debug-linux${{matrix.bits}}${{matrix.flags}}${{matrix.android}}
6767
path: |
6868
build_hl2/**/*.debug
6969
@@ -88,17 +88,57 @@ jobs:
8888
- name: Upload build
8989
uses: actions/upload-artifact@v3
9090
with:
91-
name: macOS--64bits${{matrix.flags}}${{matrix.android}}
91+
name: macOS--64bits${{matrix.flags}}
9292
path: |
9393
build_hl2
9494
!build_hl2/**/*.dSYM
9595
- name: Upload debug symbols
9696
uses: actions/upload-artifact@v3
9797
with:
98-
name: debug-macOS--64bits${{matrix.flags}}${{matrix.android}}
98+
name: debug-macOS--64bits${{matrix.flags}}
9999
path: |
100100
build_hl2/**/*.dSYM
101101
102+
build-freebsd:
103+
strategy:
104+
fail-fast: false
105+
matrix:
106+
flags: ['', '-d']
107+
runs-on: macos-12
108+
steps:
109+
- uses: actions/checkout@v3
110+
with:
111+
submodules: recursive
112+
113+
- name: Build freebsd-amd64
114+
uses: vmactions/freebsd-vm@v0
115+
with:
116+
usesh: true # default is tcsh until 14.0
117+
mem: 2048
118+
envs: 'WAF_FLAGS'
119+
prepare: |
120+
pkg ins -y python sdl2 freetype2 fontconfig curl pkgconf openal-soft jpeg-turbo png libedit
121+
run: |
122+
freebsd-version -kru
123+
echo ////////// Configure //////////
124+
./waf configure --64bits ${{ matrix.flags }} $WAF_FLAGS
125+
echo ////////// Build //////////
126+
./waf install --strip-to-file
127+
rm -rf .waf* build/ scripts/waifulib/__pycache__/ # because it copies back
128+
- name: Upload build
129+
uses: actions/upload-artifact@v3
130+
with:
131+
name: freebsd--64bits${{matrix.flags}}
132+
path: |
133+
build_hl2
134+
!build_hl2/**/*.debug
135+
- name: Upload debug symbols
136+
uses: actions/upload-artifact@v3
137+
with:
138+
name: debug-freebsd--64bits${{matrix.flags}}${{matrix.android}}
139+
path: |
140+
build_hl2/**/*.debug
141+
102142
build-windows:
103143
strategy:
104144
fail-fast: false

.github/workflows/tests.yml

+26
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,32 @@ jobs:
5959
cd build_tests
6060
DYLD_LIBRARY_PATH=bin/ ./unittest
6161
62+
tests-freebsd:
63+
runs-on: macos-12
64+
steps:
65+
- uses: actions/checkout@v3
66+
with:
67+
submodules: recursive
68+
69+
- name: Build freebsd-amd64
70+
uses: vmactions/freebsd-vm@v0
71+
with:
72+
usesh: true # default is tcsh until 14.0
73+
mem: 2048
74+
envs: 'WAF_FLAGS'
75+
prepare: |
76+
pkg ins -y python
77+
run: |
78+
freebsd-version -kru
79+
echo ////////// Configure //////////
80+
./waf configure --64bits ${{ matrix.flags }} $WAF_FLAGS
81+
echo ////////// Build //////////
82+
./waf install
83+
rm -rf .waf* build/ scripts/waifulib/__pycache__/ # because it copies back
84+
echo ////////// Run tests //////////
85+
cd build_tests
86+
LD_LIBRARY_PATH=bin/ ./unittest
87+
6288
tests-windows:
6389
strategy:
6490
matrix:

0 commit comments

Comments
 (0)