-
Notifications
You must be signed in to change notification settings - Fork 36
201 lines (197 loc) · 6.33 KB
/
cmake-integration.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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: cmake-integration
on:
push:
pull_request:
jobs:
test-linux-fetchcontent:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: test
run: |
tag=$(git rev-parse --abbrev-ref HEAD)
cd ..
cp -rv libassert/tests/fetchcontent-integration .
mkdir fetchcontent-integration/build
cd fetchcontent-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG=$tag
make
./main
test-linux-findpackage:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: build
run: |
tag=$(git rev-parse --abbrev-ref HEAD)
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
sudo make -j install
sudo /sbin/ldconfig
cd ../..
cp -rv libassert/tests/findpackage-integration .
mkdir findpackage-integration/build
cd findpackage-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
./main
test-linux-add_subdirectory:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: build
run: |
cd ..
cp -rv libassert/tests/add_subdirectory-integration .
cp -rv libassert add_subdirectory-integration
mkdir add_subdirectory-integration/build
cd add_subdirectory-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
./main
test-macos-fetchcontent:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: test
run: |
tag=$(git rev-parse --abbrev-ref HEAD)
cd ..
cp -rv libassert/tests/fetchcontent-integration .
mkdir fetchcontent-integration/build
cd fetchcontent-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG=$tag
make
./main
test-macos-findpackage:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: build
run: |
tag=$(git rev-parse --abbrev-ref HEAD)
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug
sudo make -j install
cd ../..
cp -rv libassert/tests/findpackage-integration .
mkdir findpackage-integration/build
cd findpackage-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
./main
test-macos-add_subdirectory:
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: test
run: |
cd ..
cp -rv libassert/tests/add_subdirectory-integration .
cp -rv libassert add_subdirectory-integration
mkdir add_subdirectory-integration/build
cd add_subdirectory-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug
make
./main
test-mingw-fetchcontent:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: test
run: |
$tag=$(git rev-parse --abbrev-ref HEAD)
cd ..
cp -Recurse libassert/tests/fetchcontent-integration .
mkdir fetchcontent-integration/build
cd fetchcontent-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG="$tag" "-GUnix Makefiles"
make
.\main.exe
test-mingw-findpackage:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: test
run: |
$tag=$(git rev-parse --abbrev-ref HEAD)
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug "-GUnix Makefiles" -DCMAKE_INSTALL_PREFIX=C:/foo
make -j install
cd ../..
cp -Recurse libassert/tests/findpackage-integration .
mkdir findpackage-integration/build
cd findpackage-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug "-GUnix Makefiles" -DCMAKE_PREFIX_PATH=C:/foo
make
./main.exe
test-mingw-add_subdirectory:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: test
run: |
cd ..
cp -Recurse libassert/tests/add_subdirectory-integration .
cp -Recurse libassert add_subdirectory-integration
mkdir add_subdirectory-integration/build
cd add_subdirectory-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug "-GUnix Makefiles"
make
.\main.exe
test-windows-fetchcontent:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.10.0
- name: test
run: |
$tag=$(git rev-parse --abbrev-ref HEAD)
cd ..
cp -Recurse libassert/tests/fetchcontent-integration .
mkdir fetchcontent-integration/build
cd fetchcontent-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DLIBASSERT_TAG="$tag"
msbuild demo_project.sln
.\Debug\main.exe
test-windows-findpackage:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.10.0
- name: test
run: |
$tag=$(git rev-parse --abbrev-ref HEAD)
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=C:/foo
msbuild .\libassert.sln
msbuild INSTALL.vcxproj
cd ../..
cp -Recurse libassert/tests/findpackage-integration .
mkdir findpackage-integration/build
cd findpackage-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=C:/foo
msbuild demo_project.sln
.\Debug\main.exe
test-windows-add_subdirectory:
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@v1.10.0
- name: test
run: |
cd ..
cp -Recurse libassert/tests/add_subdirectory-integration .
cp -Recurse libassert add_subdirectory-integration
mkdir add_subdirectory-integration/build
cd add_subdirectory-integration/build
cmake .. -DCMAKE_BUILD_TYPE=Debug
msbuild demo_project.sln
.\Debug\main.exe