Skip to content

Merge pull request #32 from m0rb/main #94

Merge pull request #32 from m0rb/main

Merge pull request #32 from m0rb/main #94

Workflow file for this run

name: FreeBSD Auto-Builds
on:
push:
branches:
- "main"
paths-ignore:
- .github/workflows/Linux.yml
- .github/workflows/Windows.yml
pull_request:
types: [edited, opened, synchronize]
paths-ignore:
- .github/workflows/Linux.yml
- .github/workflows/Windows.yml
workflow_dispatch:
workflow_call:
jobs:
build:
name: FreeBSD Auto-Build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [x86_64]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run build in FreeBSD VM
uses: vmactions/freebsd-vm@v1.4.2
with:
release: "15.0"
prepare: |
export IGNORE_OSVERSION=yes
# Prefer pkg-static (statically linked) to avoid dynamic lib upgrade failures.
if [ -x /usr/sbin/pkg-static ]; then
/usr/sbin/pkg-static bootstrap -f || true
attempt=0
until [ "$attempt" -ge 3 ]
do
/usr/sbin/pkg-static update -f && /usr/sbin/pkg-static install -y cmake ccache pkgconf ninja openal-soft sdl2 tree zip git && break
attempt=$((attempt+1))
echo "pkg-static install failed, retrying ($attempt/3)" >&2
sleep $((attempt * 5))
done
else
attempt=0
until [ "$attempt" -ge 3 ]
do
pkg update -f && pkg install -y cmake ccache pkgconf ninja openal-soft sdl2 tree zip git && break
attempt=$((attempt+1))
echo "pkg install failed, retrying ($attempt/3)" >&2
sleep $((attempt * 5))
done
fi
run: |
echo "::group::Configure"
mkdir -p build
cd build
cmake -G Ninja -DDEDICATED=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ../neo/
echo "::endgroup::"
echo "::group::Build"
ninja
echo "::endgroup::"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: prey2006-freebsd
path: output/freebsd/
compression-level: 6