-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #180 from ValeevGroup/evaleev/fix/ci-bump-to-ubunt…
…u-22 [ci] bump to ubuntu 22 + fix `ccache`
- Loading branch information
Showing
4 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,19 +10,21 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
build_type : [ Release, Debug ] | ||
os : [ macos-latest, ubuntu-20.04 ] | ||
os : [ macos-latest, ubuntu-22.04 ] | ||
linalg : [netlib, vendor] | ||
include: | ||
- os: ubuntu-20.04 | ||
cxx: /usr/bin/g++-9 | ||
- os: ubuntu-22.04 | ||
cc: /usr/bin/gcc-12 | ||
cxx: /usr/bin/g++-12 | ||
- os: macos-latest | ||
cc: clang | ||
cxx: clang++ | ||
|
||
name: "${{ matrix.os }}: ${{ matrix.cxx }} ${{ matrix.build_type }} linalg=${{ matrix.linalg }}" | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CXX : ${{ matrix.cxx }} | ||
DOXYGEN_VERSION : 1.9.2 | ||
DOXYGEN_VERSION : 1.12.0 | ||
CCACHE_DIR : ${{github.workspace}}/build/.ccache | ||
CCACHE_COMPRESS : true | ||
CCACHE_COMPRESSLEVEL : 6 | ||
|
@@ -45,7 +47,7 @@ jobs: | |
- name: Install prerequisite MacOS packages | ||
if: ${{ matrix.os == 'macos-latest' }} | ||
run: | | ||
brew install ninja gcc@10 boost eigen open-mpi bison ccache | ||
brew install ninja boost eigen open-mpi bison ccache | ||
# install Netlib if want generic linalg | ||
if [ "${{matrix.linalg}}" = "netlib" ]; then | ||
brew install lapack | ||
|
@@ -55,17 +57,17 @@ jobs: | |
fi | ||
- name: Install prerequisites Ubuntu packages | ||
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
if: ${{ matrix.os == 'ubuntu-22.04' }} | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install ninja-build g++-9 liblapack-dev libboost-dev libboost-serialization-dev libboost-random-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache | ||
sudo apt-get install ninja-build g++-12 liblapack-dev libboost-dev libboost-serialization-dev libboost-random-dev libeigen3-dev openmpi-bin libopenmpi-dev libtbb-dev ccache | ||
if [ "${{matrix.build_type}}" = "Release" ]; then | ||
sudo apt-get install libclang1-9 libclang-cpp9 graphviz fonts-liberation | ||
sudo apt-get install graphviz fonts-liberation | ||
cd ${{github.workspace}}/build | ||
# If we fail getting doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz from sourceforge, | ||
# use EFV's gdrive mirror of 1.9.2 to work around the unreliable sourceforge | ||
# the sharing link: https://drive.google.com/file/d/16GXpH4YOEUxGXQrXOKdAIibhdfzATY0d/view?usp=sharing | ||
wget https://downloads.sourceforge.net/project/doxygen/rel-${DOXYGEN_VERSION}/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz || wget -4 --no-check-certificate -O doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz "https://drive.google.com/uc?export=download&id=16GXpH4YOEUxGXQrXOKdAIibhdfzATY0d" | ||
wget https://www.doxygen.nl/files/doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz | ||
tar xzf ./doxygen-${DOXYGEN_VERSION}.linux.bin.tar.gz | ||
export DOXYGEN_DIR=${{github.workspace}}/build/doxygen-${DOXYGEN_VERSION} | ||
${DOXYGEN_DIR}/bin/doxygen --version | ||
|
@@ -85,20 +87,10 @@ jobs: | |
echo "BLAS_PREFERENCE_LIST=ReferenceBLAS" >> $GITHUB_ENV | ||
fi | ||
- name: Prepare ccache timestamp | ||
id: ccache_cache_timestamp | ||
shell: cmake -P {0} | ||
run: | | ||
string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) | ||
message("::set-output name=timestamp::${current_date}") | ||
- name: Setup ccache cache files | ||
uses: actions/[email protected] | ||
- name: Setup ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
path: ${{github.workspace}}/build/.ccache | ||
key: ${{ matrix.config.name }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }} | ||
restore-keys: | | ||
${{ matrix.config.name }}-ccache- | ||
key: ccache-${{ matrix.os }}-${{ matrix.build_type }}-${{ matrix.linalg }} | ||
|
||
- name: Configure CMake | ||
# Use a bash shell so we can use the same syntax for environment variable | ||
|
@@ -109,7 +101,7 @@ jobs: | |
# and build directories, but this is only available with CMake 3.13 and higher. | ||
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | ||
run: | | ||
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBLAS_PREFERENCE_LIST=$BLAS_PREFERENCE_LIST $BUILD_CONFIG | ||
cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DBLAS_PREFERENCE_LIST=$BLAS_PREFERENCE_LIST $BUILD_CONFIG || (cat CMakeFiles/CMakeConfigureLog.yaml) | ||
- name: Build | ||
working-directory: ${{github.workspace}}/build | ||
|
@@ -138,7 +130,7 @@ jobs: | |
cmake --build test_install | ||
- name: Build+Deploy Dox | ||
if: ${{ matrix.os == 'ubuntu-20.04' && matrix.build_type == 'Release' && github.ref == 'refs/heads/master' }} | ||
if: ${{ matrix.os == 'ubuntu-22.04' && matrix.build_type == 'Release' && github.ref == 'refs/heads/master' }} | ||
working-directory: ${{github.workspace}}/build | ||
shell: bash | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters