-
Notifications
You must be signed in to change notification settings - Fork 25
109 lines (106 loc) · 3.52 KB
/
ci_mac.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# 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: [OFF] # Let's remove python for now from Mac CI
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@v4
- name: Install deps
run: brew install binutils pybind11
- name: Install numpy
run: python -m pip install --upgrade pip && pip3 install numpy
- name: Install DART
run: |
if [ "$BUILD_PYTHON" = "ON" ]; then
brew install dartsim --only-dependencies && pip3 install dartpy ;
else
brew install dartsim ;
fi
- name: Build Magnum
run: if [ "$MAGNUM_GUI" = "ON" ]; then brew install sdl2 glfw glslang eigen glm bullet assimp devil faad2 freetype glslang harfbuzz libpng libspng jpeg openexr spirv-tools zstd webp && ${{github.workspace}}/ci/install_magnum.sh /usr/local ; 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/local ;
else
./waf configure --tests --prefix=/usr/local ;
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 .. && 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