simplify github workflows using the matrix syntax

This commit is contained in:
Doug Freed 2022-04-16 15:15:05 -05:00 committed by William Hubbs
parent fdfa6dbb0e
commit c3545b54f3
2 changed files with 22 additions and 36 deletions

View File

@ -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

View File

@ -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