aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorDoug Freed <dwfreed@mtu.edu>2022-04-16 15:15:05 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2022-04-16 15:15:15 -0500
commitc3545b54f3330d97e06599f97c91ab73e9892f83 (patch)
tree3d4d91542f17f229f334b3bf86b44007d519c023 /.github/workflows
parentfdfa6dbb0e69742029d53f0e163b8e7e7e6860f5 (diff)
simplify github workflows using the matrix syntax
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci-alpine-linux.yml22
-rw-r--r--.github/workflows/ci-ubuntu.yml36
2 files changed, 22 insertions, 36 deletions
diff --git a/.github/workflows/ci-alpine-linux.yml b/.github/workflows/ci-alpine-linux.yml
index 3c5fb06d..e50c9765 100644
--- a/.github/workflows/ci-alpine-linux.yml
+++ b/.github/workflows/ci-alpine-linux.yml
@@ -4,12 +4,19 @@ on: [push, pull_request]
jobs:
- gcc-musl:
+ alpine:
+ name: Alpine Linux
runs-on: ubuntu-latest
container: alpine:latest
+ strategy:
+ fail-fast: false
+ matrix:
+ compiler:
+ - gcc
+ env:
+ CC: ${{ matrix.compiler }}
steps:
- - name: install deps
- run: >-
+ - run: >-
apk --no-cache add \
build-base \
meson \
@@ -18,14 +25,7 @@ jobs:
linux-pam-dev \
libcap \
libcap-dev
- - name: checkout
- uses: actions/checkout@v2
+ - uses: actions/checkout@v2
- run: meson setup builddir/
- env:
- CC: gcc
- run: meson compile -C builddir
- env:
- CC: gcc
- run: meson test --verbose -C builddir
- env:
- CC: gcc
diff --git a/.github/workflows/ci-ubuntu.yml b/.github/workflows/ci-ubuntu.yml
index 1be9f0c5..ceb36cef 100644
--- a/.github/workflows/ci-ubuntu.yml
+++ b/.github/workflows/ci-ubuntu.yml
@@ -4,35 +4,21 @@ on: [push, pull_request]
jobs:
- gcc-glibc:
+ ubuntu:
+ name: Ubuntu
runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ compiler:
+ - gcc
+ - clang
+ env:
+ CC: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update -q
- - run: sudo apt-get install -q -y build-essential libpam-dev meson libcap-dev
+ - run: sudo apt-get install -q -y build-essential libpam-dev meson libcap-dev ${CC}
- run: meson setup builddir/
- env:
- CC: gcc
- run: ninja -C builddir
- env:
- CC: gcc
- run: ninja test --verbose -C builddir
- env:
- CC: gcc
-
-
- clang-glibc:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - run: sudo apt-get update -q
- - run: sudo apt-get install -q -y build-essential clang libpam-dev meson libcap-dev
- - run: meson setup builddir/
- env:
- CC: clang
- - run: ninja -C builddir
- env:
- CC: clang
- - run: ninja test --verbose -C builddir
- env:
- CC: clang