Documentation #18
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
# https://help.github.com/en/articles/workflow-syntax-for-github-actions | |
name: CI MacOS | |
on: | |
push: | |
branches: | |
- "**" | |
paths: | |
- 'cmake/**' | |
- 'src/examples/**' | |
- 'src/python/**' | |
- 'src/robot_dart/**' | |
- 'src/tests/**' | |
- 'src/utheque/**' | |
- 'utheque/**' | |
- 'ci/**' | |
- 'waf_tools/**' | |
- 'wscript' | |
- 'waf' | |
- '.github/workflows/ci_mac.yml' | |
pull_request: | |
branches: | |
- "**" | |
paths: | |
- 'cmake/**' | |
- 'src/examples/**' | |
- 'src/python/**' | |
- 'src/robot_dart/**' | |
- 'src/tests/**' | |
- 'src/utheque/**' | |
- 'utheque/**' | |
- 'ci/**' | |
- 'waf_tools/**' | |
- 'wscript' | |
- 'waf' | |
- '.github/workflows/ci_mac.yml' | |
jobs: | |
build: | |
if: github.event_name != 'workflow_dispatch' | |
name: OS:${{ matrix.os }}-Magnum:${{ matrix.magnum_gui }}-Build:${{ matrix.build_type }}-Python:${{ matrix.build_python }}-Compiler:${{ matrix.compiler }}-DART:${{ matrix.dart_tag }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-12] | |
build_type: [Release] | |
build_python: [ON] | |
compiler: [gcc, clang] | |
magnum_gui: [ON, OFF] | |
env: | |
COMPILER: ${{ matrix.compiler }} | |
BUILD_TYPE: ${{ matrix.build_type }} | |
BUILD_PYTHON: ${{ matrix.build_python }} | |
MAGNUM_GUI: ${{ matrix.magnum_gui }} | |
DART_TAG: ${{ matrix.dart_tag }} | |
CI_HOME: ${{github.workspace}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install deps | |
run: brew install binutils | |
- name: Install DART | |
run: brew install dartsim | |
- name: Build Magnum | |
run: if [ "$MAGNUM_GUI" = "ON" ]; then brew install mosra/magnum/magnum && brew install mosra/magnum/magnum-plugins && brew install mosra/magnum/magnum-integration --with-dartsim ; fi | |
- name: Build robot_dart | |
run: | | |
if [ "$COMPILER" = "gcc" ]; then | |
export CC=/usr/bin/gcc && export CXX=/usr/bin/g++ | |
fi | |
if [ "$COMPILER" = "clang" ]; then | |
export CC=/usr/bin/clang && export CXX=/usr/bin/clang++ | |
fi | |
cd ${{github.workspace}} | |
if [ "$BUILD_PYTHON" = "ON" ]; then | |
./waf configure --tests --python --prefix=/usr ; | |
else | |
./waf configure --tests --prefix=/usr ; | |
fi | |
./waf | |
- name: Run tests | |
run: ./waf --tests | |
- name: Build examples | |
run: ./waf examples | |
- name: Install | |
run: sudo ./waf install | |
- name: Run CMake | |
run: | | |
if [ "$COMPILER" = "gcc" ]; then | |
export CC=/usr/bin/gcc && export CXX=/usr/bin/g++ | |
fi | |
if [ "$COMPILER" = "clang" ]; then | |
export CC=/usr/bin/clang && export CXX=/usr/bin/clang++ | |
fi | |
cd ${{github.workspace}}/cmake/example && mkdir -p build && cd build && cmake -DDART_DIR=$DART_DIR .. && make -j4 | |
cd ${{github.workspace}}/cmake/example_utheque && mkdir -p build && cd build && cmake .. && make -j4 | |
- name: Run Python | |
run: | | |
if [ "$BUILD_PYTHON" = "ON" ]; then | |
python ${{github.workspace}}/src/examples/python/ci.py | |
fi |