Files
libstrophe-gh/.github/workflows/main.yml
Steffen Jaeckel 2bc34b5847 add new CI job that does a test-release
This also re-defines that `make release` does the release of all tarballs
and will run the tests against them.

Latest LibreSSL test is also marked non-essential, as it tends to fail
from time to time ...

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-02-10 11:29:57 +01:00

107 lines
2.9 KiB
YAML

name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
linux-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
configure_options:
- ""
- "--without-libxml2"
- "--with-libxml2"
- "--with-gnutls"
- "--disable-tls"
- "--enable-cares"
- "--disable-getrandom"
name: Regular Tests
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y libtool pkg-config libexpat1-dev libxml2-dev libssl-dev libgnutls28-dev libc-ares-dev
- name: Build the library
run: |
./bootstrap.sh
./configure ${{ matrix.configure_options }} CFLAGS="-Werror -g3"
make -j5
- name: Run tests
run: |
make check
libressl-tests:
runs-on: ubuntu-20.04
strategy:
matrix:
libressl_versions:
- { version: "v3.4.2", continue: true }
- { version: "v3.1.5", continue: false }
- { version: "v2.1.10", continue: false }
name: LibreSSL tests
continue-on-error: ${{ matrix.libressl_versions.continue }}
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y libtool pkg-config libexpat1-dev
- name: build&install libressl
env:
LIBRESSL_COMMIT: ${{ matrix.libressl_versions.version }}
run: |
./travis/before_script.sh
- name: Build the library
run: |
./bootstrap.sh
./configure PKG_CONFIG_PATH="${HOME}/libressl/lib/pkgconfig" CFLAGS="-Werror -g3" --prefix="${HOME}/libressl"
make -j5
- name: Run tests
run: |
make check
release-test:
runs-on: ubuntu-20.04
name: Check if release would work
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y libtool pkg-config libexpat1-dev
- name: Setup the library
run: |
./bootstrap.sh
./configure
- name: Try release & tests
run: |
make test-release
- name: Show logs from release build
if: ${{ !failure() }}
run: |
cat testbuild.log
code-style:
runs-on: ubuntu-20.04
name: Check coding style
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt update
sudo apt install -y libtool pkg-config libexpat1-dev libxml2-dev libssl-dev libgnutls28-dev libc-ares-dev dos2unix
- name: Configure
run: |
./bootstrap.sh
./configure
- name: Check style
run: |
make format
git diff --exit-code