Skip to content

Commit

Permalink
restructure travis.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
CareF committed Apr 12, 2021
1 parent 1184c59 commit 60141b1
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 34 deletions.
79 changes: 47 additions & 32 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,13 @@ python:
- '3.8'
- '3.9'
env:
- OMP_NUM_THREADS=4
addons:
apt:
packages:
- doxygen
- doxygen-doc
- doxygen-latex
- doxygen-gui
- graphviz
global:
- OMP_NUM_THREADS=4
# pypi-test key
- secure: "VX8LK+nuJ8HbBsmsr8CtKCGMDLV6DZgVNL6aC+HHh7gm7nC0BJO/1QejOq4Rep25LebrZxRhsAvOJLPS0wgObAsFGorOhZHWA0W8khwvjvZqvu3eRDGdS9gTyPTlgxvig9cZ/D964rLHvP2qnKdFwjYOEbfZhfxvkbGk6uSe6kMRUoggG5ZsglYYpbUu75lz9o+KlDlv80fqVKo/XtKx4rngvgNWLVGWK08nJ/RtlHTLjcaR0/txtcQ7TpDLiYEwUohyKil42RbqU1+vvBo4olOyPWY7k2KYXWA2uv/cCY7eJjF0gQhq4M9be7pa2/s2I2YmnKY3RcAFWkItBqrNdCboF0FMC/LlTtYBdxAfx9D2b+0Syue3A2FekA+LV58+QtftEVuyCcJ1IFIQxEZp2lyGA2YoZEgS/FUsYfGR7nWyj1uzeyvK654odILFzuwy6axmaKaPTbiq2sgmJrAUjM4nCl50hu75U4L9vRXFJupkU7fPOsi/jbZsCrxyYSSFucXRu3JgO+DIWJRemCzqLyxQFWVcXf7WMaxHTpbulLxjLe2ALvOrTM/fOossxrISQTbMZYDUoeBNclHx3Z9T3+Vpth9M4RSul6IkosvDtndu4KrjSjoY93OxAYj3GaRoOTnghxxxXu55ZI1D+BUrELMPhZoC1AIcGOhnrQowg5w="
install:
- pip3 install --upgrade pip
- pip3 install setuptools wheel
- pip3 install numpy scipy pyqt5 matplotlib pytest
- python3 setup.py install
script:
Expand All @@ -30,14 +26,14 @@ script:
- pytest -v test/testMaxwell.py
jobs:
include:
- name: MacOS default without MP
- stage: test
name: MacOS default without MP
os: osx
osx_image: xcode11.5
language: shell # 'language: python' is an error on Travis CI macOS
env:
- OMP_NUM_THREADS=4
script:
- python3 test/SimpleSchrodinger.py
- pytest -v test/testQCLayers.py
- name: MacOS with GCC
os: osx
osx_image: xcode11.5
Expand All @@ -54,30 +50,17 @@ jobs:
- brew install llvm
env:
- CC=/usr/local/opt/llvm/bin/clang OMP_NUM_THREADS=4
deploy:
provider: pypi
username: __token__
password:
secure: WggsTyGkBcRS+cB/5OAahu+IBp/cz/7FAKy7ZqhHhvqrpiHv2JSFbzZiqBIHVu7wJPJzVQfuJDVH0fvr7Twprpk4NvzcEF3U01mD1FBklPwzIcYiZnd01D5cXeA8gAoD4VjG8ialRSgRGwzBm8QR2xEDBeo3MWSxb3CG4vYyd1CUOqON0EeRRY3I9ETCYVJoModaJBQvwGcTufBlDhQk/6KjRw6ssq9S+nDrF/WLzsuPVUVPfGr9If88KDJLjm0qejXDKRK9JHLdEXK4gUSD4lKWf8rBvrd6+cnSbp57616eHQZsgBx/TA+2Wp3nA7GJk03g8q/NN+B/IYkmeaWehfB520dlctjvQytzw4btnqTkT1zJbSHVJZXS78p1R/UywBJ3d1WQy9GtkgtH6IR79fColY3XYPX9B3u1+iTJQ3wSwMEKvsJ7cJKUgcxwixSfaFlDKJEVd8SnjzDwmzwhjT7VYMU76KPcnguS0pi89pjsYd/IgNWl8JU5LVOrsZ1TPLMxn6Uf339tJkAcIy/DPjKIOmaxEpuVFjXDiqkKBnVtYDqyKZnFyz09ovFsn5rm/WuuR1UoeNdLivOq81f2zO1AKlj6TnoZ8WfzVuSiqjvRuo6p6LSnw0EEUBYLOjDsL+Dqvh98N4xr64XGjAl0YkD9wXgsUyYDn3rljEEF3WQ=
on:
branch: dev
distributions: "sdist bdist_wheel"
cleanup: false
skip_existing: true
server: https://testpypi.python.org/pypi
- name: Windows
os: windows
language: cpp
env:
- PATH=/c/Python38:/c/Python38/Scripts:$PATH MSBUILD_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
- secure: "IQjHX5VHW8INSfwCiN0oDPocO6K890uMBz/aTglGW7v7/nW+70cxYs8HcToRm3puMCRw9SA+nqV8Gsx23Moz8uyhIrearF2sGQRh6rAM2s4bSKQ9eUwLF/x8N4jxRBbhd0k/9P60t9p3mA9BdUQhvhQxPbsIduBTA2+xgzRK7XR6Z2OnnXMGkK3mlmiT9YsW2uu7X8/WkQlKyA5qmpugeEUNKhPEh6lyLT91XYrSCyvmEhr7xXRr5M40Ra8lmX8k6pgW+vnnXk5ETzKPM9CKjDb0QLCkavoGqOwCBg9VUW4bmRslvfD+buOwX9HpMzq2XdIb/t/0tkzk7Bj1Lk/jUNtTdlzBpwo1qLuPdUD6cylrRzfJbkotXUtXuyVuV2AzQXR2Knx/WiJAUf3/H84ncrQgllMXDDzpCPz4RS+Wfgr+ZjBibe3QR/NmzM6QrokhlO0Ua8kbJYDqPbd6WSBw5BGPx9xCAx+1F3BqI9sMymtYn8OxNOQRU8MjiNBkPR1cml7chEk3BU5ixDbBYPyhfCJ7+idBZv0GaVdYI7wjJ/j1+EBo1PeCPLR1b7iR2UjrgiqH+ExAFNSHXVCokg4YohxLW1FntRaGRipwPAH5/vDnsr2hBXoebdG5INvTuPm9kaF/dc8nABtvLEntIw/ATWokivgU+R9whKvY71bzkIw="
- PATH=/c/Python38:/c/Python38/Scripts:$PATH MSBUILD_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin" OMP_NUM_THREADS=4
install:
- choco install python --version 3.8.0
- python -m pip install --upgrade pip
- pip3 install wheel twine
- pip3 install setuptools wheel
- pip3 install numpy scipy pyqt5 matplotlib pytest
- export PATH=$MSBUILD_PATH:$PATH
- echo $PATH
- export MSBUILD=msbuild.exe
- python setup.py install
- ls ErwinJr2/OneDQuantum
Expand All @@ -86,11 +69,43 @@ jobs:
- python test/SimpleSchrodinger.py MP
- pytest -v test/testQuantumWell.py
- pytest -v test/testQCLayers.py
# - stage: deploy
- name: Deploy Source
env:
- PYEXE=python3
install:
- pip3 install setuptools wheel twine
script:
deploy:
# https://github.com/travis-ci/dpl/issues/1009
# not using default pypi deploy because its bug on Win and Mac
provider: script
script: bash .travis/deploy.sh sdist
- name: Deploy Windows with VS
os: windows
language: cpp
env:
- PATH=/c/Python38:/c/Python38/Scripts:$PATH MSBUILD_PATH="/C/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin" PYEXE=python
install:
- choco install python --version 3.8.0
- python -m pip install --upgrade pip
- pip3 install setuptools wheel twine
- export PATH=$MSBUILD_PATH:$PATH
- export MSBUILD=msbuild.exe
script:
deploy:
provider: script
script: bash .travis/deploy.sh bdist_wheel
- name: Deploy MacOS with Clang
os: osx
osx_image: xcode11.5
language: shell
before_install:
- brew install llvm
- pip3 install setuptools wheel twine
env:
- CC=/usr/local/opt/llvm/bin/clang PYEXE=python3
script:
deploy:
provider: script
script: bash .travis/deploy-win.sh
cleanup: false
# skip_existing: true
on:
branch: dev
script: bash .travis/deploy.sh bdist_wheel
2 changes: 0 additions & 2 deletions .travis/deploy-win.sh

This file was deleted.

13 changes: 13 additions & 0 deletions .travis/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if [ $TRAVIS_BRANCH = 'dev' ]; then
$PYEXE setup.py $1
$PYEXE -m twine upload --repository testpypi dist/* \
--username __token__ --password "$PYPITEST_PASSWORD" \
--skip-existing
elif [ ! -z $TRAVIS_TAG ]; then
$PYEXE setup.py $1
$PYEXE -m twine upload dist/* \
--username __token__ --password "$PYPI_PASSWORD" \
--skip-existing
else
echo skip deploy
fi

0 comments on commit 60141b1

Please sign in to comment.