Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

CI: SimpleElastix on Github Actions, build wheel attempts. #430

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
7f6d49c
Create SuperBuild.yml
ViktorvdValk Dec 11, 2020
c2647b9
typo_build
ViktorvdValk Dec 11, 2020
fe1a361
ENH: SimpleElastix on GitHub Actions and wheel build progressions (#1)
ViktorvdValk Apr 21, 2021
5b65e26
ENH: Build wheel with make
ViktorvdValk May 31, 2021
850ccc0
ENH: Build wheel with ninja
ViktorvdValk Jun 1, 2021
8731bb0
CI: update cmake flag order
ViktorvdValk Jun 1, 2021
c3d15e0
CI: Standard Cmake command
ViktorvdValk Jun 2, 2021
4b74be5
CI: Complete cmake build
ViktorvdValk Jun 2, 2021
d0fcd01
CI: Cmake build with updated make command
ViktorvdValk Jun 2, 2021
879e7e1
CI: Correct path for dist directory
ViktorvdValk Jun 3, 2021
98e05e1
CI: No make command
ViktorvdValk Jun 7, 2021
74bc9f9
CI: Change dir structure for wheel build
ViktorvdValk Jun 14, 2021
a146727
CI: add -r flag for cp
ViktorvdValk Jun 14, 2021
aaa6ec3
CI: Install wheel with pip
ViktorvdValk Jun 15, 2021
0f2f7e2
CI: Build wheel for all OS
ViktorvdValk Jun 15, 2021
d5d8efe
CI: No windows call to MSVS
ViktorvdValk Jun 15, 2021
1467537
CI: Try ninja for windows
ViktorvdValk Jun 15, 2021
9fe8af0
CI: Shorten dir name
ViktorvdValk Jun 15, 2021
9c79fcf
CI: Fresh build
ViktorvdValk Jun 15, 2021
43546ce
CI: Windows build
ViktorvdValk Jun 15, 2021
ae7e310
CI: Cache correct dir
ViktorvdValk Jun 15, 2021
382f7b8
CI: Build python 3.9 wheels
ViktorvdValk Jun 15, 2021
3dbd779
CI: Build wheel python 3.8
ViktorvdValk Jun 16, 2021
54d72fb
CI: Build 3.7 again
ViktorvdValk Jun 17, 2021
997f317
CI:Disable_caching
ViktorvdValk Jun 21, 2021
8b56369
CI:Disable_windows_build_due_to_memory_limitations
ViktorvdValk Jun 22, 2021
1b90380
Update SimpleElastix (#3)
ViktorvdValk Sep 22, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
36 changes: 17 additions & 19 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
referenced:
defaults: &defaults
docker:
- image: circleci/python:3.5-stretch
- image: circleci/python:3.6-buster
working_directory: ~/
resource_class: medium
default_environment_keys: &default_environment
Expand All @@ -24,8 +24,8 @@ referenced:
command: |
sudo apt-get install -y rsync lua5.3 ccache
sudo python -m pip install --upgrade pip
sudo python -m pip install scikit-ci-addons # Provides "ctest_junit_formatter" add-on
sudo python -m pip install cmake==3.13.3
sudo python -m pip install scikit-ci-addons lxml # Provides "ctest_junit_formatter" add-on
sudo python -m pip install cmake==3.18.*
generate-hash-step: &generate-hash-step
run:
name: Generate external data hash
Expand Down Expand Up @@ -54,7 +54,7 @@ referenced:
command: |
echo 'export DASHBOARD_MODEL=$( [[ "$CIRCLE_BRANCH" = "master" || "$CIRCLE_BRANCH" = "next" || "$CIRCLE_BRANCH" = "release" ]] && echo Continuous || echo Experimental )' >> $BASH_ENV
echo 'export PATH=/usr/lib/ccache:${PATH}' >> $BASH_ENV
junit-fotmatting: &junit-fotmatting
junit-formatting: &junit-formatting
run:
name: Formatting CTest for JUnit
when: always
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
when: always
command: |
ccache --show-stats
- *junit-fotmatting
- *junit-formatting
- *junit-store-test-results
- save_cache:
key: 'ccache-{{ arch }}-{{ .Branch }}-{{ epoch }}'
Expand All @@ -123,8 +123,10 @@ jobs:
root: /home/circleci/SimpleITK-build
paths:
- "*"
python3.5-and-test:
python3.6-and-test:
<<: *defaults
docker:
- image: circleci/python:3.6-buster
environment:
<<: *default_environment_keys
CTEST_BUILD_FLAGS: "-j 2"
Expand Down Expand Up @@ -157,12 +159,12 @@ jobs:
SWIG_EXECUTABLE:PATH=${ROOT_BINARY_DIRECTORY}/Swig/bin/swig
BUILD_EXAMPLES:BOOL=ON"
ctest -V -Ddashboard_source_config_dir:PATH="Wrapping/Python" -S "${CTEST_SOURCE_DIRECTORY}/.circleci/circleci.cmake"
- *junit-fotmatting
- *junit-formatting
- *junit-store-test-results
python3.7-and-test:
python3.9-and-test:
<<: *defaults
docker:
- image: circleci/python:3.7-stretch
- image: circleci/python:3.9-buster
environment:
<<: *default_environment_keys
CTEST_BUILD_FLAGS: "-j 2"
Expand Down Expand Up @@ -195,7 +197,7 @@ jobs:
SWIG_EXECUTABLE:PATH=${ROOT_BINARY_DIRECTORY}/Swig/bin/swig
BUILD_EXAMPLES:BOOL=ON"
ctest -V -Ddashboard_source_config_dir:PATH="Wrapping/Python" -S "${CTEST_SOURCE_DIRECTORY}/.circleci/circleci.cmake"
- *junit-fotmatting
- *junit-formatting
- *junit-store-test-results
r-and-test:
<<: *defaults
Expand All @@ -216,10 +218,6 @@ jobs:
- run:
name: Additional Dependencies
command: |
sudo apt-get update -y
sudo apt-get -y install dirmngr apt-transport-https software-properties-common
sudo apt-key adv --keyserver http://keyserver.ubuntu.com --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
sudo add-apt-repository -y "deb https://cloud.r-project.org/bin/linux/debian stretch-cran35/"
sudo apt-get update -y
sudo apt-get install -y r-base r-base-dev
- attach_workspace:
Expand All @@ -234,12 +232,12 @@ jobs:
SWIG_EXECUTABLE:PATH=${ROOT_BINARY_DIRECTORY}/Swig/bin/swig
BUILD_EXAMPLES:BOOL=ON"
ctest -V -Ddashboard_source_config_dir:PATH="Wrapping/R" -S "${CTEST_SOURCE_DIRECTORY}/.circleci/circleci.cmake"
- *junit-fotmatting
- *junit-formatting
- *junit-store-test-results
java-and-test:
<<: *defaults
docker:
- image: circleci/openjdk:8-jdk-stretch
- image: circleci/openjdk:8-jdk-buster
resource_class: medium
environment:
<<: *default_environment_keys
Expand Down Expand Up @@ -275,7 +273,7 @@ jobs:
SWIG_EXECUTABLE:PATH=${ROOT_BINARY_DIRECTORY}/Swig/bin/swig
BUILD_EXAMPLES:BOOL=ON"
ctest -V -Ddashboard_source_config_dir:PATH="Wrapping/Java" -S "${CTEST_SOURCE_DIRECTORY}/.circleci/circleci.cmake"
- *junit-fotmatting
- *junit-formatting
- *junit-store-test-results
docs:
<<: *defaults
Expand Down Expand Up @@ -325,10 +323,10 @@ workflows:
- gh-pages
- dashboard
- hooks
- python3.5-and-test:
- python3.6-and-test:
requires:
- build-and-test
- python3.7-and-test:
- python3.9-and-test:
requires:
- build-and-test
- r-and-test:
Expand Down
87 changes: 87 additions & 0 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Elastix Python 3.7

on: [push, pull_request]

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [windows-2019]
include:
# - os: ubuntu-18.04
# cmake-build-type: "Release"
# ANNLib: "libANNlib-5.0.so"
# ANNLib2: "libANNlib-5.0.so.1"
- os: windows-2019
cmake-build-type: "Release"
ANNLib: "ANNlib-5.0.dll"
# - os: macos-10.15
# cmake-build-type: "Release"
# ANNLib: "libANNlib-5.0.1.dylib"
# ANNLib2: "libANNlib-5.0.dylib"

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ninja
python -m pip install setuptools
python -m pip install scikit-ci-addons
python -m pip install wheel

- name: Get specific version of CMake, Ninja
uses: lukka/[email protected]

- name: Build SimpleElastix Unix
if: matrix.os != 'windows-2019'
run: |
export CXXFLAGS="$CXXFLAGS -fPIC"
mkdir SEb
cd SEb
cmake -DWRAP_LUA:BOOL=OFF -DWRAP_PYTHON:BOOL=ON -DWRAP_JAVA:BOOL=OFF -DWRAP_CSHARP:BOOL=OFF -DWRAP_TCL:BOOL=OFF -DWRAP_R:BOOL=OFF -DWRAP_RUBY:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DSimpleITK_USE_SYSTEM_ITK:BOOL=OFF -DSimpleITK_USE_SYSTEM_ELASTIX:BOOL=OFF -DSimpleITK_4D_IMAGES:BOOL=OFF -v ../SuperBuild &&
make --jobs=4

- name: Build SimpleElastix Windows
if: matrix.os == 'windows-2019'
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir SEb
cd SEb
cmake -DWRAP_LUA:BOOL=OFF -DWRAP_PYTHON:BOOL=ON -DWRAP_JAVA:BOOL=OFF -DWRAP_CSHARP:BOOL=OFF -DWRAP_TCL:BOOL=OFF -DWRAP_R:BOOL=OFF -DWRAP_RUBY:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DSimpleITK_USE_SYSTEM_ITK:BOOL=OFF -DSimpleITK_USE_SYSTEM_ELASTIX:BOOL=OFF -DSimpleITK_4D_IMAGES:BOOL=OFF -v -GNinja ../SuperBuild
ninja

- name: Test SimpleITK
run: |
ctest -C Release

- name: Build Wheel
run: |
cd SEb/SimpleITK-build/Wrapping/Python
python setup.py bdist_wheel

- name: Prepare Artifacts
shell: bash
run: |
mkdir uploads
mv SEb/SimpleITK-build/Wrapping/Python/dist uploads

- name: Publish Artifacts
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.os }}"
path: uploads
85 changes: 85 additions & 0 deletions .github/workflows/BuildPython38.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Elastix Python 3.8

