stages: - build - test - deploy build-3.7-VS2017: stage: build tags: - VS2017 variables: BUILD_PLATFORM: "VS2017" ARCHITECTURE: "x64" before_script: - git submodule sync --recursive - git submodule update --init --recursive script: - set Path=%Path%;C:\Program Files\Python37;C:\Program Files\Python37\Scripts;C:\Program Files\CMake\bin; - echo %Path% - virtualenv.exe --clear -p "C:\Program Files\Python37\python.exe" . - call .\Scripts\activate - python setup.py bdist_wheel --dist-dir dist3 artifacts: paths: - dist3/ build-3.5-linux: stage: build tags: - Linux variables: GIT_SUBMODULE_STRATEGY: recursive script: - virtualenv --clear -p python3.5 . - source bin/activate - python setup.py bdist_wheel --dist-dir dist3 artifacts: paths: - dist3/ build-3.5-macos: stage: build tags: - Apple variables: GIT_SUBMODULE_STRATEGY: recursive script: - export PATH=/opt/local/bin:$PATH - virtualenv --clear -p python3.5 . - source bin/activate - python setup.py bdist_wheel --dist-dir dist3 artifacts: paths: - dist3/ build-2.7-linux: stage: build tags: - Linux variables: GIT_SUBMODULE_STRATEGY: recursive script: - virtualenv --clear -p python2.7 . - source bin/activate - python setup.py bdist_wheel --dist-dir dist2 artifacts: paths: - dist2/ build-2.7-macos: stage: build tags: - Apple variables: GIT_SUBMODULE_STRATEGY: recursive script: - export PATH=/opt/local/bin:$PATH - virtualenv --clear -p python2.7 . - source bin/activate - python setup.py bdist_wheel --dist-dir dist2 artifacts: paths: - dist2/ test-3.7-VS2017: stage: test tags: - VS2017 dependencies: - build-3.7-VS2017 script: - set Path=%Path%;C:\Program Files\Python37;C:\Program Files\Python37\Scripts; - virtualenv --clear -p "C:\Program Files\Python37\python.exe" . - call .\Scripts\activate - cd dist3 - FOR %%a IN (*.whl) DO pip install %%a - cd ..\tests - python -m unittest discover test-3.5-linux: stage: test tags: - Linux dependencies: - build-3.5-linux script: - virtualenv --clear -p python3.5 . - source bin/activate - pip install dist3/*.whl - cd tests - python -m unittest discover test-3.5-macos: stage: test tags: - Apple dependencies: - build-3.5-macos script: - export PATH=/opt/local/bin:$PATH - virtualenv --clear -p python3.5 . - source bin/activate - pip install dist3/*.whl - cd tests - python -m unittest discover test-2.7-linux: stage: test tags: - Linux dependencies: - build-2.7-linux script: - virtualenv --clear -p python2.7 . - source bin/activate - pip install dist2/*.whl - cd tests - python -m unittest discover test-2.7-macos: stage: test tags: - Apple dependencies: - build-2.7-macos script: - export PATH=/opt/local/bin:$PATH - virtualenv --clear -p python2.7 . - source bin/activate - pip install dist2/*.whl - cd tests - python -m unittest discover deploy-3.7-VS2017: stage: deploy tags: - VS2017 dependencies: - build-3.7-VS2017 script: - mkdir release - cd dist3 - FOR %%a IN (*.whl) DO copy %%a ..\release artifacts: paths: - release/*.whl deploy-3.5-linux: stage: deploy tags: - Linux dependencies: - build-3.5-linux script: - mkdir release - cp dist3/*.whl release artifacts: paths: - release/*.whl deploy-3.5-macos: stage: deploy tags: - Apple dependencies: - build-3.5-macos script: - mkdir release - cp dist3/*.whl release artifacts: paths: - release/*.whl deploy-2.7-linux: stage: deploy tags: - Linux dependencies: - build-2.7-linux script: - mkdir release - cp dist2/*.whl release artifacts: paths: - release/*.whl deploy-2.7-macos: stage: deploy tags: - Apple dependencies: - build-2.7-macos script: - mkdir release - cp dist2/*.whl release artifacts: paths: - release/*.whl deploy-sdist: stage: deploy tags: - Linux variables: GIT_SUBMODULE_STRATEGY: recursive script: - virtualenv --clear -p python3.5 . - source bin/activate - python setup.py sdist --dist-dir release artifacts: paths: - release/ deploy-documentation: stage: deploy tags: - Linux dependencies: - build-3.5-linux script: - virtualenv --clear -p python3.5 . - source bin/activate - pip install dist3/*.whl - pip install sphinx sphinx_rtd_theme - mkdir documentation - cd docs - make html - cp -r _build/html/* ../documentation artifacts: paths: - documentation/