Skip to content

Commit e6902b4

Browse files
Upgraded compilers to the latest available versions (#84)
- [x] Darwin: AppleClang, brew-GCC15 - [x] Ubuntu: GCC14, Clang-20, mingw-GCC14
2 parents 26e3408 + 3bdf959 commit e6902b4

12 files changed

Lines changed: 224 additions & 19 deletions
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Darwin
2+
name: Darwin AppleClang
33

44
on:
55
workflow_dispatch:
@@ -29,7 +29,7 @@ on:
2929
- 'examples/cmake/*.cmake'
3030

3131
jobs:
32-
darwin:
32+
build:
3333
runs-on: macos-13
3434
# see https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
3535
env:
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Darwin Brew
2+
name: Darwin Brew GCC15
33

44
on:
55
workflow_dispatch:
@@ -29,7 +29,7 @@ on:
2929
- 'examples/cmake/*.cmake'
3030

3131
jobs:
32-
darwin-brew-gcc14:
32+
build:
3333
runs-on: macos-13
3434
# see https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md
3535
env:
@@ -51,7 +51,7 @@ jobs:
5151
xcode-version: '14.3.1'
5252
- name: Get Home Brew dependencies
5353
run: |
54-
brew install -q cmake ninja ccache gcc@14 flex bison wget curl coreutils automake autoconf libtool gnu-sed gawk
54+
brew install -q cmake ninja ccache gcc@15 flex bison wget curl coreutils automake autoconf libtool gnu-sed gawk
5555
NINJA_PATH=$(brew --prefix ninja)/bin
5656
BISON_PATH=$(brew --prefix bison)/bin
5757
FLEX_PATH=$(brew --prefix flex)/bin
@@ -64,7 +64,7 @@ jobs:
6464
- name: Compute CCache keys
6565
id: darwin-keys
6666
run: |
67-
key2=ccache-darwin-brew-gcc14-
67+
key2=ccache-darwin-brew-gcc15-
6868
key1="${key2}$(date +%W)"
6969
echo "key1=${key1}" >> $GITHUB_OUTPUT
7070
echo "key2=${key2}" >> $GITHUB_OUTPUT
@@ -84,18 +84,18 @@ jobs:
8484
id: restore-libs
8585
uses: actions/cache/restore@v4
8686
with:
87-
path: local/darwin-brew-gcc14
88-
key: libs-darwin-brew-gcc14-${{ hashFiles('getlibs.sh') }}
89-
restore-keys: libs-darwin-brew-gcc14
87+
path: local/darwin-brew-gcc15
88+
key: libs-darwin-brew-gcc15-${{ hashFiles('getlibs.sh') }}
89+
restore-keys: libs-darwin-brew-gcc15
9090
- name: Get library dependencies
9191
if: steps.restore-libs.outputs.cache-hit != 'true'
92-
run: ./getlibs.sh darwin-brew-gcc14
92+
run: ./getlibs.sh darwin-brew-gcc15
9393
- name: Store Libs Cache
9494
if: steps.restore-libs.outputs.cache-hit != 'true'
9595
id: save-libs
9696
uses: actions/cache/save@v4
9797
with:
98-
path: local/darwin-brew-gcc14
98+
path: local/darwin-brew-gcc15
9999
key: ${{ steps.restore-libs.outputs.cache-primary-key }}
100100
- name: Configure UTAP
101101
run: cmake -B "$BUILD_DIR" -DUTAP_CLANG_TIDY=OFF
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
---
2+
name: Ubuntu Clang20
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
paths:
8+
- '**.h'
9+
- '**.c'
10+
- '**.hpp'
11+
- '**.cpp'
12+
- '**.y'
13+
- '**.l'
14+
- '**CMakeLists.txt'
15+
- 'cmake/*.cmake'
16+
- 'cmake/toolchain/*linux*.cmake'
17+
- 'examples/cmake/*.cmake'
18+
pull_request:
19+
paths:
20+
- '**.h'
21+
- '**.c'
22+
- '**.hpp'
23+
- '**.cpp'
24+
- '**.y'
25+
- '**.l'
26+
- '**CMakeLists.txt'
27+
- 'cmake/*.cmake'
28+
- 'cmake/toolchain/*linux*.cmake'
29+
- 'examples/cmake/*.cmake'
30+
31+
jobs:
32+
build:
33+
runs-on: ubuntu-latest
34+
env:
35+
CCACHE_DIR: ${{ github.workspace }}/CCACHE
36+
BUILD_DIR: build-x86_64-linux64-clang20
37+
CTEST_OUTPUT_ON_FAILURE: 1
38+
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/cmake/toolchain/x86_64-linux-clang20.cmake
39+
CMAKE_PREFIX_PATH: ${{ github.workspace }}/local/x86_64-linux-clang20
40+
CMAKE_INSTALL_PREFIX: ${{ github.workspace }}/local/x86_64-linux-clang20
41+
CMAKE_GENERATOR: Ninja
42+
CMAKE_BUILD_TYPE: Debug
43+
CFLAGS: "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -fstrict-flex-arrays=2 -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address -fsanitize=leak -fstack-protector-strong"
44+
CXXFLAGS: "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3 -D_GLIBCXX_ASSERTIONS -fstrict-flex-arrays=2 -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address -fsanitize=leak -fstack-protector-strong"
45+
LDFLAGS: "-fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address -fsanitize=leak -fstack-protector-strong"
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Get Ubuntu dependencies
49+
run: |
50+
sudo apt-get -qq update
51+
sudo apt-get -qq install clang-format curl wget unzip xz-utils bison flex cmake ninja-build ccache clang-20
52+
53+
- name: Check Formatting
54+
run: |
55+
clang-format --version
56+
find src include test -iregex '.*\.\(c\|h\|cpp\|hpp\|cc\|hh\|cxx\|hxx\)$' -exec clang-format -n -Werror {} \;
57+
58+
- name: Compute CCache keys
59+
id: x86_64-linux-clang20-keys
60+
run: |
61+
key2=ccache-x86_64-linux-clang20-
62+
key1="${key2}$(date +%W)"
63+
echo "key1=${key1}" >> $GITHUB_OUTPUT
64+
echo "key2=${key2}" >> $GITHUB_OUTPUT
65+
66+
- name: Restore CCache
67+
id: ccache-restore
68+
uses: actions/cache@v4
69+
with:
70+
path: ${{ env.CCACHE_DIR }}
71+
key: ${{ steps.x86_64-linux-clang20-keys.outputs.key1 }}
72+
restore-keys: ${{ steps.x86_64-linux-clang20-keys.outputs.key2 }}
73+
- name: CCache limits and stats
74+
run: |
75+
ccache -M120M
76+
ccache --show-stats
77+
78+
- name: Restore Libs
79+
id: restore-libs
80+
uses: actions/cache/restore@v4
81+
with:
82+
path: local/x86_64-linux-clang20
83+
key: libs-x86_64-linux-clang20-${{ hashFiles('getlibs.sh') }}
84+
restore-keys: libs-x86_64-linux-clang20-
85+
- name: Get library dependencies
86+
if: steps.restore-libs.outputs.cache-hit != 'true'
87+
run: ./getlibs.sh x86_64-linux-clang20
88+
- name: Save Libs
89+
if: steps.restore-libs.outputs.cache-hit != 'true'
90+
id: save-libs
91+
uses: actions/cache/save@v4
92+
with:
93+
path: local/x86_64-linux-clang20
94+
key: ${{ steps.restore-libs.outputs.cache-primary-key }}
95+
- name: Configure UTAP
96+
run: cmake -B "$BUILD_DIR" -DUTAP_CLANG_TIDY=OFF
97+
- name: Build UTAP
98+
run: cmake --build "$BUILD_DIR" --config $CMAKE_BUILD_TYPE
99+
- name: Test UTAP
100+
run: ctest --test-dir "$BUILD_DIR" -C $CMAKE_BUILD_TYPE
101+
- name: Install UTAP
102+
run: cmake --install "$BUILD_DIR" --config $CMAKE_BUILD_TYPE --prefix "$CMAKE_INSTALL_PREFIX"
103+
- name: CCache Statistics
104+
run: ccache --show-stats
105+
- name: Configure Examples
106+
run: cmake -B examples/build -S examples
107+
- name: Build Examples
108+
run: cmake --build examples/build
109+
- name: Test Examples
110+
run: ctest --test-dir examples/build
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Ubuntu
2+
name: Ubuntu GCC14
33

44
on:
55
workflow_dispatch:
@@ -29,7 +29,7 @@ on:
2929
- 'examples/cmake/*.cmake'
3030

3131
jobs:
32-
linux-x86_64:
32+
build:
3333
runs-on: ubuntu-latest
3434
env:
3535
CCACHE_DIR: ${{ github.workspace }}/CCACHE
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: MinGW
2+
name: Ubuntu MinGW
33

44
on:
55
workflow_dispatch:
@@ -29,7 +29,7 @@ on:
2929
- 'examples/cmake/*.cmake'
3030

3131
jobs:
32-
mingw32-x86_64:
32+
build:
3333
runs-on: ubuntu-latest
3434
env:
3535
CCACHE_DIR: ${{ github.workspace }}/CCACHE
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
set(CMAKE_SYSTEM_NAME Darwin)
2+
set(CMAKE_SYSTEM_VERSION 10.15)
3+
4+
# cross compilers to use for C, C++
5+
set(CMAKE_C_COMPILER gcc-15)
6+
set(CMAKE_CXX_COMPILER g++-15)
7+
set(CMAKE_AR gcc-ar-15)
8+
set(CMAKE_NM gcc-nm-15)
9+
set(CMAKE_RANLIB gcc-ranlib-15)
10+
set(RANLIB gcc-ranlib-15)
11+
set(CMAKE_STRIP strip)
12+
13+
# target environment on the build host system
14+
set(CMAKE_FIND_ROOT_PATH ${CMAKE_PREFIX_PATH})
15+
16+
# modify default behavior of FIND_XXX() commands
17+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
18+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
19+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# the name of the target operating system
2+
set(CMAKE_SYSTEM_NAME Linux)
3+
4+
# which compilers to use for C and C++
5+
set(CMAKE_C_COMPILER clang)
6+
set(CMAKE_CXX_COMPILER clang++)
7+
set(CMAKE_C_FLAGS -m64)
8+
set(CMAKE_CXX_FLAGS -m64)
9+
10+
# where is the target environment located
11+
set(CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}")
12+
13+
# adjust the default behavior of the FIND_XXX() commands:
14+
# search programs in the host environment
15+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
16+
17+
# search headers and libraries in the target environment
18+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
19+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# the name of the target operating system
2+
set(CMAKE_SYSTEM_NAME Linux)
3+
4+
# which compilers to use for C and C++
5+
set(CMAKE_C_COMPILER clang-20)
6+
set(CMAKE_CXX_COMPILER clang++-20)
7+
set(CMAKE_C_FLAGS -m64)
8+
set(CMAKE_CXX_FLAGS -m64)
9+
10+
# where is the target environment located
11+
set(CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}")
12+
13+
# adjust the default behavior of the FIND_XXX() commands:
14+
# search programs in the host environment
15+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
16+
17+
# search headers and libraries in the target environment
18+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
19+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# the name of the target operating system
2+
set(CMAKE_SYSTEM_NAME Linux)
3+
4+
# which compilers to use for C and C++
5+
set(CMAKE_C_COMPILER clang-21)
6+
set(CMAKE_CXX_COMPILER clang++-21)
7+
set(CMAKE_C_FLAGS -m64)
8+
set(CMAKE_CXX_FLAGS -m64)
9+
10+
# where is the target environment located
11+
set(CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}")
12+
13+
# adjust the default behavior of the FIND_XXX() commands:
14+
# search programs in the host environment
15+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
16+
17+
# search headers and libraries in the target environment
18+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
19+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# the name of the target operating system
2+
set(CMAKE_SYSTEM_NAME Linux)
3+
4+
# which compilers to use for C and C++
5+
set(CMAKE_C_COMPILER gcc-15)
6+
set(CMAKE_CXX_COMPILER g++-15)
7+
set(CMAKE_C_FLAGS -m64)
8+
set(CMAKE_CXX_FLAGS -m64)
9+
10+
# where is the target environment located
11+
set(CMAKE_FIND_ROOT_PATH "${CMAKE_PREFIX_PATH}")
12+
13+
# adjust the default behavior of the FIND_XXX() commands:
14+
# search programs in the host environment
15+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
16+
17+
# search headers and libraries in the target environment
18+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
19+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

0 commit comments

Comments
 (0)