@@ -2,9 +2,9 @@ name: build
22
33on :
44 push :
5- branches : [ unstable ]
5+ branches : [ unstable, '[0-9]+.[0-9]+.x' ]
66 pull_request :
7- branches : [ unstable ]
7+ branches : [ unstable, '[0-9]+.[0-9]+.x' ]
88 workflow_call :
99 workflow_dispatch :
1010
2525 strategy :
2626 fail-fast : false
2727 matrix :
28- include :
29- - {os: ubuntu-24.04, cc: gcc, cxx: g++, doc: OFF}
30- - {os: ubuntu-24.04, cc: clang, cxx: clang++, doc: OFF}
31- - {os: macos-14, cc: gcc-14, cxx: g++-14, doc: OFF}
32- - {os: macos-14, cc: clang, cxx: clang++, doc: ON}
28+ os : [ubuntu-24.04, macos-15]
29+ cxx : [g++, clang++]
3330
3431 runs-on : ${{ matrix.os }}
3532
3936 - uses : actions/cache/restore@v4
4037 with :
4138 path : ${{ env.CCACHE_DIR }}
42- key : ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
43- restore-keys :
44- ccache-${{ matrix.os }}-${{ matrix.cc }}-
39+ key : ccache-${{ matrix.os }}-${{ matrix.cxx }}-${{ github.run_id }}-${{ github.run_attempt }}
40+ restore-keys : |
41+ ccache-${{ matrix.os }}-${{ matrix.cxx }}-
42+
43+ - name : Set cxx variables
44+ run : |
45+ if [[ ${{ matrix.os }} == 'macos-15' && ${{ matrix.cxx }} == 'g++' ]]; then
46+ echo "CXX=g++-15" >> $GITHUB_ENV
47+ else
48+ echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
49+ fi
4550
4651 - name : Install ubuntu dependencies
4752 if : ${{ contains(matrix.os, 'ubuntu') }}
@@ -50,20 +55,18 @@ jobs:
5055 sudo apt-get install lsb-release wget software-properties-common &&
5156 sudo apt-get install
5257 ccache
58+ cmake
59+ ninja-build
5360 clang
61+ clang-tools
5462 g++
5563 gfortran
56- hdf5-tools
57- libblas-dev
5864 libclang-dev
5965 libc++-dev
6066 libc++abi-dev
6167 libomp-dev
62- libfftw3-dev
6368 libgfortran5
6469 libgmp-dev
65- libhdf5-dev
66- liblapack-dev
6770 libopenmpi-dev
6871 openmpi-bin
6972 openmpi-common
@@ -75,12 +78,11 @@ jobs:
7578 python3-numpy
7679 python3-pip
7780 python3-scipy
78- python3-sphinx
79- python3-nbsphinx
81+ python3-ipython
8082
8183 - name : Set up virtualenv
8284 run : |
83- mkdir $HOME/.venv
85+ mkdir -p $HOME/.venv
8486 python3 -m venv --system-site-packages $HOME/.venv/my_python
8587 source $HOME/.venv/my_python/bin/activate
8688 echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
@@ -95,24 +97,18 @@ jobs:
9597 pip install -r requirements.txt
9698 echo "PATH=$(brew --prefix llvm)/bin:$(brew --prefix gcc)/bin:$PATH" >> $GITHUB_ENV
9799 echo "PYTHONPATH=$(brew --prefix llvm)/lib/python3.13/site-packages" >> $GITHUB_ENV
100+ echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
101+ echo "LDFLAGS=-L$(brew --prefix llvm)/lib/c++ -L$(brew --prefix llvm)/lib/unwind -lunwind" >> $GITHUB_ENV
98102
99103 - name : Add clang CXXFLAGS
100- if : ${{ contains( matrix.cxx, 'clang') }}
104+ if : ${{ matrix.cxx == 'clang++' }}
101105 run : |
102106 echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
103107
104- - name : Add clang LDFLAGS for macos to link against brew's libc++
105- if : ${{ contains(matrix.os, 'macos') && contains(matrix.cxx, 'clang') }}
106- run : |
107- echo 'LDFLAGS="-L$(brew --prefix llvm)/lib/c++ -L$(brew --prefix llvm)/lib -lunwind"' >> $GITHUB_ENV
108-
109108 - name : Build itertools
110- env :
111- CC : ${{ matrix.cc }}
112- CXX : ${{ matrix.cxx }}
113109 run : |
114- mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
115- make -j2 || make -j1 VERBOSE=1
110+ cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
111+ cmake --build build --verbose
116112
117113 - name : Test itertools
118114 env :
@@ -129,7 +125,7 @@ jobs:
129125 if : always()
130126 with :
131127 path : ${{ env.CCACHE_DIR }}
132- key : ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
128+ key : ccache-${{ matrix.os }}-${{ matrix.cxx }}-${{ github.run_id }}-${{ github.run_attempt }}
133129
134130 - name : Deploy documentation
135131 if : matrix.doc == 'ON' && github.ref == 'refs/heads/unstable'
0 commit comments