-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
178 additions
and
0 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,9 @@ | ||
if [ -e virtenv/bin/activate ]; then | ||
source virtenv/bin/activate | ||
elif [ -e virtenv/Scripts/activate ]; then | ||
source virtenv/Scripts/activate | ||
else | ||
echo Cannot activate virtual environment | ||
ls -R virtenv | ||
false | ||
fi |
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,34 @@ | ||
#!/bin/bash | ||
|
||
echo "Building archive" | ||
|
||
source .maint/ci/activate.sh | ||
|
||
set -eu | ||
|
||
# Required dependencies | ||
echo "INSTALL_TYPE = $INSTALL_TYPE" | ||
|
||
set -x | ||
|
||
if [ "$INSTALL_TYPE" = "sdist" -o "$INSTALL_TYPE" = "wheel" ]; then | ||
python -m build | ||
elif [ "$INSTALL_TYPE" = "archive" ]; then | ||
ARCHIVE="/tmp/package.tar.gz" | ||
git archive -o $ARCHIVE HEAD | ||
fi | ||
|
||
if [ "$INSTALL_TYPE" = "sdist" ]; then | ||
ARCHIVE=$( ls $PWD/dist/*.tar.gz ) | ||
elif [ "$INSTALL_TYPE" = "wheel" ]; then | ||
ARCHIVE=$( ls $PWD/dist/*.whl ) | ||
elif [ "$INSTALL_TYPE" = "pip" ]; then | ||
ARCHIVE="$PWD" | ||
fi | ||
|
||
if [ "$INSTALL_TYPE" = "sdist" -o "$INSTALL_TYPE" = "wheel" ]; then | ||
python -m pip install twine | ||
python -m twine check $ARCHIVE | ||
fi | ||
|
||
set +eux |
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,26 @@ | ||
#!/bin/bash | ||
|
||
echo Running tests | ||
|
||
source .maint/ci/activate.sh | ||
|
||
set -eu | ||
|
||
# Required variables | ||
echo CHECK_TYPE = $CHECK_TYPE | ||
|
||
set -x | ||
|
||
if [ "${CHECK_TYPE}" == "doc" ]; then | ||
cd doc | ||
make html && make doctest | ||
elif [ "${CHECK_TYPE}" == "tests" ]; then | ||
pytest --doctest-modules --cov fmripost_aroma --cov-report xml \ | ||
--junitxml=test-results.xml -v fmripost_aroma | ||
else | ||
false | ||
fi | ||
|
||
set +eux | ||
|
||
echo Done running tests |
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,24 @@ | ||
#!/bin/bash | ||
|
||
echo Creating isolated virtual environment | ||
|
||
source .maint/ci/env.sh | ||
|
||
set -eu | ||
|
||
# Required variables | ||
echo SETUP_REQUIRES = $SETUP_REQUIRES | ||
|
||
set -x | ||
|
||
python -m pip install --upgrade pip virtualenv | ||
virtualenv --python=python virtenv | ||
source .maint/ci/activate.sh | ||
python --version | ||
python -m pip install -U $SETUP_REQUIRES | ||
which python | ||
which pip | ||
|
||
set +eux | ||
|
||
echo Done creating isolated virtual environment |
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,6 @@ | ||
SETUP_REQUIRES="pip build" | ||
|
||
# Numpy and scipy upload nightly/weekly/intermittent wheels | ||
NIGHTLY_WHEELS="https://pypi.anaconda.org/scipy-wheels-nightly/simple" | ||
STAGING_WHEELS="https://pypi.anaconda.org/multibuild-wheels-staging/simple" | ||
PRE_PIP_FLAGS="--pre --extra-index-url $NIGHTLY_WHEELS --extra-index-url $STAGING_WHEELS --prefer-binary" |
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,34 @@ | ||
#!/bin/bash | ||
|
||
echo Installing fmripost_aroma | ||
|
||
source .maint/ci/activate.sh | ||
source .maint/ci/env.sh | ||
|
||
set -eu | ||
|
||
# Required variables | ||
echo INSTALL_TYPE = $INSTALL_TYPE | ||
echo CHECK_TYPE = $CHECK_TYPE | ||
echo EXTRA_PIP_FLAGS = $EXTRA_PIP_FLAGS | ||
|
||
set -x | ||
|
||
if [ -n "$EXTRA_PIP_FLAGS" ]; then | ||
EXTRA_PIP_FLAGS=${!EXTRA_PIP_FLAGS} | ||
fi | ||
|
||
pip install $EXTRA_PIP_FLAGS $ARCHIVE | ||
|
||
# Basic import check | ||
python -c 'import fmripost_aroma; print(fmripost_aroma.__version__)' | ||
|
||
if [ "$CHECK_TYPE" == "skiptests" ]; then | ||
exit 0 | ||
fi | ||
|
||
pip install $EXTRA_PIP_FLAGS "fmripost_aroma[$CHECK_TYPE]" | ||
|
||
set +eux | ||
|
||
echo Done installing fmripost_aroma |
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 | ||
|
||
echo "Installing dependencies" | ||
|
||
set -eu | ||
|
||
# Required variables | ||
echo OS_TYPE = $OS_TYPE | ||
|
||
if [ "$OS_TYPE" = "ubuntu-latest" ]; then | ||
sudo apt update | ||
sudo apt install -y graphviz | ||
elif [ "$OS_TYPE" = "macos-latest" ]; then | ||
brew install graphviz | ||
else | ||
echo "Unknown OS_TYPE: $OS_TYPE" | ||
fi | ||
|
||
set +eux | ||
|
||
echo Done installing dependencies |
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,24 @@ | ||
#!/bin/bash | ||
|
||
echo Installing dependencies | ||
|
||
source .maint/ci/activate.sh | ||
source .maint/ci/env.sh | ||
|
||
set -eu | ||
|
||
# Required variables | ||
echo EXTRA_PIP_FLAGS = $EXTRA_PIP_FLAGS | ||
echo CHECK_TYPE = $CHECK_TYPE | ||
|
||
set -x | ||
|
||
if [ -n "$EXTRA_PIP_FLAGS" ]; then | ||
EXTRA_PIP_FLAGS=${!EXTRA_PIP_FLAGS} | ||
fi | ||
|
||
pip install $EXTRA_PIP_FLAGS "fmripost_aroma[$CHECK_TYPE]" | ||
|
||
set +eux | ||
|
||
echo Done installing dependencies |