Skip to content

Commit

Permalink
Merge pull request #253 from radvd-project/robbat2/20250102-gha-perm
Browse files Browse the repository at this point in the history
ci: improve GHA workflows
  • Loading branch information
robbat2 authored Jan 22, 2025
2 parents d5fac01 + df54057 commit 47fb747
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/bsd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,31 @@ on:
- '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
uses: vmactions/freebsd-vm@v1
# CodeQL security: uses should use an immutable tag or hash for untrusted actions, "@v1" may mutate
uses: vmactions/freebsd-vm@v1.1.7
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: |
pkg update
pkg install -y autoconf automake bison flex pkgconf
set -e # exit on any failure below
set -x # show each step
./autogen.sh
./configure
make -j $(nproc)
make -j $(nproc) dist-xz
make -j $(nproc) install
./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
3 changes: 3 additions & 0 deletions .github/workflows/buildroot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- 'v*'
workflow_dispatch:

permissions:
contents: read

jobs:
buildroot:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
- 'v*'
workflow_dispatch:

permissions:
contents: read

jobs:
alpine:
strategy:
Expand Down
4 changes: 1 addition & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ AM_CONDITIONAL(HAVE_STACK_PROTECTOR, test x"$with_stack_protector" = xyes)

AC_ARG_WITH([check], AS_HELP_STRING([--without-check], [Build without check unit testing framework]),[],[with_check=no])
AS_IF([test "x$with_check" = "xyes"], [
AS_IF([test "x$arch" = "xlinux"], [
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
])
PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
])
AM_CONDITIONAL(HAVE_CHECK, test x"$with_check" = xyes)

Expand Down

0 comments on commit 47fb747

Please sign in to comment.