-
Notifications
You must be signed in to change notification settings - Fork 13
131 lines (108 loc) · 3.63 KB
/
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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: 11, cxx: g++, xcode: latest } # oldest supported on Apple Silicon
# - { cc: gcc, v: 12, cxx: g++, xcode: latest }
# - { cc: gcc, v: 13, cxx: g++, xcode: latest }
# Clang Compiler
- { cc: clang, cxx: clang++, xcode: 14.3 } # oldest supported
- { cc: clang, cxx: clang++, xcode: 15.0 }
- { cc: clang, cxx: clang++, xcode: latest }
steps:
# Git repo set up
- name: Checkout commit
uses: actions/checkout@v2
with:
submodules: 'recursive'
# Install dependencies
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
cask: false # remove this if you need `brew install --cask`
test-bot: false # remove this if you need `brew test-bot`
- name: Install xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{matrix.cc.xcode}}
- name: Install dependencies
run: |
brew cleanup --prune-prefix
if [ "${{matrix.cc.cc}}" = "gcc" ]; then
echo "================================"
echo GCC "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=${{ matrix.cc.cc }}-${{ matrix.cc.v }}
export CXX=${{ matrix.cc.cxx }}-${{ matrix.cc.v }}
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: 14.3 } # oldest supported
- { cc: clang, cxx: clang++, xcode: 15.0 }
- { cc: clang, cxx: clang++, xcode: latest }
steps:
- name: Echo skip
run: |
echo "Running unit tests is skipped"