Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 9 additions & 11 deletions .github/workflows/build-cppfront.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ concurrency:
cancel-in-progress: true

jobs:
# Comment out the Windows build until it is fixed
# build-windows:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v4
# - uses: ilammy/msvc-dev-cmd@v1
# - name: Compiler name & version
# run: cl.exe
# - name: Build
# run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Compiler name & version
run: cl.exe
- name: Build
run: cl.exe source/cppfront.cpp -std:c++latest -MD -EHsc -W4 -WX
build-unix-like:
strategy:
fail-fast: false
Expand Down
61 changes: 27 additions & 34 deletions .github/workflows/regression-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,50 +59,43 @@ jobs:
compiler: clang++
cxx_std: c++2b
stdlib: default
# Comment out Windows tests until build on Windows is fixed
# - os: windows-2025
# shortosname: win-25
# compiler: cl.exe
# cxx_std: c++latest
# stdlib: default
# - os: windows-2025
# shortosname: win-25
# compiler: cl.exe
# cxx_std: c++20
# stdlib: default
- os: windows-2025
shortosname: win-25
compiler: cl.exe
cxx_std: c++latest
stdlib: default
vs_version: '18' # VS 2026
- os: windows-2025
shortosname: win-25
compiler: cl.exe
cxx_std: c++20
stdlib: default
vs_version: '18' # VS 2026
steps:
- name: Checkout repo
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Prepare compilers - macOS
if: matrix.os == 'macos-13'
Comment on lines -77 to -78

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MacOS 13 compiler prep was a leftover (effectively dead code) from the clean-up in #1442.

- name: Prepare compiler - Clang 19
if: matrix.os == 'ubuntu-24.04' && startsWith(matrix.compiler, 'clang')

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This excludes the unnecessary Clang installation for the GCC runs.

run: |
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15
sudo apt-get install -y clang-19

- name: Prepare compilers - Ubuntu 24.04
if: matrix.os == 'ubuntu-24.04'
run: |
sudo sudo apt-get install clang-19
- name: Set up MSVC - Windows
if: startsWith(matrix.os, 'windows')
uses: ilammy/msvc-dev-cmd@v1
with:
vsversion: ${{ matrix.vs_version }}
Comment on lines +83 to +87

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a cleaner setup of the MSVC environment with allows the Linux/MacOs step and the Windows step to be combined below.


- name: Run regression tests - Linux and macOS version
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
- name: Run regression tests
shell: bash
run: |
git config --local core.autocrlf false
cd regression-tests
bash run-tests.sh -c ${{ matrix.compiler }} -s ${{ matrix.cxx_std }} -d ${{ matrix.stdlib }} -l ${{ matrix.os }}

- name: Run regression tests - Windows version
if: startsWith(matrix.os, 'windows')
run: |
"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" && ^
git config --local core.autocrlf false && ^
cd regression-tests && ^
bash run-tests.sh -c ${{ matrix.compiler }} -s ${{ matrix.cxx_std }} -d ${{ matrix.stdlib }} -l ${{ matrix.os }}
Comment on lines -97 to -100

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is replaced by the use of ilammy/msvc-dev-cmd@v1 above

shell: cmd

- name: Upload patch
if: success() || failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cxx_std }}-${{ matrix.stdlib }}.patch
path: regression-tests/${{ matrix.os }}-${{ matrix.compiler }}-${{ matrix.cxx_std }}-${{ matrix.stdlib }}.patch
Expand All @@ -114,7 +107,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download all patches
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
path: downloaded-results

Expand All @@ -129,7 +122,7 @@ jobs:

- name: Upload aggregated results
if: steps.prepare_files.outputs.patch_count != '0'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: aggregated-results
path: aggregated-results
Expand Down
3 changes: 2 additions & 1 deletion regression-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ exclude_test_filter=""
if [[ "$cxx_compiler" == *"cl.exe"* ]]; then
compiler_cmd="cl.exe -nologo -std:${cxx_std} -MD -EHsc -I ..\..\..\include -Fe:"
exec_out_dir="$expected_results_dir/msvc-2022-${cxx_std}"
compiler_version=$(cl.exe)
# cl.exe prints its version banner to stderr
compiler_version=$(cl.exe 2>&1 >/dev/null)
else
# Verify the compiler command
which "$cxx_compiler" > /dev/null
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mixed-autodiff-taylor.cpp
cpp2taylor.h2(7): error C2079: 'cpp2::taylor<double,6>::v' uses undefined class 'std::array<R,6>'
with
[
R=double
]
cpp2taylor.h2(7): note: the template instantiation context (the oldest one first) is
mixed-autodiff-taylor.cpp2(6): note: see reference to class template instantiation 'cpp2::taylor<double,6>' being compiled
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ mixed-parameter-passing.cpp2(44): error C2079: 'container<int>::buf' uses undefi
]
mixed-parameter-passing.cpp2(44): note: the template instantiation context (the oldest one first) is
mixed-parameter-passing.cpp2(54): note: see reference to class template instantiation 'container<int>' being compiled
mixed-parameter-passing.cpp2(44): error C2439: 'container<int>::buf': member could not be initialized
mixed-parameter-passing.cpp2(44): note: see declaration of 'container<int>::buf'
mixed-parameter-passing.cpp2(54): note: see reference to function 'container<int>::container(void)'
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
pure2-assert-expected-not-null.cpp
pure2-assert-expected-not-null.cpp2(7): error C2039: 'expected': is not a member of 'std'
predefined C++ types (compiler internal)(357): note: see declaration of 'std'
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std'
pure2-assert-expected-not-null.cpp2(7): error C2062: type 'int' unexpected
pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '{'
pure2-assert-expected-not-null.cpp2(7): error C2143: syntax error: missing ';' before '}'
pure2-assert-expected-not-null.cpp2(9): error C2065: 'ex': undeclared identifier
pure2-assert-expected-not-null.cpp2(9): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
..\..\..\include\cpp2util.h(1132): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
pure2-assert-expected-not-null.cpp2(9): error C2100: you cannot dereference an operand of type '<error>'
pure2-assert-expected-not-null.cpp2(14): error C2039: 'expected': is not a member of 'std'
predefined C++ types (compiler internal)(357): note: see declaration of 'std'
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std'
pure2-assert-expected-not-null.cpp2(14): error C2062: type 'int' unexpected
pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '{'
pure2-assert-expected-not-null.cpp2(14): error C2039: 'unexpected': is not a member of 'std'
predefined C++ types (compiler internal)(357): note: see declaration of 'std'
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\variant(37): note: see declaration of 'std'
pure2-assert-expected-not-null.cpp2(14): error C2660: 'unexpected': function does not take 1 arguments
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.43.34808\include\eh.h(33): note: see declaration of 'unexpected'
C:\Program Files\Microsoft Visual Studio\18\Enterprise\VC\Tools\MSVC\14.51.36231\include\eh.h(33): note: see declaration of 'unexpected'
pure2-assert-expected-not-null.cpp2(14): note: while trying to match the argument list '(bool)'
pure2-assert-expected-not-null.cpp2(14): error C2143: syntax error: missing ';' before '}'
pure2-assert-expected-not-null.cpp2(15): error C2065: 'ex': undeclared identifier
pure2-assert-expected-not-null.cpp2(15): error C2672: 'cpp2::impl::assert_not_null': no matching overloaded function found
..\..\..\include\cpp2util.h(1132): note: could be 'decltype(auto) cpp2::impl::assert_not_null(_T0 &&,std::source_location)'
pure2-assert-expected-not-null.cpp2(15): error C2100: you cannot dereference an operand of type '<error>'
Loading
Loading