File tree Expand file tree Collapse file tree 1 file changed +20
-15
lines changed
templates/.github/workflows Expand file tree Collapse file tree 1 file changed +20
-15
lines changed Original file line number Diff line number Diff line change 1313
1414jobs :
1515 test :
16+ name : Test (${{ matrix.name }})
1617 strategy :
18+ fail-fast : false
1719 matrix :
18- os : [ubuntu-latest, macos-latest, windows-latest]
19- compiler : [gcc, clang, msvc]
20- exclude :
21- - os : ubuntu-latest
22- compiler : msvc
23- - os : macos-latest
24- compiler : msvc
25- - os : macos-latest
26- compiler : gcc
27- - os : windows-latest
28- compiler : gcc
29- - os : windows-latest
30- compiler : clang
20+ include :
21+ - name : Ubuntu GCC
22+ os : ubuntu-latest
23+ cc : gcc
24+ cxx : g++
25+ - name : Ubuntu Clang
26+ os : ubuntu-latest
27+ cc : clang
28+ cxx : clang++
29+ - name : macOS
30+ os : macos-latest
31+ - name : Windows
32+ os : windows-latest
3133
3234 runs-on : ${{ matrix.os }}
3335
3638
3739 - name : Configure CMake
3840 run : cmake --preset=test
41+ env :
42+ CC : ${{ matrix.cc }}
43+ CXX : ${{ matrix.cxx }}
3944
4045 - name : Build
4146 run : cmake --build --preset=test
6873 mkdir -p ${{ runner.temp }}/test-find-package
6974 cd ${{ runner.temp }}/test-find-package
7075
71- # Get project name from CMakeLists.txt
72- PACKAGE_NAME=$(grep -m1 " project(" "${{ github.workspace }}/CMakeLists.txt" | sed 's/project(\ ([^)]*\)) .*/\1/' | awk '{print $1} ')
76+ # Get project name from CMakeLists.txt (handles multi-line project() declarations)
77+ PACKAGE_NAME=$(sed -n '/ project(/,/)/p' "${{ github.workspace }}/CMakeLists.txt" | tr '\n' ' ' | sed 's/.* project([ \t]*\ ([^ \t )]*\).*/\1/')
7378
7479 # Convert paths to forward slashes for CMake (works on all platforms)
7580 INSTALL_PREFIX=$(echo "${{ runner.temp }}/install" | sed 's|\\|/|g')
You can’t perform that action at this time.
0 commit comments