Improve CI scripts.

- Add support for skipping CI on specific platforms with commit comments.
- Add support for testing on Alpine (which uses musl instead of glibc).
- Rename "Linux CI" to "Ubuntu CI" now we test other Linux distros.
- Properly add packages to the PATH and LD_LIBRARY_PATH on macOS.
This commit is contained in:
Sadie Powell 2022-01-15 16:37:02 +00:00
parent 6c13a6c6de
commit b52983b268
5 changed files with 95 additions and 9 deletions

53
.github/workflows/ci-alpine.yml vendored Normal file
View File

@ -0,0 +1,53 @@
name: Alpine CI
on:
pull_request:
push:
schedule:
- cron: '0 0 * * 0'
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip alpine ci]')"
container: alpine:edge
runs-on: ubuntu-latest
env:
CXXFLAGS: -std=${{ matrix.standard }}
TEST_BUILD_MODULES: argon2 geo_maxmind ldap mysql pgsql regex_pcre regex_posix regex_re2 regex_stdlib regex_tre sqlite3 ssl_gnutls ssl_mbedtls ssl_openssl sslrehashsignal
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
echo "http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
apk update
apk add \
argon2-dev \
clang \
g++ \
git \
gnutls-dev \
libmaxminddb-dev \
libpq-dev \
make \
mariadb-dev \
mbedtls-dev \
openldap-dev \
openssl-dev \
pcre-dev \
perl \
pkgconf \
re2-dev \
sqlite-dev \
tre-dev
- name: Run test-build
run: |
./tools/test-build ${{ matrix.compiler }}
strategy:
fail-fast: false
matrix:
compiler:
- clang++
- g++
standard:
- gnu++98
- c++17

View File

@ -1,4 +1,4 @@
name: Linux CI
name: Ubuntu CI
on:
pull_request:
push:
@ -6,19 +6,39 @@ on:
- cron: '0 0 * * 0'
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip ubuntu ci]')"
runs-on: ubuntu-18.04
env:
CXXFLAGS: -std=${{ matrix.standard }}
TEST_BUILD_MODULES: argon2 geo_maxmind ldap mysql pgsql regex_pcre regex_posix regex_re2 regex_stdlib regex_tre sqlite3 ssl_gnutls ssl_mbedtls ssl_openssl sslrehashsignal
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update --assume-yes
sudo apt-get install --assume-yes --no-install-recommends clang g++ git make libc++-dev libc++abi-dev pkg-config
sudo apt-get install --assume-yes --no-install-recommends libargon2-0-dev libgnutls28-dev libldap2-dev libmaxminddb-dev libmbedtls-dev libmysqlclient-dev libpcre3-dev libpq-dev libre2-dev libsqlite3-dev libssl-dev libtre-dev
sudo apt-get install --assume-yes --no-install-recommends \
clang \
g++ \
git \
libargon2-dev \
libgnutls28-dev \
libldap2-dev \
libmaxminddb-dev \
libmbedtls-dev \
libmysqlclient-dev \
libpcre3-dev \
libpq-dev \
libre2-dev \
libsqlite3-dev \
libssl-dev \
libtre-dev \
make \
pkg-config
- name: Run test-build
run: ./tools/test-build ${{ matrix.compiler }}
run: |
./tools/test-build ${{ matrix.compiler }}
strategy:
fail-fast: false
matrix:

View File

@ -6,23 +6,34 @@ on:
- cron: '0 0 * * 0'
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip macos ci]')"
runs-on: macos-latest
env:
CXXFLAGS: -std=${{ matrix.standard }} -I/usr/local/opt/openssl@1.1/include -Wno-error=deprecated-declarations
LDFLAGS: -L/usr/local/opt/openssl@1.1/lib
PKG_CONFIG_PATH: /usr/local/opt/openssl@1.1/lib/pkgconfig:/usr/local/opt/sqlite/lib/pkgconfig
CXXFLAGS: -std=${{ matrix.standard }} -Wno-error=deprecated-declarations
TEST_BUILD_MODULES: argon2 geo_maxmind ldap mysql pgsql regex_pcre regex_posix regex_re2 regex_stdlib regex_tre sqlite3 ssl_gnutls ssl_mbedtls ssl_openssl sslrehashsignal
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
brew update || true
for PACKAGE in pkg-config argon2 gnutls libmaxminddb libpq mbedtls mysql-client openssl@1.1 pcre re2 sqlite tre;
do
brew install $PACKAGE || brew upgrade $PACKAGE
BREW_PREFIX=$(brew --prefix $PACKAGE)
if [ -d "$BREW_PREFIX/bin" ]
then
export PATH="$PATH:$BREW_PREFIX/bin"
fi
if [ -d "$BREW_PREFIX/lib/pkgconfig" ]
then
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$BREW_PREFIX/lib/pkgconfig"
fi
done
brew link --force --overwrite libpq
brew link --force --overwrite mysql-client
echo "PATH=$PATH" >> $GITHUB_ENV
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
- name: Run test-build
run: ./tools/test-build c++
strategy:

View File

@ -6,6 +6,7 @@ on:
- cron: '0 0 * * 0'
jobs:
build:
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

View File

@ -49,6 +49,7 @@ for my $compiler (@compilers) {
for my $socketengine (@socketengines) {
say "Attempting to build using the $compiler compiler and the $socketengine socket engine...";
my @configure_flags;
push @configure_flags, '--disable-ownership' unless $>;
if (defined $ENV{TEST_BUILD_MODULES}) {
execute "$root/configure", '--enable-extras', $ENV{TEST_BUILD_MODULES};
push @configure_flags, '--disable-auto-extras';