-
Notifications
You must be signed in to change notification settings - Fork 17
149 lines (148 loc) · 4.76 KB
/
cupcake.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: nix
on:
pull_request:
push:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-test-install:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu
- macos
compiler:
- gcc
- clang
id: [1,2,3,4,5,6]
include:
- id: 1
cmake: '3.29.0'
conan: 1
generator: Unix Makefiles
flavor: release
linkage: static
cppstd: 20
- id: 2
cmake: '3.21.0'
conan: 1
generator: Unix Makefiles
flavor: release
linkage: static
cppstd: 20
- id: 3
cmake: '3.29.0'
conan: 1
generator: Ninja
flavor: release
linkage: static
cppstd: 20
- id: 4
cmake: '3.29.0'
conan: 1
generator: Unix Makefiles
flavor: debug
linkage: static
cppstd: 20
- id: 5
cmake: '3.29.0'
conan: 1
generator: Unix Makefiles
flavor: release
linkage: shared
cppstd: 20
- id: 6
cmake: '3.29.0'
conan: 1
generator: Unix Makefiles
flavor: release
linkage: shared
cppstd: 17
- platform: ubuntu
runner: ubuntu-22.04
- platform: macos
runner: macos-14
- platform: ubuntu
compiler: gcc
profile:
compiler: gcc
version: 13
cc: /usr/bin/gcc-13
cxx: /usr/bin/g++-13
- platform: ubuntu
compiler: clang
profile:
compiler: clang
version: 15
cc: /usr/bin/clang-15
cxx: /usr/bin/clang++-15
- platform: macos
compiler: gcc
profile:
compiler: gcc
version: 13
cc: /opt/homebrew/bin/gcc-13
cxx: /opt/homebrew/bin/g++-13
- platform: macos
compiler: clang
profile:
compiler: apple-clang
version: 15
cc: /usr/bin/clang
cxx: /usr/bin/clang++
runs-on: ${{ matrix.runner }}
steps:
- name: install Python
uses: actions/setup-python@v5
with:
# The `imp` module is removed in Python 3.12
# but required by Conan 1.x.
python-version: '3.11'
- name: install CMake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: ${{ matrix.cmake }}
- name: install Ninja on Linux
if: matrix.generator == 'Ninja' && startsWith(matrix.platform, 'ubuntu')
run: sudo apt install ninja-build
- name: install Ninja on macOS
if: matrix.generator == 'Ninja' && startsWith(matrix.platform, 'macos')
run: brew install ninja
- name: install GCC on macOS
if: matrix.compiler == 'gcc' && startsWith(matrix.platform, 'macos')
run: brew install gcc@13
- name: checkout
uses: actions/checkout@v4
- name: install Conan
run: pip install wheel 'conan~=${{ matrix.conan }}.0' cupcake
- name: check environment
run: |
env | sort
echo ${PATH} | tr ':' '\n'
python --version
conan --version
cmake --version
- name: configure Conan
if: matrix.conan == 1
run: |
conan profile new default --detect
conan profile update settings.compiler.cppstd=${{ matrix.cppstd }} default
conan profile update settings.compiler=${{ matrix.profile.compiler }} default
conan profile update settings.compiler.version=${{ matrix.profile.version }} default
conan profile update env.CC=${{ matrix.profile.cc }} default
conan profile update env.CXX=${{ matrix.profile.cxx }} default
conan profile update 'conf.tools.build:compiler_executables={"c": "${{ matrix.profile.cc }}", "cpp": "${{ matrix.profile.cxx }}"}' default
conan remote add github https://conan.jfreeman.dev
- name: configure Conan on macOS
if: runner.os == 'macOS'
run: |
conan profile update 'conf.tools.build:exelinkflags=["-Wl,-ld_classic"]' default
- name: configure Conan on Linux
if: runner.os == 'Linux' || matrix.compiler == 'gcc'
run: |
conan profile update settings.compiler.libcxx=libstdc++11 default
- run: cupcake build --verbose -G '${{ matrix.generator }}' --flavor ${{ matrix.flavor }} --${{ matrix.linkage }}
- run: cupcake test --verbose
- run: cupcake install