on: [push, pull_request]

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [macos-10.15, ubuntu-18.04, windows-2019]
include:
- os: ubuntu-18.04
cmake-build-type: "Release"
ANNLib: "libANNlib-5.0.so"
ANNLib2: "libANNlib-5.0.so.1"
- os: windows-2019
cmake-build-type: "Release"
ANNLib: "ANNlib-5.0.dll"
- os: macos-10.15
ANNLib: "libANNlib-5.0.1.dylib"
ANNLib2: "libANNlib-5.0.dylib"

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ninja
python -m pip install setuptools
python -m pip install scikit-ci-addons
python -m pip install wheel
- name: Get specific version of CMake, Ninja
uses: lukka/[email protected]

- name: Build SimpleElastix Unix
if: matrix.os != 'windows-2019'
run: |
export CXXFLAGS="$CXXFLAGS -fPIC"
mkdir SEb
cd SEb
cmake -DWRAP_LUA:BOOL=OFF -DWRAP_PYTHON:BOOL=ON -DWRAP_JAVA:BOOL=OFF -DWRAP_CSHARP:BOOL=OFF -DWRAP_TCL:BOOL=OFF -DWRAP_R:BOOL=OFF -DWRAP_RUBY:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DSimpleITK_USE_SYSTEM_ITK:BOOL=OFF -DSimpleITK_USE_SYSTEM_ELASTIX:BOOL=OFF -DSimpleITK_4D_IMAGES:BOOL=OFF -v ../SuperBuild &&
make --jobs=4

