Skip to content

Commit c638b16

Browse files
authored
Ci Update runners and fix tests (#1442)
* CI Update runners in the build-cppfront.yaml * CI Update runners in the regression-tests.yml * CI Use -include-std cppfront option for pure regression tests
1 parent 66c997d commit c638b16

File tree

138 files changed

+52
-2446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+52
-2446
lines changed

.github/workflows/build-cppfront.yaml

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Multi-platform Build of cppfront
2+
23
on:
34
pull_request:
45
paths-ignore:
@@ -8,16 +9,27 @@ on:
89
- 'docs/**'
910
workflow_dispatch:
1011

12+
permissions:
13+
# Restrict permissions to read-only for security
14+
contents: read
15+
16+
concurrency:
17+
# Specific group name to cancel in-progress builds for the same PR/ref
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
1121
jobs:
12-
build-windows:
13-
runs-on: windows-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: ilammy/msvc-dev-cmd@v1
17-
- name: Compiler name & version
18-
run: cl.exe
19-
- name: Build
20-
run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX
22+
# Comment out the Windows build until it is fixed
23+
# build-windows:
24+
# runs-on: windows-latest
25+
# steps:
26+
# - uses: actions/checkout@v4
27+
# - uses: ilammy/msvc-dev-cmd@v1
28+
# - name: Compiler name & version
29+
# run: cl.exe
30+
# - name: Build
31+
# run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX
32+
2133
build-unix-like:
2234
strategy:
2335
fail-fast: false
@@ -35,7 +47,10 @@ jobs:
3547
- compiler: clang++-14
3648
cxx-std: 'c++2b'
3749
include:
38-
- runs-on: macos-latest
50+
- runs-on: macos-14
51+
compiler: clang++
52+
cxx-std: 'c++20'
53+
- runs-on: macos-15
3954
compiler: clang++
4055
cxx-std: 'c++20'
4156
- runs-on: ubuntu-22.04
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ on:
99
- 'docs/**'
1010
workflow_dispatch:
1111

12+
permissions:
13+
# Restrict permissions to read-only for security
14+
contents: read
15+
16+
concurrency:
17+
# Specific group name to cancel in-progress builds for the same PR/ref
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
1221
jobs:
1322
regression-tests:
1423
name: ${{ matrix.shortosname }} | ${{ matrix.compiler }} | ${{ matrix.cxx_std }} | ${{ matrix.stdlib }} | ${{ matrix.os }}
@@ -50,26 +59,17 @@ jobs:
5059
compiler: clang++
5160
cxx_std: c++2b
5261
stdlib: default
53-
- os: macos-13
54-
shortosname: mac-13
55-
compiler: clang++
56-
cxx_std: c++2b
57-
stdlib: default
58-
- os: macos-13
59-
shortosname: mac-13
60-
compiler: clang++-15
61-
cxx_std: c++2b
62-
stdlib: default
63-
- os: windows-2022
64-
shortosname: win-22
65-
compiler: cl.exe
66-
cxx_std: c++latest
67-
stdlib: default
68-
- os: windows-2022
69-
shortosname: win-22
70-
compiler: cl.exe
71-
cxx_std: c++20
72-
stdlib: default
62+
# Comment out Windows tests until build on Windows is fixed
63+
# - os: windows-2025
64+
# shortosname: win-25
65+
# compiler: cl.exe
66+
# cxx_std: c++latest
67+
# stdlib: default
68+
# - os: windows-2025
69+
# shortosname: win-25
70+
# compiler: cl.exe
71+
# cxx_std: c++20
72+
# stdlib: default
7373
steps:
7474
- name: Checkout repo
7575
uses: actions/checkout@v4

regression-tests/run-tests.sh

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -154,17 +154,10 @@ else
154154

155155
compiler_version=$("$cxx_compiler" --version)
156156

157-
if [[ "$compiler_version" == *"Apple clang version 14.0"* ||
158-
"$compiler_version" == *"Homebrew clang version 15.0"* ]]; then
159-
exec_out_dir="$expected_results_dir/apple-clang-14"
160-
# We share the expected results dir for these two compilers, but there is one
161-
# test which (as expected) fails to compile on both compilers, but has a slightly
162-
# different error diagnostic because the clang path differs. So we exclude it from
163-
# running. The alternative would be to duplicate the expected results files, which
164-
# seems wasteful for just one test (that doesn't even compile).
165-
exclude_test_filter="pure2-expected-is-as.cpp2"
166-
elif [[ "$compiler_version" == *"Apple clang version 15.0"* ]]; then
157+
if [[ "$compiler_version" == *"Apple clang version 15.0"* ]]; then
167158
exec_out_dir="$expected_results_dir/apple-clang-15"
159+
elif [[ "$compiler_version" == *"Apple clang version 17.0"* ]]; then
160+
exec_out_dir="$expected_results_dir/apple-clang-17"
168161
elif [[ "$compiler_version" == *"clang version 12.0"* ]]; then
169162
exec_out_dir="$expected_results_dir/clang-12"
170163
elif [[ "$compiler_version" == *"clang version 15.0"* ]]; then
@@ -216,8 +209,9 @@ else
216209
printf "\ncompiler_cmd: $compiler_cmd\n\n"
217210
fi
218211

212+
printf "Full compiler version for '$cxx_compiler':\n$compiler_version\n\n"
213+
219214
if [[ -d "$exec_out_dir" ]]; then
220-
printf "Full compiler version for '$cxx_compiler':\n$compiler_version\n\n"
221215

222216
printf "Directory with reference compilation/execution files to use:\n$exec_out_dir\n\n"
223217
else
@@ -288,7 +282,8 @@ for test_file in $tests; do
288282
# Using naming convention to discriminate pure Cpp2 code
289283
if [[ $test_name == "pure2"* ]]; then
290284
descr="pure Cpp2 code"
291-
opt="-p"
285+
# NB the -include-std option is added temporarily until modules are more stable
286+
opt="-p -include-std"
292287
fi
293288
echo " Testing $descr: $test_name.cpp2"
294289

regression-tests/test-results/apple-clang-14-c++2b/clang-version.output

Lines changed: 0 additions & 4 deletions
This file was deleted.

regression-tests/test-results/apple-clang-14-c++2b/mixed-allcpp1-hello.cpp.execution

Lines changed: 0 additions & 1 deletion
This file was deleted.

regression-tests/test-results/apple-clang-14-c++2b/mixed-as-for-variant-20-types.cpp.execution

Lines changed: 0 additions & 60 deletions
This file was deleted.

regression-tests/test-results/apple-clang-14-c++2b/mixed-autodiff-taylor.cpp.execution

Lines changed: 0 additions & 63 deletions
This file was deleted.

regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-check.cpp.execution

Lines changed: 0 additions & 1 deletion
This file was deleted.

regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert-2.cpp.execution

Lines changed: 0 additions & 5 deletions
This file was deleted.

regression-tests/test-results/apple-clang-14-c++2b/mixed-bounds-safety-with-assert.cpp.execution

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)