Skip to content

Minor changes

Minor changes #39

Workflow file for this run

name: Unix
on:
push:
branches:
- main
- actions
pull_request:
env:
BUILD_TYPE: Release
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {
name: "macOS 11 AppleClang",
os: macos-11,
cxx: "clang++"
}
- {
name: "macOS 11 GCC 10",
os: macos-11,
cxx: "g++-10"
}
- {
name: "Ubuntu 20.04 Clang 11",
os: ubuntu-20.04,
cxx: "clang++-11"
}
- {
name: "Ubuntu 20.04 GCC 10",
os: ubuntu-20.04,
cxx: "g++-10"
}
steps:
- uses: actions/checkout@v3
- name: Get macOS Concurrency
if: runner.os == 'macOS'
run: |
echo NPROC="sysctl -n hw.ncpu" >> $GITHUB_ENV
echo "Running on $(sysctl -n hw.ncpu) threads ..."
- name: Get Linux Concurrency
if: runner.os == 'Linux'
run: |
echo NPROC="nproc" >> $GITHUB_ENV
echo "Running on $(nproc) threads ..."
- name: Set Up macOS Dependencies
if: runner.os == 'macOS'
run: |
brew install gcc@10
- name: Set Up Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt install -y cmake pkg-config clang-11 g++-10
- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build
- name: Configure CMake
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_COMPILER=${{matrix.config.cxx}}
- name: Build All
working-directory: ${{runner.workspace}}/build
run: make -j $($NPROC)
- name: Test
working-directory: ${{runner.workspace}}/build
run: ctest -j $($NPROC)