Skip to content

Commit

Permalink
linux_and_macos.yml: Cover compilation with non-GNU make
Browse files Browse the repository at this point in the history
New coverage as of today:
- bmake 20200710 (Ubuntu 22.04)
- bmake 20230909 (homebrew)
- bsdmake 24 (homebrew)
- GNU make 3.81 (homebrew)
- GNU make 4.3 (Ubuntu 22.04)
  • Loading branch information
hartwork committed Nov 28, 2023
1 parent 48e5fd7 commit 714dadf
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/linux_and_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:

jobs:
linux:
name: Build (${{ matrix.cc }} on ${{ matrix.runs-on }})
name: Build (${{ matrix.cc }}/${{ matrix.make }} on ${{ matrix.runs-on }})
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
Expand All @@ -26,26 +26,37 @@ jobs:
cxx: g++-13
clang_major_version: null
clang_repo_suffix: null
make: make
runs-on: ubuntu-22.04
- cc: clang-17
cxx: clang++-17
clang_major_version: 17
clang_repo_suffix: -17
make: bmake
runs-on: ubuntu-22.04
- cc: clang-18
cxx: clang++-18
clang_major_version: 18
clang_repo_suffix:
make: bmake
runs-on: ubuntu-22.04
- cc: gcc-11
cxx: g++-11
clang_major_version: null
clang_repo_suffix: null
make: make
runs-on: macos-12
- cc: gcc-13
cxx: g++-13
clang_major_version: null
clang_repo_suffix: null
make: bmake
runs-on: macos-12
- cc: clang-15
cxx: clang++-15
clang_major_version: 15
clang_repo_suffix: null
make: bsdmake
runs-on: macos-12
steps:
- name: Add Clang/LLVM repositories
Expand All @@ -61,6 +72,7 @@ jobs:
run: |-
sudo apt-get update
sudo apt-get install --yes --no-install-recommends \
bmake \
libncurses-dev \
pkg-config
Expand All @@ -70,6 +82,8 @@ jobs:
brew tap homebrew/cask-fonts
brew install \
agg \
bmake \
bsdmake \
coreutils \
font-liberation \
imagemagick
Expand All @@ -95,25 +109,32 @@ jobs:
env:
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
MAKE: ${{ matrix.make }}
run: |-
set -x
# ASan: https://clang.llvm.org/docs/AddressSanitizer.html
# UBSan: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html
sanitizer='-fsanitize=address,undefined -fno-sanitize-recover=all'
CFLAGS="-std=gnu99 -pedantic -Werror ${sanitizer}" LDFLAGS="${sanitizer}" make
${MAKE} --version 2>/dev/null || true
CFLAGS="-std=gnu99 -pedantic -Werror ${sanitizer}" LDFLAGS="${sanitizer}" ${MAKE}
- name: 'Install'
env:
MAKE: ${{ matrix.make }}
run: |-
set -x -o pipefail
make install DESTDIR="${PWD}"/ROOT/
${MAKE} install DESTDIR="${PWD}"/ROOT/
find ROOT/ | sort | xargs ls -ld
- name: 'Uninstall'
env:
MAKE: ${{ matrix.make }}
run: |-
set -x
make uninstall DESTDIR="${PWD}"/ROOT/
${MAKE} uninstall DESTDIR="${PWD}"/ROOT/
[[ "$(find ROOT/ -not -type d | tee /dev/stderr)" == '' ]] # i.e. fail CI if leftover files
- name: 'Run UI tests'
Expand Down Expand Up @@ -172,7 +193,9 @@ jobs:
exit ${error}
- name: 'Clean'
env:
MAKE: ${{ matrix.make }}
run: |-
set -x -o pipefail
make clean
${MAKE} clean
[[ "$(git ls-files -o | tee /dev/stderr | wc -l)" -eq 0 ]]

0 comments on commit 714dadf

Please sign in to comment.