Skip to content

Commit

Permalink
Update CI (#8) (latchset#129)
Browse files Browse the repository at this point in the history
* Clean up this messed up pull.  CentOS Stream 9 seems to work with clang and since changes would be needed to deal with clang in SCL for CentOS 7 it's pretty clear that never worked although the gcc build seems fine.

* Add optional dependencies to ensure everything possible builds. And add "setup" to avoid meson warning.
  • Loading branch information
hdholm authored Jan 17, 2024
1 parent 58112df commit 253549a
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ jobs:
- clang
os:
- fedora:latest
- quay.io/centos/centos:stream8
- quay.io/centos/centos:stream9
- quay.io/centos/centos:stream8
- debian:testing
- debian:latest
- ubuntu:rolling
- ubuntu:jammy
- ubuntu:focal
stable:: [true]
include:
- compiler: gcc
Expand All @@ -33,6 +35,9 @@ jobs:
- compiler: clang
os: ubuntu:devel
stable: false
- compiler: gcc
os: centos:7
stable: true
steps:
- uses: actions/checkout@v3

Expand All @@ -48,7 +53,7 @@ jobs:
mkdir -p build && cd build
export ninja=$(command -v ninja)
[ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
meson .. || cat meson-logs/meson-log.txt >&2
meson setup .. || cat meson-logs/meson-log.txt >&2
${ninja}
- name: Run tests
Expand Down Expand Up @@ -95,7 +100,7 @@ jobs:
mkdir -p build && cd build
export ninja=$(command -v ninja)
[ -z "${ninja}" ] && export ninja=$(command -v ninja-build)
CFLAGS=-I$(brew --prefix openssl)/include LDFLAGS=-L$(brew --prefix openssl)/lib PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig meson .. || cat meson-logs/meson-log.txt >&2
CFLAGS=-I$(brew --prefix openssl)/include LDFLAGS=-L$(brew --prefix openssl)/lib PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig meson setup .. || cat meson-logs/meson-log.txt >&2
${ninja}
- name: Run tests
Expand Down
20 changes: 14 additions & 6 deletions .github/workflows/install-dependencies
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh -ex

COMMON="meson curl git file bzip2 ${CC}"
COMMON="meson curl git file bzip2 asciidoc jq ${CC}"

case "${DISTRO}" in
osx:*)
Expand Down Expand Up @@ -30,14 +30,22 @@ debian:*|ubuntu:*)
dnf -y install ${COMMON} pkgconfig openssl-devel zlib-devel jansson-devel
;;

*centos:*)
centos:7)
yum -y clean all
yum -y --setopt=deltarpm=0 update
yum install -y yum-utils epel-release
yum config-manager -y --set-enabled crb \
|| yum config-manager -y --set-enabled powertools || :
yum -y --allowerasing install ${COMMON}
yum install -y yum-utils epel-release centos-release-scl llvm-toolset-7
yum -y install ${COMMON}
yum-builddep -y jose
;;

*centos:stream*)
dnf -y clean all
dnf -y --allowerasing --setopt=deltarpm=0 update
dnf install -y yum-utils epel-release
dnf config-manager -y --set-enabled crb \
|| dnf config-manager -y --set-enabled powertools || :
dnf -y --allowerasing install ${COMMON}
dnf builddep -y jose
;;
esac
# vim: set ts=8 shiftwidth=4 softtabstop=4 expandtab smarttab colorcolumn=80:
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Decryption failed!
Building Jose is fairly straightforward:

$ mkdir build && cd build
$ meson .. --prefix=/usr
$ meson setup .. --prefix=/usr
$ ninja
$ sudo ninja install

Expand All @@ -123,9 +123,9 @@ You can even run the tests if you'd like:
To build a FreeBSD, HardenedBSD or OPNsense package
use:

(as root) # pkg install meson pkgconf jansson openssl
(as root) # pkg install meson pkgconf jansson openssl jq
$ mkdir build && cd build
$ meson .. --prefix=/usr/local
$ meson setup .. --prefix=/usr/local
$ ninja
$ meson test
(as root) # ninja install
Expand Down

0 comments on commit 253549a

Please sign in to comment.