Skip to content

Minor changes

Minor changes #35

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 10.15 AppleClang",
os: macos-10.15,
cxx: "clang++"
}
- {
name: "macOS 10.15 GCC 10",
os: macos-10.15,
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@v2
- 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)