Enable automatic compiler caching #64
Workflow file for this 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
name: CMake checks | |
on: | |
push: | |
jobs: | |
linux-clang-build: | |
runs-on: ubuntu-latest | |
env: | |
QT_SELECT: qt5 | |
SCCACHE_GHA_ENABLED: "true" | |
SCCACHE_CACHE_SIZE: "2G" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install clang libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev ninja-build | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.3 | |
- name: configure | |
run: cmake --preset ci-release-checks -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ . | |
- name: build | |
run: cmake --build ../mrtrix3-build-ci-release-checks | |
- name: unit tests | |
run: ctest -R unit --test-dir ../mrtrix3-build-ci-release-checks | |
- name: binary tests | |
run: ctest -R bin --test-dir ../mrtrix3-build-ci-release-checks | |
linux-gcc-build: | |
runs-on: ubuntu-latest | |
env: | |
QT_SELECT: qt5 | |
SCCACHE_GHA_ENABLED: "true" | |
SCCACHE_CACHE_SIZE: "2G" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install g++-9 libqt5opengl5-dev libqt5svg5-dev libglvnd-dev libeigen3-dev zlib1g-dev libfftw3-dev ninja-build | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.3 | |
- name: configure | |
run: cmake --preset ci-release-checks | |
- name: build | |
run: cmake --build ../mrtrix3-build-ci-release-checks | |
- name: unit tests | |
run: ctest -R unit --test-dir ../mrtrix3-build-ci-release-checks | |
- name: binary tests | |
run: ctest -R bin --test-dir ../mrtrix3-build-ci-release-checks | |
macos-build: | |
runs-on: macos-latest | |
env: | |
PACKAGES: "qt5 eigen pkg-config fftw libpng ninja cmake" | |
SCCACHE_GHA_ENABLED: "true" | |
SCCACHE_CACHE_SIZE: "2G" | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- name: install dependencies | |
run: | | |
brew update || brew update # https://github.com/Homebrew/brew/issues/2491#issuecomment-294207661 | |
brew install $PACKAGES || brew install $PACKAGES | |
brew link --force qt5 | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.3 | |
- name: configure | |
run: | | |
export PATH=/usr/local/opt/qt5/bin:$PATH | |
cmake --preset ci-release-checks | |
- name: build | |
run: cmake --build ../mrtrix3-build-ci-release-checks | |
- name: unit tests | |
run: ctest -R unit --test-dir ../mrtrix3-build-ci-release-checks | |
- name: binary tests | |
run: ctest -R bin --test-dir ../mrtrix3-build-ci-release-checks | |
windows-build: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
env: | |
# CFLAGS: -Werror | |
CHERE_INVOKING: enabled_from_arguments | |
MINGW_PACKAGE_PREFIX: mingw-w64-ucrt-x86_64 | |
SCCACHE_GHA_ENABLED: "true" | |
SCCACHE_CACHE_SIZE: "2G" | |
SCCACHE_DIR: ${{ github.workspace }}/.sccache | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
- uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
release: false | |
install: | | |
git | |
python | |
${{env.MINGW_PACKAGE_PREFIX}}-bc | |
${{env.MINGW_PACKAGE_PREFIX}}-cmake | |
${{env.MINGW_PACKAGE_PREFIX}}-diffutils | |
${{env.MINGW_PACKAGE_PREFIX}}-eigen3 | |
${{env.MINGW_PACKAGE_PREFIX}}-fftw | |
${{env.MINGW_PACKAGE_PREFIX}}-gcc | |
${{env.MINGW_PACKAGE_PREFIX}}-libtiff | |
${{env.MINGW_PACKAGE_PREFIX}}-ninja | |
${{env.MINGW_PACKAGE_PREFIX}}-pkg-config | |
${{env.MINGW_PACKAGE_PREFIX}}-qt5-base | |
${{env.MINGW_PACKAGE_PREFIX}}-qt5-svg | |
${{env.MINGW_PACKAGE_PREFIX}}-zlib | |
- name: Run sccache-cache | |
uses: mozilla-actions/sccache-action@v0.0.3 | |
- name: export sccache to msys2 shell | |
run: | | |
export SCCACHE_UNIX_PATH=$(cygpath -u "$SCCACHE_PATH") | |
echo "SCCACHE_UNIX_PATH=$SCCACHE_UNIX_PATH" >> $GITHUB_ENV | |
- name: configure | |
run: cmake --preset ci-release-checks -DCMAKE_CXX_COMPILER_LAUNCHER=${{env.SCCACHE_UNIX_PATH}} . | |
- name: build | |
run: cmake --build ../mrtrix3-build-ci-release-checks | |
- name: unit tests | |
run: ctest -R unit --test-dir ../mrtrix3-build-ci-release-checks | |
- name: binary tests | |
run: ctest -R bin --test-dir ../mrtrix3-build-ci-release-checks | |
secondary-checks: | |
runs-on: ubuntu-latest | |
env: | |
QT_SELECT: qt5 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install pylint python3-sphinx sphinx-rtd-theme-common python3-recommonmark python3-sphinx-rtd-theme python3-pip python3-sphinx-notfound-page | |
- name: check syntax | |
run: ./check_syntax || { cat syntax.log; false; } | |
- name: pylint | |
run: | | |
echo "__version__ = 'pylint testing' #pylint: disable=unused-variable" > ./python/lib/mrtrix3/_version.py | |
./run_pylint || { cat pylint.log; false; } | |
- name: check copyright headers | |
run: ./update_copyright && git diff --exit-code | |
- name: check building of documentation | |
run: python3 -m sphinx -n -N -W -w sphinx.log docs/ tmp/ |