Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI (#8) #129

Merged
merged 7 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
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
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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this removal necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in the commit message. CentOS 7 and Stream 9 got moved out of the first block (which uses both clang and gcc) and into the block below configured simply for gcc. clang wasn't getting installed correctly on either CentOS 7 nor Stream 9 and although it's probably some rpm/dnf magic I'm overlooking I couldn't figure it out after a little looking so it seemed better to (for the moment at least) just drop the clang compiles to get the CI tests running and hopefully someone can figure out what needs to happen to get clang happy on those two OSs.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello. Thanks for clarifying. I will open an Issue then to track the clang on CentOS Stream 9 issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why clang in Stream 9 was failing (possibly getting wrong install dependencies section) but it works now with the cleaned up version I just pushed. Only CentOS 7 seems to fail with clang and that's because clang is in the SCL in CentOS 7 and would require changes to the build to run the compiler with the SCL command. Since it's clearly never worked before and the gcc build works fine and CentOS 7 is approaching EOL, it doesn't seem worth the work to make the changes necessary for clang rather than just live with gcc there.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @hdholm. Thanks for the PR. I agree it is not that important to have clang compilation in CentOS7 right now.
In my opinion, this can be merged.

Let's wait a little bit for @sergio-correia to have a view on it and we will merge it before creating the new release.

- 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