Skip to content

Commit 11133f4

Browse files
authored
ci: add job to tests tools on FreeBSD 15.0 (#26377)
1 parent 836524e commit 11133f4

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

‎.github/workflows/tools_ci.yml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,52 @@ jobs:
132132
run: ./v -silent test-self cmd
133133
- name: Test tools (-cstrict)
134134
run: ./v -silent -W -cstrict test-self cmd
135+
136+
tools-freebsd:
137+
runs-on: ubuntu-latest
138+
timeout-minutes: 20
139+
strategy:
140+
matrix:
141+
cc: [tcc, gcc, clang]
142+
fail-fast: false
143+
env:
144+
VFLAGS: -cc ${{ matrix.cc }}
145+
steps:
146+
- uses: actions/checkout@v6
147+
- name: Tests tools on FreeBSD with ${{ matrix.cc }}
148+
uses: cross-platform-actions/action@v0.32.0
149+
with:
150+
operating_system: freebsd
151+
version: '15.0'
152+
memory: 4G
153+
shell: sh
154+
sync_files: runner-to-vm
155+
environment_variables: VFLAGS
156+
run: |
157+
sudo pkg install -y git sqlite3 gmake boehm-gc-threaded libiconv
158+
if [ "$VFLAGS" = "-cc gcc" ]; then
159+
sudo pkg install -y gcc
160+
fi
161+
# Mandatory: hostname not set in VM => some tests fail
162+
sudo hostname -s freebsd-ci
163+
echo "### OS infos"
164+
uname -a
165+
git config --global --add safe.directory .
166+
# Build V
167+
echo "### Build V"
168+
printf "VFLAGS = %s\n" "$VFLAGS"
169+
gmake && ./v -showcc -o v cmd/v && sudo ./v symlink && ./v doctor
170+
# Code in cmd/ is formatted
171+
echo "### Check code in cmd/ is formatted"
172+
./v fmt -verify cmd/
173+
# Check build-tools
174+
echo "### Check build tools"
175+
./v -silent -N -W -check build-tools
176+
# Test tools
177+
echo "### Test tools"
178+
./v -silent test-self cmd
179+
# Test tools (-cstrict)
180+
if [ "$VFLAGS" != "-cc tcc" ]; then
181+
echo "### Test tools (-cstrict)"
182+
./v -silent -W -cstrict test-self cmd
183+
fi

0 commit comments

Comments
 (0)