Skip to content

Pruned one more Clang version from the Linux CI matrix #86

Pruned one more Clang version from the Linux CI matrix

Pruned one more Clang version from the Linux CI matrix #86

Workflow file for this run

name: Build macOS
on:
push:
branches-ignore:
- 'coverityScan'
pull_request:
branches:
- 'main'
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-macos:
name: '${{ matrix.os }} (Apple Clang, ${{ matrix.cpp_std }})'
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os:
- macos-13
- macos-12
cpp_std:
- 'c++11'
- 'c++14'
- 'c++17'
build_opts:
- ''
include:
- os: macos-latest
cpp_std: 'c++17'
build_opts: '-Db_lto=true -Ddefault_library=static'
fail-fast: false
steps:
- name: Runtime environment
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Setup Meson + Ninja + gcovr
run: |
brew install meson ninja gcovr
working-directory: ${{ runner.temp }}
- name: Version tools
run: |
cc --version || true
ld --version || true
gcov --version || true
meson --version
ninja --version
- name: Configure
run: meson setup build --prefix=$HOME/.local -Dcpp_std=${{ matrix.cpp_std }} ${{ matrix.build_opts }}
- name: Build
run: ninja -C build
- name: Test
run: ninja -C build test
- name: Run coverage build
if: github.repository == 'dragonmux/crunch'
# Codecov no longer parses gcov files automatically
run: |
meson setup buildcov --prefix=$HOME/.local -Dcpp_std=${{ matrix.cpp_std }} -Db_coverage=true --buildtype=debug
meson compile -C buildcov
meson test -C buildcov
ninja -C buildcov coverage-xml
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: logs-${{ matrix.os }}-appleclang-${{ matrix.cpp_std }}
path: |
${{ github.workspace }}/build
${{ github.workspace }}/buildcov
retention-days: 5
- name: Install
if: success()
run: ninja -C build install
- name: Codecov
if: success()
uses: codecov/codecov-action@v4
with:
directory: ./buildcov/meson-logs/
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
build-macos-homebrew:
name: '${{ matrix.os }} (${{ matrix.compiler }}, ${{ matrix.cpp_std }})'
runs-on: ${{ matrix.os}}
defaults:
run:
shell: bash
strategy:
matrix:
os:
## Apple LLD is unable to link GCC < 11 generated object files.
## https://stackoverflow.com/questions/73714336/xcode-update-to-version-2395-ld-compile-problem-occurs-computedatomcount-m
## rdar://FB11369327
- macos-13
- macos-12
compiler:
# - gcc@10
- gcc@11
- gcc@12
- gcc@13
- gcc@14
cpp_std:
- 'c++11'
- 'c++14'
- 'c++17'
fail-fast: false
steps:
- name: Runtime environment
env:
WORKSPACE: ${{ github.workspace }}
run: |
echo "GITHUB_WORKSPACE=`pwd`" >> $GITHUB_ENV
- name: Setup compiler
run: |
brew install ${{ matrix.compiler }}
CC=${COMPILER/@/-}
CXX=${CC/#gcc/g++}
echo "CC=$CC" >> $GITHUB_ENV
echo "CXX=$CXX" >> $GITHUB_ENV
echo "GCOV=${CC/#gcc/gcov}" >> $GITHUB_ENV
env:
COMPILER: ${{ matrix.compiler }}
- name: Checkout
uses: actions/checkout@v4
with:
lfs: true
submodules: true
- name: Setup Meson + Ninja + gcovr
run: |
brew install meson ninja gcovr
working-directory: ${{ runner.temp }}
- name: Version tools
shell: bash
run: |
$CC --version
$CXX --version
$GCOV --version
meson --version
ninja --version
- name: Configure
run: meson setup build --prefix=$HOME/.local -Dcpp_std=${{ matrix.cpp_std }}
- name: Build
run: ninja -C build
- name: Test
run: ninja -C build test
- name: Run coverage build
if: github.repository == 'dragonmux/crunch'
# Codecov no longer parses gcov files automatically
run: |
meson setup buildcov --prefix=$HOME/.local -Dcpp_std=${{ matrix.cpp_std }} -Db_coverage=true --buildtype=debug
meson compile -C buildcov
meson test -C build
ninja -C buildcov coverage-xml
- name: Upload failure logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: logs-${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cpp_std }}
path: |
${{ github.workspace }}/build
${{ github.workspace }}/buildcov
retention-days: 5
- name: Install
if: success()
run: ninja -C build install
- name: Codecov
if: success()
uses: codecov/codecov-action@v4
with:
directory: ./buildcov/meson-logs/
files: coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}