Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 21 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
- gentoo/stage3:musl-hardened
- gentoo/stage3:hardened
- freebsd
- freebsd:14.4
- freebsd:14.4:aarch64
config:
- cmake_args: "-DENABLE_API=ON -DCMAKE_C_COMPILER=gcc"
- cmake_args: "-DENABLE_API=ON -DCMAKE_C_COMPILER=clang"
Expand All @@ -43,16 +45,24 @@ jobs:
- os: debian:oldstable
config:
cmake_args: "-DENABLE_API=ON -DCMAKE_C_COMPILER=clang"
# CMake can't find Threads support using GCC
- os: freebsd:14.4:aarch64
config:
cmake_args: "-DENABLE_API=ON -DCMAKE_C_COMPILER=gcc"
- os: freebsd:14.4:aarch64
config:
cmake_args: "-DENABLE_API=ON -DCMAKE_C_COMPILER=gcc -DCMAKE_C_FLAGS=-DDATUM_API_FOR_UMBREL=ON"
extra_cflags: "-DDATUM_API_FOR_UMBREL"

runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v6

- name: Restore package cache
if: startsWith(matrix.os, 'gentoo/')
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: pkg-cache
key: never-exists
Expand Down Expand Up @@ -113,12 +123,17 @@ jobs:
}
cache_cksum > /tmp/initial-pkg-cache.cksum

cat <<\EOF >>/etc/portage/make.conf
EMERGE_DEFAULT_OPTS="$EMERGE_DEFAULT_OPTS --quiet-build y --tree"
FETCHCOMMAND="$FETCHCOMMAND --progress=dot:giga" # assumes wget default
EOF
Comment thread
luke-jr marked this conversation as resolved.

emerge --sync --quiet || true # can fail if cache is recent enough
else
emerge --sync --quiet
fi
'
INSTALL_CMD="emerge -1 sec-keys/openpgp-keys-gentoo-release && getuto && cat /etc/portage/make.conf && emerge -vuDtkg1 @world && USE='-httpsrr -perl -extra -static-analyzer compiler-rt -openmp sanitize -adns -alt-svc -ftp -hsts -http2 -http3 -imap -pop3 -progress-meter -psl -quic -curl_quic_openssl -smtp -tftp -websockets' emerge -vuDtkg1 --noreplace --jobs=\$(nproc) --buildpkg"
INSTALL_CMD="emerge -1 sec-keys/openpgp-keys-gentoo-release && getuto && cat /etc/portage/make.conf && emerge -vuDkg1 @world && USE='-httpsrr -perl -extra -static-analyzer compiler-rt -openmp sanitize -adns -alt-svc -ftp -hsts -http2 -http3 -imap -pop3 -progress-meter -psl -quic -curl_quic_openssl -smtp -tftp -websockets' emerge -vuDkg1 --noreplace --jobs=\$(nproc) --buildpkg"
PACKAGES="dev-vcs/git dev-build/cmake net-misc/curl dev-libs/jansson dev-libs/libsodium virtual/pkgconfig app-portage/gentoolkit"
[[ "${{ matrix.os }}" =~ musl ]] && PACKAGES="$PACKAGES sys-libs/argp-standalone"
PACKAGES_API="net-libs/libmicrohttpd"
Expand Down Expand Up @@ -183,7 +198,7 @@ jobs:

- name: Save package cache
if: steps.docker-build.outputs.save_cache == 'true'
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: pkg-cache
key: ${{ matrix.os }}/pkg-cache/${{ matrix.config.cmake_args }}/${{ github.sha }}
Expand All @@ -192,6 +207,8 @@ jobs:
if: startsWith(matrix.os, 'freebsd')
uses: vmactions/freebsd-vm@v1
with:
release: ${{ contains(matrix.os, ':14.4') && '14.4' || '' }}
arch: ${{ endsWith(matrix.os, ':aarch64') && 'aarch64' || '' }}
prepare: |
PACKAGES="git cmake pkgconf curl jansson libsodium libmicrohttpd argp-standalone libepoll-shim"
if echo "${{ matrix.config.cmake_args }}" | grep -q "CMAKE_C_COMPILER=gcc"; then
Expand Down