Skip to content

Fix compilation of example/queens due to breaking changes #166

Fix compilation of example/queens due to breaking changes

Fix compilation of example/queens due to breaking changes #166

Workflow file for this run

name: macOS
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
skip_duplicate:
name: 'Skip job?'
continue-on-error: true
runs-on: ubuntu-latest
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '["src/adiar/**", "test/**"]'
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
build_test:
name: 'Build + Test (Mac OS, ${{matrix.cc.cc}}@${{matrix.cc.v || matrix.cc.xcode}})'
runs-on: ${{ matrix.os }}
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip != 'true' }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
cc:
# GNU Compiler
- { cc: gcc, v: 7, cxx: g++, xcode: latest }
- { cc: gcc, v: 10, cxx: g++, xcode: latest }
- { cc: gcc, v: 12, cxx: g++, xcode: latest }
# Clang Compiler
- { cc: clang, cxx: clang++, xcode: 13.1 } # oldest
- { cc: clang, cxx: clang++, xcode: 13.4 }
- { cc: clang, cxx: clang++, xcode: 14.0 }
- { cc: clang, cxx: clang++, xcode: 14.2 } # newest
steps:
# Git repo set up
- name: Checkout commit
uses: actions/checkout@v2
with:
submodules: 'recursive'
# Install dependencies
- name: Install xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{matrix.cc.xcode}}
- name: Install dependencies
run: |
brew update
if ["${{matrix.cc.cc}}" == "gcc"];
then
echo "================================"
echo "Compiler"
brew install ${{matrix.cc.cc}}@${{matrix.cc.v}}
fi
echo "================================"
echo "Boost"
brew install boost
echo "================================"
echo "Graphviz"
brew install graphviz
# CMake build and run
- name: Build tests
working-directory: ${{runner.workspace}}
run: |
if [ "${{ matrix.cc.cc }}" == "gcc" ] ;
then
export CC=/usr/bin/${{matrix.cc.cc}}
export CXX=/usr/bin/${{matrix.cc.cxx}}
else
export CC=${{matrix.cc.cc}}
export CXX=${{matrix.cc.cxx}}
fi
cmake -E make_directory ${{github.workspace}}/build
cd ${{github.workspace}}/build
cmake -D CMAKE_BUILD_TYPE=DEBUG -D ADIAR_STATS=ON ..
cmake --build . --target test-adiar
- name: Run tests
working-directory: ${{github.workspace}}/build
run: ./test/test-adiar --reporter=info --colorizer=light
skip_build:
name: 'Build + Test (Mac OS, ${{matrix.cc.cc}}@${{matrix.cc.v || matrix.cc.xcode}})'
runs-on: ubuntu-latest
needs: skip_duplicate
if: ${{ needs.skip_duplicate.outputs.should_skip == 'true' }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
cc:
# GNU Compiler
- { cc: gcc, v: 7, cxx: g++, xcode: latest }
- { cc: gcc, v: 10, cxx: g++, xcode: latest }
- { cc: gcc, v: 12, cxx: g++, xcode: latest }
# Clang Compiler
- { cc: clang, cxx: clang++, xcode: 13.1 } # oldest
- { cc: clang, cxx: clang++, xcode: 13.4 }
- { cc: clang, cxx: clang++, xcode: 14.0 }
- { cc: clang, cxx: clang++, xcode: 14.2 } # newest
steps:
- name: Echo skip
run: |
echo "Running unit tests is skipped"