-
Notifications
You must be signed in to change notification settings - Fork 495
181 lines (164 loc) · 5.56 KB
/
Copy pathtest_develop_commits.yml
File metadata and controls
181 lines (164 loc) · 5.56 KB
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
name: Develop Branch Testing
on:
push:
branches: [ develop ] # run this on all commits to the develop branch
defaults:
run:
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FC: gfortran-13
Python_REQUIRED_VERSION: 3.12.3 # 3.12.2 not available on Ubuntu 24 GHA
jobs:
build_and_test:
name: ${{ matrix.pretty }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# - os: macos-15-intel
# macos_dev_target: 12.1
# arch: x86_64
# python-arch: x64
# generator: "Unix Makefiles"
# nproc: 3
# pretty: "Standard Build on Mac x64"
# alternate: false
# build-type: Release
# run-tests: true
- os: macos-15
macos_dev_target: 14.0
arch: arm64
python-arch: arm64
generator: "Unix Makefiles"
nproc: 3
pretty: "Standard Build on Mac arm64"
alternate: false
build-type: Release
run-tests: true
link-with-python: true
# - os: ubuntu-24.04
# arch: x86_64
# python-arch: x64
# generator: "Unix Makefiles"
# nproc: 4
# pretty: "Standard Build on Ubuntu 24.04"
# alternate: false
# build-type: Release
# run-tests: true
# link-with-python: true
- os: windows-2022
arch: x86_64
python-arch: x64
generator: "Visual Studio 17 2022"
nproc: 4
pretty: "Standard Build on Windows VS 2022 - Debug"
alternate: false
build-type: Debug
run-tests: false
link-with-python: true
- os: windows-2022
arch: x86_64
python-arch: x64
generator: "Visual Studio 17 2022"
nproc: 4
pretty: "Standard Build on Windows VS 2022 - Debug, No Python"
alternate: false
build-type: Debug
run-tests: false
link-with-python: false
- os: ubuntu-24.04
arch: x86_64
python-arch: x64
generator: "Unix Makefiles"
nproc: 4
pretty: "Alternate Build on Ubuntu 24.04"
alternate: true
build-type: Release
run-tests: false
link-with-python: false
steps:
- name: Set up Python ${{ env.Python_REQUIRED_VERSION }}
id: setup-python
uses: actions/setup-python@v7
with:
python-version: ${{ env.Python_REQUIRED_VERSION }}
- name: Install Dependencies for Mac
if: ${{ runner.os == 'macOS' }}
run: |
echo MACOSX_DEPLOYMENT_TARGET=${{ matrix.macos_dev_target }} >> $GITHUB_ENV
- name: Install Dependencies for Linux
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y libxkbcommon-x11-0 xorg-dev libgl1-mesa-dev
if [[ "${{ matrix.os }}" == "ubuntu-24.04" ]]; then
# https://github.com/actions/runner-images/issues/10025
echo "FC=gfortran-13" >> $GITHUB_ENV
fi
- uses: actions/checkout@v7
- name: Create Build Directory
run: cmake -E make_directory ./build/
- name: Configure CMake with Standard Flags
if: matrix.alternate == false
working-directory: ./build
run: >
cmake
-G "${{ matrix.generator }}"
-DCMAKE_BUILD_TYPE:STRING="${{ matrix.build-type }}"
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${{ matrix.macos_dev_target }}
-DLINK_WITH_PYTHON:BOOL=${{ matrix.link-with-python }}
-DPYTHON_CLI:BOOL=${{ matrix.link-with-python }}
-DPython_REQUIRED_VERSION:STRING=${{ steps.setup-python.outputs.python-version }}
-DPython_ROOT_DIR:PATH=$RUNNER_TOOL_CACHE/Python/${{ steps.setup-python.outputs.python-version }}/${{ matrix.python-arch }}/
-DBUILD_TESTING:BOOL=ON
-DBUILD_FORTRAN:BOOL=ON
-DBUILD_PACKAGE:BOOL=OFF
-DDOCUMENTATION_BUILD:STRING=DoNotBuild
-DENABLE_OPENMP:BOOL=OFF
../
- name: Configure CMake with Alternative Flags
if: matrix.alternate == true
working-directory: ./build/
run: >
cmake
-DCMAKE_BUILD_TYPE="${{ matrix.build-type }}"
-DLINK_WITH_PYTHON=${{ matrix.link-with-python }}
-DUSE_PSYCHROMETRICS_CACHING=OFF
-DUSE_GLYCOL_CACHING=OFF
-DOPENGL_REQUIRED=OFF
-DUSE_PSYCH_STATS=ON
-DUSE_PSYCH_ERRORS=OFF
-DENABLE_PCH=OFF
-DBUILD_TESTING:BOOL=ON
-DBUILD_FORTRAN:BOOL=ON
../
- name: Build
id: build
working-directory: ./build
run: |
echo "::add-matcher::./.github/workflows/cpp-problem-matcher.json"
cmake --build . -j ${{ matrix.nproc }} --config "${{ matrix.build-type }}"
echo "::remove-matcher owner=gcc-problem-matcher::"
- name: Test
if: matrix.run-tests == true
working-directory: ./build
run: |
begin_group() { echo -e "::group::\033[93m$1\033[0m"; }
Color_Off='\033[0m' # Text Reset
# Regular Colors
Red='\033[0;31m'
Green='\033[0;32m'
begin_group "Running CTests"
if ctest -C "${{ matrix.build-type }}" -j ${{ matrix.nproc }}; then
echo "::endgroup::"
echo -e "✅ ${Green}All tests passed${Color_Off}"
else
echo "::endgroup::"
echo -e "❌ ${Red}Some Tests Failed${Color_Off}"
begin_group "Re-running failed tests verbosely..."
ctest -C "${{ matrix.build-type }}" --rerun-failed -VV || true
echo "::endgroup::"
exit 1
fi;