@@ -34,68 +34,145 @@ jobs:
34
34
matrix :
35
35
include :
36
36
37
+ # ###########################################################
38
+ # Ubuntu latest is a normal build with nothing special that
39
+ # really need be done.
40
+ # ###########################################################
37
41
- os : ubuntu-latest
38
- flags :
42
+ name : Standard
43
+ cmake_command : " cmake ../.. -DCMAKE_BUILD_TYPE=Release"
44
+ build_command : " cmake --build . --config Release"
39
45
vers_command : " ./tidy --version"
40
46
test_command : " ruby test.rb test"
41
47
48
+ # ###########################################################
49
+ # On macOS, we'll build both architectures.
50
+ # ###########################################################
42
51
- os : macOS-latest
43
- flags : " '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'"
52
+ name : X86_64 & Arm64
53
+ cmake_command : " cmake ../.. -DCMAKE_BUILD_TYPE=Release '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'"
54
+ build_command : " cmake --build . --config Release"
44
55
vers_command : " ./tidy --version"
45
56
test_command : " ruby test.rb test"
46
57
58
+ # ###########################################################
59
+ # The standard Windows build is perfectly vanilla, and as
60
+ # of now is using MSVC 19.
61
+ # ###########################################################
47
62
- os : windows-latest
48
- flags :
63
+ name : MSVC
64
+ cmake_command : " cmake ../.. -DCMAKE_BUILD_TYPE=Release"
65
+ build_command : " cmake --build . --config Release"
49
66
vers_command : " ./tidy.exe --version"
50
67
test_command : " ruby test.rb test"
51
68
69
+ # ###########################################################
70
+ # We'll also build using MinGW on Windows, because it's
71
+ # always nice to support FOSS toolchains. While we could
72
+ # do this another way, we'll use the windows-2016 runner
73
+ # to distinguish it from the windows-latest runner.
74
+ # ###########################################################
52
75
- os : windows-2016
53
- flags : " -G 'MinGW Makefiles'"
76
+ name : MinGW
77
+ cmake_command : " cmake ../.. -DCMAKE_BUILD_TYPE=Release -G 'MinGW Makefiles'"
78
+ build_command : " cmake --build . --config Release"
79
+ vers_command : " ./tidy --version"
80
+ test_command : " ruby test.rb test"
81
+
82
+ # ###########################################################
83
+ # We'll also build using Cygwin on Windows, because even
84
+ # Windows people sometimes dislike Windows. While we could
85
+ # do this another way, we'll use the windows-2019 runner to
86
+ # distinguish it from the windows-latest runner.
87
+ # Note: only the `tidy` target will be built (without the
88
+ # man page) for this runner, because xltproc has issues
89
+ # loading files in the virtual environment. The man page
90
+ # is tested and builds perfectly fine on real installs.
91
+ # ###########################################################
92
+ - os : windows-2019
93
+ name : Cygwin
94
+ cmake_command : " cmake ../.. -DCMAKE_BUILD_TYPE=Release"
95
+ build_command : " cmake --build . --target tidy --config Release"
54
96
vers_command : " ./tidy --version"
55
97
test_command : " ruby test.rb test"
56
98
57
99
steps :
58
- - uses : actions/checkout@v2
59
100
101
+ # ###########################################################
102
+ # Checkput the repository.
103
+ # ###########################################################
104
+ - uses : actions/checkout@v2
60
105
61
- # We'll use the windows-2016 instance to perform a MinGW build.
62
- # Of course, we only want to install if this is the correct target.
106
+ # ###########################################################
107
+ # Install MinGW-w64 if needed for the current runner.
108
+ # ###########################################################
63
109
- name : Install MinGW-w64
64
110
if : ${{matrix.os == 'windows-2016'}}
65
111
uses : egor-tensin/setup-mingw@v2
66
112
with :
67
113
platform : x64
68
-
114
+
115
+ # ###########################################################
116
+ # Install Cygwin if needed for the current runner.
117
+ # ###########################################################
118
+ - name : Install Cygwin
119
+ if : ${{matrix.os == 'windows-2019'}}
120
+ uses : egor-tensin/setup-cygwin@v3
121
+ with :
122
+ platform : x64
123
+ packages : make gcc-core gcc-g++ cmake
124
+
125
+ # ###########################################################
126
+ # Cmake and Make the project.
127
+ # ###########################################################
69
128
- name : Build
70
129
working-directory : ${{github.workspace}}/build/cmake
71
- run : cmake ../.. -DCMAKE_BUILD_TYPE=Release ${{matrix.flags}}
72
-
73
- - name : Make
74
- working-directory : ${{github.workspace}}/build/cmake
75
- run : cmake --build . --config Release
76
-
77
- # Windows MSVC is the only oddball here; why does it install the
78
- # binary into a subfolder, unlike all of the other builds? Let's
79
- # make everything else easier by relocating it to the same spot
80
- # as all the other build locations.
81
- - name : Move the exe to someplace sensible
130
+ run : |
131
+ ${{matrix.cmake_command}}
132
+ ${{matrix.build_command}}
133
+
134
+ # ###########################################################
135
+ # Windows MSVC is the only oddball here; why does it
136
+ # install the binary into a subfolder, unlike all of the
137
+ # other builds? Let's make everything else easier by
138
+ # relocating it to the same spot as all the other build
139
+ # locations.
140
+ # ###########################################################
141
+ - name : Move the MSVC exe to someplace sensible
82
142
if : ${{matrix.os == 'windows-latest'}}
83
- run : move-item -path "${{github.workspace}}/build/cmake/Release/tidy.exe" -destination "${{github.workspace}}/build/cmake/"
143
+ run : |
144
+ move-item -path "${{github.workspace}}/build/cmake/Release/tidy.exe" -destination "${{github.workspace}}/build/cmake/"
84
145
146
+ # ###########################################################
147
+ # Just so that a human can make a quick sanity check.
148
+ # ###########################################################
85
149
- name : Show Version
86
150
working-directory : ${{github.workspace}}/build/cmake
87
- run : ${{matrix.vers_command}}
151
+ run : |
152
+ ${{matrix.vers_command}}
88
153
154
+ # ###########################################################
155
+ # Install Ruby for running our regression tests. It's quite
156
+ # nice that this package is generic enough to work on all
157
+ # of the different runners.
158
+ # ###########################################################
89
159
- uses : ruby/setup-ruby@v1
90
160
with :
91
161
ruby-version : 2.7
92
162
bundler-cache : true
93
163
164
+ # ###########################################################
165
+ # Ensure that dependencies are met.
166
+ # ###########################################################
94
167
- name : Bundle Install
95
168
working-directory : ${{github.workspace}}/regression_testing
96
- run : bundle install
169
+ run : |
170
+ bundle install
97
171
172
+ # ###########################################################
173
+ # Finally, check for regressions.
174
+ # ###########################################################
98
175
- name : Run Regression Test
99
176
working-directory : ${{github.workspace}}/regression_testing
100
- run : ${{matrix.test_command}}
101
-
177
+ run : |
178
+ ${{matrix.test_command}}
0 commit comments