-
Notifications
You must be signed in to change notification settings - Fork 21
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 #136 from constantinpape/master
Switch CI to gh actions
- Loading branch information
Showing
48 changed files
with
2,155 additions
and
1,143 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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
test: | ||
name: ${{ matrix.os }} ${{ matrix.python-version }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [macos-latest, windows-latest, ubuntu-latest] | ||
python-version: [3.7, 3.8, 3.9] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
activate-environment: nifty-build-env | ||
auto-update-conda: true | ||
channels: conda-forge | ||
environment-file: .github/workflows/environment.yaml | ||
python-version: ${{ matrix.python-version }} | ||
auto-activate-base: false | ||
env: | ||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | ||
|
||
# this will set the system compiler; | ||
# I don't know how to set the conda compilers for windows | ||
- name: Set windows env | ||
if: matrix.os == 'windows-latest' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Build linux | ||
if: matrix.os == 'ubuntu-latest' | ||
shell: bash -l {0} | ||
run: .github/workflows/build_linux.sh | ||
|
||
- name: Build mac | ||
if: matrix.os == 'macos-latest' | ||
shell: bash -l {0} | ||
run: .github/workflows/build_mac.sh | ||
|
||
- name: Build win | ||
if: matrix.os == 'windows-latest' | ||
shell: bash -l {0} | ||
run: .github/workflows/build_win.bat | ||
|
||
- name: Run tests | ||
shell: bash -l {0} | ||
run: python -m unittest discover -s src/python/test -v |
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,21 @@ | ||
#!/bin/bash | ||
|
||
export PY_BIN="$CONDA_PREFIX/bin/python" | ||
cmake . \ | ||
-DWITHIN_TRAVIS=ON \ | ||
-DWITH_QPBO=OFF \ | ||
-DWITH_HDF5=ON \ | ||
-DWITH_Z5=ON \ | ||
-DWITH_ZLIB=ON \ | ||
-DWITH_BLOSC=ON \ | ||
-DWITH_GLPK=OFF \ | ||
-DWITH_CPLEX=OFF \ | ||
-DWITH_GUROBI=OFF \ | ||
-DBUILD_CPP_TEST=OFF \ | ||
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ | ||
-DPYTHON_EXECUTABLE="$PY_BIN" \ | ||
-DCMAKE_CXX_FLAGS="-std=c++17" \ | ||
-DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" \ | ||
-DBUILD_NIFTY_PYTHON=ON | ||
make -j 4 | ||
make install |
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,21 @@ | ||
#!/bin/bash | ||
|
||
export PY_BIN="$CONDA_PREFIX/bin/python" | ||
cmake . \ | ||
-DWITHIN_TRAVIS=ON \ | ||
-DWITH_QPBO=OFF \ | ||
-DWITH_HDF5=ON \ | ||
-DWITH_Z5=ON \ | ||
-DWITH_ZLIB=ON \ | ||
-DWITH_BLOSC=ON \ | ||
-DWITH_GLPK=OFF \ | ||
-DWITH_CPLEX=OFF \ | ||
-DWITH_GUROBI=OFF \ | ||
-DBUILD_CPP_TEST=OFF \ | ||
-DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ | ||
-DPYTHON_EXECUTABLE="$PY_BIN" \ | ||
-DCMAKE_CXX_FLAGS="-std=c++14" \ | ||
-DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" \ | ||
-DBUILD_NIFTY_PYTHON=ON | ||
make -j 4 | ||
make install |
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,18 @@ | ||
cmake . -G "NMake Makefiles" ^ | ||
-DWITH_QPBO=OFF ^ | ||
-DWITH_HDF5=OFF ^ | ||
-DWITH_Z5=OFF ^ | ||
-DWITH_GLPK=OFF ^ | ||
-DWITH_CPLEX=OFF ^ | ||
-DWITH_GUROBI=OFF ^ | ||
-DBUILD_CPP_TEST=OFF ^ | ||
-DCMAKE_PREFIX_PATH="%CONDA_PREFIX%" ^ | ||
-DCMAKE_INSTALL_PREFIX="%CONDA_PREFIX%" ^ | ||
-DBUILD_NIFTY_PYTHON=ON | ||
|
||
REM FIXME z5 tests still fail on windows | ||
REM -DWITH_Z5=ON ^ | ||
REM -DWITH_ZLIB=ON ^ | ||
REM -DWITH_BLOSC=ON ^ | ||
|
||
cmake --build . --target INSTALL --config Release -j 4 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,14 @@ | ||
name: nifty-build-env | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- boost-cpp>=1.63 | ||
- cmake | ||
- compilers | ||
- h5py | ||
- nlohmann_json | ||
- scikit-image | ||
- xtensor>=0.21,<0.22 | ||
- xtensor-python>=0.24,<0.25 | ||
- vigra | ||
- z5py |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1 +1 @@ | ||
WITH_CPLEX= CPLEX_ROOT_DIR= WITH_GUROBI= GUROBI_ROOT_DIR= conda build -c conda-forge --python=3.7 conda-recipe/ | ||
conda build -c conda-forge --python=3.7 conda-recipe/ |
Oops, something went wrong.