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
35 changes: 25 additions & 10 deletions .github/workflows/build-cppfront.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Multi-platform Build of cppfront

on:
pull_request:
paths-ignore:
Expand All @@ -8,16 +9,27 @@ on:
- 'docs/**'
workflow_dispatch:

permissions:
# Restrict permissions to read-only for security
contents: read

concurrency:
# Specific group name to cancel in-progress builds for the same PR/ref
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
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
# 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-unix-like:
strategy:
fail-fast: false
Expand All @@ -35,7 +47,10 @@ jobs:
- compiler: clang++-14
cxx-std: 'c++2b'
include:
- runs-on: macos-latest
- runs-on: macos-14
compiler: clang++
cxx-std: 'c++20'
- runs-on: macos-15
compiler: clang++
cxx-std: 'c++20'
- runs-on: ubuntu-22.04
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ on:
- 'docs/**'
workflow_dispatch:

permissions:
# Restrict permissions to read-only for security
contents: read

concurrency:
# Specific group name to cancel in-progress builds for the same PR/ref
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
regression-tests:
name: ${{ matrix.shortosname }} | ${{ matrix.compiler }} | ${{ matrix.cxx_std }} | ${{ matrix.stdlib }} | ${{ matrix.os }}
Expand Down Expand Up @@ -50,26 +59,17 @@ jobs:
compiler: clang++
cxx_std: c++2b
stdlib: default
- os: macos-13
shortosname: mac-13
compiler: clang++
cxx_std: c++2b
stdlib: default
- os: macos-13
shortosname: mac-13
compiler: clang++-15
cxx_std: c++2b
stdlib: default
- os: windows-2022
shortosname: win-22
compiler: cl.exe
cxx_std: c++latest
stdlib: default
- os: windows-2022
shortosname: win-22
compiler: cl.exe
cxx_std: c++20
stdlib: default
# Comment out Windows tests until build on Windows is fixed
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hsutter I did this to allow the tests to turn all green without the failure caused by build failures on Windows runners.
This will allow to quickly see if a PR adds regression or not without going into details of the failure each time and see if it only the Windows runner that fails.

I will try to have a look at those failures and fix the root cause. When it is fixed I will reenable Windows runners.

The same applies to the regression test workflow.

# - 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
steps:
- name: Checkout repo
uses: actions/checkout@v4
Expand Down
19 changes: 7 additions & 12 deletions regression-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,10 @@ else

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

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

printf "Full compiler version for '$cxx_compiler':\n$compiler_version\n\n"

if [[ -d "$exec_out_dir" ]]; then
printf "Full compiler version for '$cxx_compiler':\n$compiler_version\n\n"

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

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading