Skip to content

Build in a FreeBSD VM #11

Build in a FreeBSD VM

Build in a FreeBSD VM #11

Workflow file for this run

# __ __ _
# ___\ \/ /_ __ __ _| |_
# / _ \\ /| '_ \ / _` | __|
# | __// \| |_) | (_| | |_
# \___/_/\_\ .__/ \__,_|\__|
# |_| XML parser
#
# Copyright (c) 2025 Sebastian Pipping <[email protected]>
# Licensed under the MIT license:
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the
# following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
# USE OR OTHER DEALINGS IN THE SOFTWARE.
name: Build in a FreeBSD VM
on:
pull_request:
push:
schedule:
- cron: '0 2 * * 5' # Every Friday at 2am
workflow_dispatch:
permissions:
contents: read
jobs:
freebsd:
name: Build in a FreeBSD VM
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- uses: vmactions/freebsd-vm@05856381fab64eeee9b038a0818f6cec649ca17a # v1.2.3
with:
release: "14.3"
usesh: true
prepare: |
set -e -x
pkg install -y \
autoconf \
automake \
bash \
cmake \
libtool
run: |
set -e -x
compile_flags='-Wall -Wextra -pedantic -O1 -pipe'
export CFLAGS="-std=c99 ${compile_flags}"
export CXXFLAGS="-std=c++11 ${compile_flags}"
cc -v
c++ -v
cd expat
./buildconf.sh
# 1 of 2: GNU Autotools build system
mkdir build_autotools
cd build_autotools
../configure
make -j2 CFLAGS="${CFLAGS} -Werror"
make check CFLAGS="${CFLAGS} -Werror" CXXFLAGS="${CXXLAGS} -Werror"
make install DESTDIR="${PWD}/ROOT/"
find ROOT/
cd ..
# 2 of 2: CMake build system
mkdir build_cmake
cd build_cmake
cmake -S .. -B . -DEXPAT_WARNINGS_AS_ERRORS:BOOL=ON
make -j2 VERBOSE=1
make test VERBOSE=1
make install DESTDIR="${PWD}/ROOT/"
find ROOT/
cd ..