Skip to content

Commit

Permalink
Merge pull request #103 from KrisThielemans/prep_1.2.12
Browse files Browse the repository at this point in the history
Prep for 1.2.12
  • Loading branch information
KrisThielemans authored Dec 9, 2024
2 parents 3ad7877 + 310435a commit f98b6a1
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 50 deletions.
176 changes: 176 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
name: Build and ctest and recon_test_pack CI

on:
push:
branches:
- master
paths-ignore:
- '.appveyor.yml'
- 'CITATION.cff'
- '**/*.md'
- '**/*.html'
- '**/*.htm'
- '**/*.tex'

pull_request:
branches:
- master
paths-ignore:
- '.appveyor.yml'
- 'CITATION.cff'
- '**/*.md'
- '**/*.html'
- '**/*.htm'
- '**/*.tex'

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
BUILD_TYPE: "Release"
- os: ubuntu-latest
compiler: gcc
compiler_version: 9
BUILD_TYPE: "Debug"
- os: ubuntu-latest
compiler: gcc
compiler_version: 13
BUILD_TYPE: "Release"
- os: ubuntu-latest
compiler: clang
BUILD_TYPE: "Release"

# let's run all of them, as opposed to aborting when one fails
fail-fast: false

name: ${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-${{ matrix.BUILD_TYPE }}

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: set_compiler_variables
shell: bash
run: |
set -ex
if test 'XX${{ matrix.compiler }}' = 'XXclang'; then
CC="clang"
CXX="clang++"
elif test 'XX${{ matrix.compiler }}' = 'XXgcc'; then
CC="gcc"
CXX="g++"
fi
if test 'XX${{ matrix.compiler_version }}' != 'XX'; then
CC=${CC}-${{ matrix.compiler_version }}
CXX=${CXX}-${{ matrix.compiler_version }}
fi
if test 'XX${{ matrix.os }}' = 'XXmacOS-latest'; then
if test 'XX${{ matrix.compiler }}' = 'XXclang'; then
brew install llvm@${{ matrix.compiler_version }}
if test XX${HOMEBREW_PREFIX} = XX; then
HOMEBREW_PREFIX=/usr/local
fi
LDFLAGS="-L$HOMEBREW_PREFIX/opt/llvm/lib/c++ -Wl,-rpath,$HOMEBREW_PREFIX/opt/llvm/lib/c++"
# make available to jobs below
echo LDFLAGS="$LDFLAGS" >> $GITHUB_ENV
CC="$HOMEBREW_PREFIX/opt/llvm/bin/clang"
CXX="$HOMEBREW_PREFIX/opt/llvm/bin/clang++"
fi
fi
export CC CXX
# make available to jobs below
echo CC="$CC" >> $GITHUB_ENV
echo CXX="$CXX" >> $GITHUB_ENV
- name: install_dependencies
shell: bash
run: |
set -ex
# We will install some external dependencies here
CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install
case ${{matrix.os}} in
(ubuntu*)
sudo apt update
# install compiler
if test 'XX${{ matrix.compiler }}' = 'XXclang'; then
# package is called clang, need libomp-dev for OpenMP support
sudo apt install $CC libomp-dev
else
sudo apt install $CXX
fi
# other dependencies
sudo apt install libinsighttoolkit5-dev
(macOS*)
brew install itk
;;
esac
echo PYTHON_EXECUTABLE="$PYTHON_EXECUTABLE" >> $GITHUB_ENV
- name: ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: ${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-${{ matrix.BUILD_TYPE }}

- name: configure
shell: bash
env:
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
BUILD_FLAGS: ${{ matrix.BUILD_FLAGS }}
run: |
set -ex
cmake --version
if test "XX$CC" != "XX"; then
$CC --version
$CXX --version
fi
CMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/install
# make available to jobs below
echo CMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" >> $GITHUB_ENV
EXTRA_BUILD_FLAGS="-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${BUILD_TYPE}"
echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS"
mkdir build
cd build
cmake -S .. ${BUILD_FLAGS} ${EXTRA_BUILD_FLAGS}
- name: build
shell: bash
env:
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
run: |
cd ${GITHUB_WORKSPACE}/build;
cmake --build . -j 2 --config ${BUILD_TYPE}} --target install
- name: ctest
shell: bash
env:
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
run: |
set -vx
cd ${GITHUB_WORKSPACE}/build
ctest --output-on-failure -C ${BUILD_TYPE}
- name: Upload ctest log files for debugging
uses: actions/upload-artifact@v4
if: failure()
with:
name: ctest_log_files-${{ matrix.os }}-${{ matrix.compiler }}${{ matrix.compiler_version }}-${{ matrix.BUILD_TYPE }}
path: |
${{ github.workspace }}/build/**/*.log
retention-days: 7

- name: CPack
shell: bash
env:
BUILD_TYPE: ${{ matrix.BUILD_TYPE }}
run: |
set -vx
cd ${GITHUB_WORKSPACE}/build
cpack
48 changes: 0 additions & 48 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ endif()

SET(VERSION_MAJOR 1)
SET(VERSION_MINOR 2)
SET(VERSION_PATCH 11)
SET(VERSION_PATCH 12)

MAKE_DIRECTORY(${PROJECT_BINARY_DIR}/config)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# PETPVC
[![Build Status](https://travis-ci.org/UCL/PETPVC.svg?branch=master)](https://travis-ci.org/UCL/PETPVC) [![Build Status](https://dev.azure.com/petpvc/petpvc/_apis/build/status/UCL.PETPVC?branchName=master)](https://dev.azure.com/petpvc/petpvc/_build/latest?definitionId=1&branchName=master) [![Build status](https://ci.appveyor.com/api/projects/status/7kk9ua9r0lybinwa/branch/master?svg=true)](https://ci.appveyor.com/project/bathomas/petpvc/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ab83c41f20194c2c82fbc74e8788f928)](https://www.codacy.com/app/bathomas/PETPVC?utm_source=github.com&utm_medium=referral&utm_content=UCL/PETPVC&utm_campaign=badger) [![DOI](https://zenodo.org/badge/17082200.svg)](https://zenodo.org/badge/latestdoi/17082200)
[![Build Status](https://dev.azure.com/petpvc/petpvc/_apis/build/status/UCL.PETPVC?branchName=master)](https://dev.azure.com/petpvc/petpvc/_build/latest?definitionId=1&branchName=master) [![Build status](https://ci.appveyor.com/api/projects/status/7kk9ua9r0lybinwa/branch/master?svg=true)](https://ci.appveyor.com/project/bathomas/petpvc/branch/master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ab83c41f20194c2c82fbc74e8788f928)](https://www.codacy.com/app/bathomas/PETPVC?utm_source=github.com&utm_medium=referral&utm_content=UCL/PETPVC&utm_campaign=badger) [![DOI](https://zenodo.org/badge/17082200.svg)](https://zenodo.org/badge/latestdoi/17082200)

PETPVC: toolbox for partial volume correction (PVC) in positron emission tomography (PET)

Expand Down

0 comments on commit f98b6a1

Please sign in to comment.