Update README #5
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: RLM CI on macOS | |
on: | |
push: | |
pull_request: | |
env: | |
CMAKE_VERSION: 3.10.0 | |
SHARG_NO_VERSION_CHECK: 1 | |
TZ: Europe/Berlin | |
defaults: | |
run: | |
shell: bash -ex {0} | |
jobs: | |
build: | |
name: ${{ matrix.name }} | |
runs-on: macos-11 | |
timeout-minutes: 120 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: "gcc12" | |
cxx: "g++-12" | |
cc: "gcc-12" | |
build_type: Release | |
- name: "gcc10" | |
cxx: "g++-10" | |
cc: "gcc-10" | |
build_type: Release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
path: rlm | |
fetch-depth: 2 | |
submodules: recursive | |
- name: Configure Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
- name: Install ccache | |
run: brew install ccache | |
- name: Install compiler ${{ matrix.cxx }} | |
run: brew install gcc@$(echo "${{ matrix.cxx }}" | sed "s/g++-//g") | |
- name: Load ccache | |
uses: actions/cache@v2 | |
with: | |
path: .ccache | |
key: ${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }}-${{ github.run_number }} | |
# Restoring: From current branch, otherwise from base branch, otherwise from any branch. | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.ref }} | |
${{ runner.os }}-${{ matrix.name }}-ccache-${{ github.base_ref }} | |
${{ runner.os }}-${{ matrix.name }}-ccache- | |
- name: Tool versions | |
run: | | |
env cmake --version | |
env ${{ matrix.cxx }} --version | |
- name: Configure tests | |
env: | |
CXX: ${{ matrix.cxx }} | |
CC: ${{ matrix.cc }} | |
run: | | |
mkdir build | |
cd build | |
cmake ../rlm -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_FLAGS="${{ matrix.cxx_flags }}" | |
- name: Build tests | |
env: | |
CCACHE_BASEDIR: ${{ github.workspace }} | |
CCACHE_DIR: ${{ github.workspace }}/.ccache | |
CCACHE_COMPRESS: true | |
CCACHE_COMPRESSLEVEL: 6 | |
CCACHE_MAXSIZE: 500M | |
run: | | |
ccache -p || true | |
cd build | |
make -k -j2 | |
- name: Run tests | |
run: | | |
cd build | |
ctest . -j2 --output-on-failure |