CI: Update and add rule for cancelling jobs already running #220
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'meson.build' | |
- 'compat/**' | |
- 'include/**' | |
- 'src/**' | |
- '.github/workflows/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'meson.build' | |
- 'compat/**' | |
- 'include/**' | |
- 'src/**' | |
- '.github/workflows/**' | |
jobs: | |
glibc: | |
runs-on: ubuntu-latest | |
container: | |
image: "fedora:latest" | |
steps: | |
- name: dependencies | |
run: | | |
sudo dnf install -y gcc gcc-c++ flex bison meson ninja-build make libedit-devel libcurl-devel libxo-devel openssl-devel | |
- uses: actions/checkout@v4 | |
- name: build and check | |
run: | | |
meson setup build --buildtype=debug | |
ninja -C build -v | |
meson test -C build -v | |
musl: | |
runs-on: ubuntu-latest | |
container: | |
image: "alpine:latest" | |
steps: | |
- name: dependencies | |
run: | | |
apk add curl git libtool autoconf automake make patch gcc musl-dev linux-headers g++ meson flex bison libedit-dev openssl-dev musl-fts-dev acl-dev | |
- name: libxo | |
run: | | |
# installed separately | |
apk add bsd-compat-headers | |
VER="$(git ls-remote --tag https://github.com/Juniper/libxo | grep -E "\/[0-9\.]+$" | rev | cut -d '/' -f 1 | rev | sort -n | tail -n 1)" | |
curl -k -f -L -O https://github.com/Juniper/libxo/releases/download/${VER}/libxo-${VER}.tar.gz | |
tar -xf libxo-${VER}.tar.gz | |
cd libxo-${VER} | |
# remove this once it's merged and a new release includes it | |
curl -k -f -L -O https://github.com/Juniper/libxo/pull/82.patch | |
[ -f 82.patch ] && patch -p1 < 82.patch | |
./configure --prefix=/usr/local | |
make V=1 | |
make V=1 install | |
# make sure it does not interfere with bsdutils | |
apk del bsd-compat-headers | |
- name: rpmatch for musl | |
run: | | |
git clone https://github.com/pullmoll/musl-rpmatch | |
cd musl-rpmatch | |
./bootstrap.sh | |
./configure --prefix=/usr/local | |
make | |
make install | |
- uses: actions/checkout@v4 | |
- name: build and check | |
run: | | |
meson setup build --werror --buildtype=debug -Drpmatch_path=/usr/local/lib | |
ninja -C build -v | |
meson test -C build -v |