Skip to content

Commit 9563c18

Browse files
authored
CI: add FreeBSD build and test (#1376)
1 parent aefb2e4 commit 9563c18

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,46 @@ jobs:
485485
working-directory: ./build
486486
run: ctest -V --output-on-failure -C ${{ matrix.build_type }}
487487

488+
freebsd:
489+
name: FreeBSD
490+
runs-on: ubuntu-latest
491+
steps:
492+
- uses: actions/checkout@v5
493+
494+
- name: Retrieve build cache
495+
uses: actions/cache/restore@v4
496+
id: restore-cache
497+
with:
498+
path: .ccache
499+
key: freebsd-${{ github.ref_name }}-${{ github.run_id }}
500+
restore-keys: freebsd
501+
502+
- name: Build and test
503+
uses: vmactions/freebsd-vm@v1
504+
with:
505+
release: "15.0"
506+
envs: CCACHE_COMPRESS CCACHE_COMPRESSLEVEL CCACHE_MAXSIZE
507+
usesh: true
508+
prepare: |
509+
pkg install -y cmake ccache
510+
run: |
511+
set -e
512+
export CCACHE_DIR=$PWD/.ccache
513+
cmake --version
514+
cmake -S . -B _build -D USE_CCACHE=ON ..
515+
cmake --build _build -j $(nproc)
516+
ccache --show-stats
517+
cd _build
518+
ctest --output-on-failure
519+
cd ..
520+
rm -rf _build
521+
522+
- name: Save build cache
523+
uses: actions/cache/save@v4
524+
with:
525+
path: .ccache
526+
key: ${{ steps.restore-cache.outputs.cache-primary-key }}
527+
488528
emscripten:
489529
name: Emscripten WASM build
490530
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)