- name: Build SimpleElastix Windows
if: matrix.os == 'windows-2019'
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir SEb
cd SEb
cmake -DWRAP_LUA:BOOL=OFF -DWRAP_PYTHON:BOOL=ON -DWRAP_JAVA:BOOL=OFF -DWRAP_CSHARP:BOOL=OFF -DWRAP_TCL:BOOL=OFF -DWRAP_R:BOOL=OFF -DWRAP_RUBY:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DSimpleITK_USE_SYSTEM_ITK:BOOL=OFF -DSimpleITK_USE_SYSTEM_ELASTIX:BOOL=OFF -DSimpleITK_4D_IMAGES:BOOL=OFF -v -GNinja ../SuperBuild
ninja

- name: Test SimpleITK
run: |
ctest -C Release


- name: Build Wheel
run: |
cd SEb/SimpleITK-build/Wrapping/Python
python setup.py bdist_wheel

- name: Prepare Artifacts
shell: bash
run: |
mkdir uploads
mv SEb/SimpleITK-build/Wrapping/Python/dist uploads
- name: Publish Artifacts
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.os }}"
path: uploads
85 changes: 85 additions & 0 deletions .github/workflows/BuildPython39.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Elastix Python 3.9

on: [push, pull_request]

jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix

runs-on: ${{ matrix.os }}
strategy:
max-parallel: 3
matrix:
os: [macos-10.15, ubuntu-18.04, windows-2019]
include:
- os: ubuntu-18.04
cmake-build-type: "Release"
ANNLib: "libANNlib-5.0.so"
ANNLib2: "libANNlib-5.0.so.1"
- os: windows-2019
cmake-build-type: "Release"
ANNLib: "ANNlib-5.0.dll"
- os: macos-10.15
cmake-build-type: "Release"
ANNLib: "libANNlib-5.0.1.dylib"
ANNLib2: "libANNlib-5.0.dylib"

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9

- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ninja
python -m pip install setuptools
python -m pip install scikit-ci-addons
python -m pip install wheel
- name: Get specific version of CMake, Ninja
uses: lukka/[email protected]

- name: Build SimpleElastix Unix
if: matrix.os != 'windows-2019'
run: |
export CXXFLAGS="$CXXFLAGS -fPIC"
mkdir SEb
cd SEb
cmake -DWRAP_LUA:BOOL=OFF -DWRAP_PYTHON:BOOL=ON -DWRAP_JAVA:BOOL=OFF -DWRAP_CSHARP:BOOL=OFF -DWRAP_TCL:BOOL=OFF -DWRAP_R:BOOL=OFF -DWRAP_RUBY:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DSimpleITK_USE_SYSTEM_ITK:BOOL=OFF -DSimpleITK_USE_SYSTEM_ELASTIX:BOOL=OFF -DSimpleITK_4D_IMAGES:BOOL=OFF -v ../SuperBuild &&
make --jobs=4

- name: Build SimpleElastix Windows
if: matrix.os == 'windows-2019'
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir SEb
cd SEb
cmake -DWRAP_LUA:BOOL=OFF -DWRAP_PYTHON:BOOL=ON -DWRAP_JAVA:BOOL=OFF -DWRAP_CSHARP:BOOL=OFF -DWRAP_TCL:BOOL=OFF -DWRAP_R:BOOL=OFF -DWRAP_RUBY:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DBUILD_TESTING:BOOL=ON -DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} -DSimpleITK_USE_SYSTEM_ITK:BOOL=OFF -DSimpleITK_USE_SYSTEM_ELASTIX:BOOL=OFF -DSimpleITK_4D_IMAGES:BOOL=OFF -v -GNinja ../SuperBuild
ninja

- name: Test SimpleITK
run: |
ctest -C Release

- name: Build Wheel
run: |
cd SEb/SimpleITK-build/Wrapping/Python
python setup.py bdist_wheel

- name: Prepare Artifacts
shell: bash
run: |
mkdir uploads
mv SEb/SimpleITK-build/Wrapping/Python/dist uploads
- name: Publish Artifacts
uses: actions/upload-artifact@v2
with:
name: "${{ matrix.os }}"
path: uploads
Loading