-
Notifications
You must be signed in to change notification settings - Fork 17
116 lines (115 loc) · 3.71 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
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
cmake:
- '3.21.0'
- '3.29.0'
conan:
- 1
compiler:
- gcc
- clang
generator:
- Unix Makefiles
- Ninja
flavor:
- debug
- release
linkage:
- shared
- static
include:
- 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=20 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 Linux
if: runner.os == 'Linux' || matrix.compiler == 'gcc'
run: |
conan profile update settings.compiler.libcxx=libstdc++11 default
- run: cupcake build -G '${{ matrix.generator }}' --flavor ${{ matrix.flavor }} --${{ matrix.linkage }}
- run: cupcake test
- run: cupcake install