-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* basic action testing on ubuntu-latest, DEVEL_BUILD=ON/OFF * add github actions badge and remove Travis badge fixes #888
- Loading branch information
1 parent
a491381
commit 843eb25
Showing
2 changed files
with
75 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build-test CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# the agent machine operating systems | ||
os: [ubuntu-latest] | ||
DEVEL_BUILD: ["OFF", "ON"] | ||
EXTRA_BUILD_FLAGS: ["-DUSE_ITK=ON"] | ||
CMAKE_BUILD_TYPE: ["Release"] | ||
# let's run all of them, as opposed to aborting when one fails | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- name: install_dependencies | ||
run: | ||
cd ${GITHUB_WORKSPACE}; | ||
git clone https://github.com/CCPPETMR/SIRF-SuperBuild --recursive -b master; | ||
cd SIRF-SuperBuild/docker; | ||
sudo bash raw-ubuntu.sh; | ||
sudo bash build_essential-ubuntu.sh; | ||
sudo bash build_python-ubuntu.sh; | ||
sudo bash build_gadgetron-ubuntu.sh; | ||
sudo bash build_system-ubuntu.sh; | ||
bash user_python-ubuntu.sh ~/virtualenv python3 ; | ||
- name: ccache | ||
uses: hendrikmuhs/ccache-action@v1 | ||
with: | ||
key: ${{ matrix.os }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ matrix.DEVEL_BUILD }} | ||
- name: configure | ||
shell: bash | ||
env: | ||
EXTRA_BUILD_FLAGS: ${{ matrix.EXTRA_BUILD_FLAGS }} | ||
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }} | ||
DEVEL_BUILD: "-DDEVEL_BUILD=${{ matrix.DEVEL_BUILD }}" | ||
run: | | ||
set -ex; | ||
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" | ||
cmake --version | ||
#echo "cmake flags $BUILD_FLAGS $EXTRA_BUILD_FLAGS" | ||
BUILD_FLAGS="-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DUSE_SYSTEM_ACE=ON -DUSE_SYSTEM_Armadillo=ON -DUSE_SYSTEM_Boost=ON -DUSE_SYSTEM_FFTW3=ON -DUSE_SYSTEM_HDF5=ON -DBUILD_siemens_to_ismrmrd=ON -DUSE_SYSTEM_SWIG=ON -DCMAKE_INSTALL_PREFIX=~/install -DPYVER=3"; | ||
BUILD_FLAGS="$BUILD_FLAGS -DSIRF_SOURCE_DIR:PATH=${GITHUB_WORKSPACE} -DDISABLE_GIT_CHECKOUT_SIRF=ON" | ||
# only test SIRF (others are tested in the SIRF-SuperBuild action) | ||
BUILD_FLAGS="$BUILD_FLAGS -DBUILD_TESTING_GADGETRON=OFF -DBUILD_TESTING_ISMRMRD=OFF" | ||
mkdir -p build/; | ||
cd build; | ||
export CC="gcc-7"; | ||
export CXX="g++-7"; | ||
source ~/virtualenv/bin/activate; | ||
cmake -S ../SIRF-SuperBuild ${BUILD_FLAGS} ${EXTRA_BUILD_FLAGS} ${DEVEL_BUILD}; | ||
- name: build | ||
shell: bash | ||
run: | ||
cd ${GITHUB_WORKSPACE}/build; | ||
source ~/virtualenv/bin/activate; | ||
cmake --build . -j 2; | ||
- name: tests | ||
shell: bash | ||
run: | | ||
bash -ev ${GITHUB_WORKSPACE}/SIRF-SuperBuild/docker/ctest_sirf.sh |
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