@@ -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,21 @@ 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
5664 hdf5-tools
57- libblas-dev
5865 libclang-dev
5966 libc++-dev
6067 libc++abi-dev
6168 libomp-dev
62- libfftw3-dev
6369 libgfortran5
6470 libgmp-dev
6571 libhdf5-dev
66- liblapack -dev
72+ libopenblas -dev
6773 libopenmpi-dev
6874 openmpi-bin
6975 openmpi-common
@@ -75,12 +81,11 @@ jobs:
7581 python3-numpy
7682 python3-pip
7783 python3-scipy
78- python3-sphinx
79- python3-nbsphinx
84+ python3-ipython
8085
8186 - name : Set up virtualenv
8287 run : |
83- mkdir $HOME/.venv
88+ mkdir -p $HOME/.venv
8489 python3 -m venv --system-site-packages $HOME/.venv/my_python
8590 source $HOME/.venv/my_python/bin/activate
8691 echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> $GITHUB_ENV
@@ -95,24 +100,18 @@ jobs:
95100 pip install -r requirements.txt
96101 echo "PATH=$(brew --prefix llvm)/bin:$(brew --prefix gcc)/bin:$PATH" >> $GITHUB_ENV
97102 echo "PYTHONPATH=$(brew --prefix llvm)/lib/python3.13/site-packages" >> $GITHUB_ENV
103+ echo "SDKROOT=$(xcrun --show-sdk-path)" >> $GITHUB_ENV
104+ echo "LDFLAGS=-L$(brew --prefix llvm)/lib/c++ -L/opt/homebrew/opt/llvm/lib/unwind -lunwind" >> $GITHUB_ENV
98105
99106 - name : Add clang CXXFLAGS
100- if : ${{ contains( matrix.cxx, 'clang') }}
107+ if : ${{ matrix.cxx == 'clang++' }}
101108 run : |
102109 echo "CXXFLAGS=-stdlib=libc++" >> $GITHUB_ENV
103110
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-
109111 - name : Build h5
110- env :
111- CC : ${{ matrix.cc }}
112- CXX : ${{ matrix.cxx }}
113112 run : |
114- mkdir build && cd build && cmake .. -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
115- make -j2 || make -j1 VERBOSE=1
113+ cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/install -DBuild_Documentation=${{ matrix.doc }}
114+ cmake --build build --verbose
116115
117116 - name : Test h5
118117 env :
@@ -129,7 +128,7 @@ jobs:
129128 if : always()
130129 with :
131130 path : ${{ env.CCACHE_DIR }}
132- key : ccache-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }}
131+ key : ccache-${{ matrix.os }}-${{ matrix.cxx }}-${{ github.run_id }}-${{ github.run_attempt }}
133132
134133 - name : Deploy documentation
135134 if : matrix.doc == 'ON' && github.ref == 'refs/heads/unstable'
0 commit comments