forked from lpenz/ghaction-cmake
-
Notifications
You must be signed in to change notification settings - Fork 5
118 lines (106 loc) · 3.16 KB
/
main.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
---
name: CI
on:
push:
branches:
- master
pull_request:
create:
jobs:
build-docker:
name: "Build and Publish rainlabs/cmake-quality-action"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: docker/build-push-action@v1
with:
username: rainlabs
password: ${{ secrets.RAINLABS_DOCKERHUB_TOKEN }}
repository: rainlabs/cmake-quality-action
tag_with_ref: true
test-action-demo-clang:
name: "Test action with local demo project on Clang ${{ matrix.version }}"
needs: build-docker
strategy:
matrix:
version: [11, 12, 13] #14 is broken :(
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
path: action
- uses: actions/checkout@main
with:
path: demo
- uses: ./action/
with:
cmake_configure_environment: "CC=clang-${{ matrix.version }} CXX=clang++-${{ matrix.version }}"
source_directory: demo
build_directory: demo-out
test-action-demo-gcc:
name: "Test action with local demo project on GCC"
needs: build-docker
strategy:
matrix:
version: [9, 10, 11, 12]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
path: action
- uses: actions/checkout@main
with:
path: demo
- uses: ./action/
with:
cmake_configure_environment: "CC=gcc-${{ matrix.version }} CXX=g++-${{ matrix.version }}"
source_directory: demo
build_directory: demo-out
test-action-googletest-clang:
name: "Test action with google test on Clang"
needs: build-docker
strategy:
matrix:
version: [11, 12, 13] #14 is broken :(
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
path: action
- uses: actions/checkout@main
with:
repository: google/googletest
path: googletest
- uses: ./action/
with:
cmake_configure_environment: "CC=clang-${{ matrix.version }} CXX=clang++-${{ matrix.version }}"
source_directory: googletest
build_directory: googletest-out
cmake_configure_extra_args: "-Dgmock_build_tests=ON"
ctest_enable: true
cmake_install_enable: true
cmake_install_directory: googletest-install
test-action-googletest-gcc:
name: "Test action with google test on GCC"
needs: build-docker
strategy:
matrix:
version: [9, 10, 11, 12]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
with:
path: action
- uses: actions/checkout@main
with:
repository: google/googletest
path: googletest
- uses: ./action/
with:
cmake_configure_environment: "CC=gcc-${{ matrix.version }} CXX=g++-${{ matrix.version }}"
source_directory: googletest
build_directory: googletest-out
cmake_configure_extra_args: "-Dgmock_build_tests=ON"
ctest_enable: true
cmake_install_enable: true
cmake_install_directory: googletest-install