ci: improve GHA workflows #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: BSD | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
freebsd: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Build | |
# CodeQL security: uses should use an immutable tag or hash for untrusted actions, "@v1" may mutate | |
uses: vmactions/[email protected] | |
with: | |
# BSD make -j has a mandatory argument | |
# Linux make -j means infinite jobs | |
prepare: | | |
pkg install -y autoconf automake bison flex pkgconf devel/check check | |
run: | | |
set -e # exit on any failure below | |
set -x # show each step | |
./autogen.sh | |
./configure --with-check || exit 1 | |
make -j $(nproc) all || exit 1 | |
make -j $(nproc) check || exit 1 | |
make -j $(nproc) dist-xz || exit 1 | |
make -j $(nproc) install || exit 1 |