Added separate random number generator for the distractor image axis #36
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
name: ci | |
on: [push] | |
jobs: | |
build: | |
name: build ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
os: ["ubuntu-18.04", "macos-10.15", "windows-2019"] | |
python-version: ["3.7"] | |
steps: | |
- uses: actions/checkout@v2 | |
# run vcvars on windows | |
- uses: ilammy/msvc-dev-cmd@v1 | |
# warning: if something is changed so that the cached dependencies are not correct | |
# this cache will not notice and the build will be slow, to fix this, increment the | |
# version in the key | |
- name: Cache Dependencies | |
id: cache-dependencies | |
uses: actions/cache@v2 | |
with: | |
path: cache | |
key: ${{ runner.os }}-dependencies-v7 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install Procgen Build | |
run: python -m pip install -e procgen-build | |
- name: Build | |
run: python -u -m procgen_build.build_package | |
- name: Upload wheel artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: wheels | |
path: wheelhouse/* | |
dev: | |
name: dev ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
os: ["ubuntu-18.04", "macos-10.15", "windows-2019"] | |
python-version: ["3.7"] | |
steps: | |
- uses: actions/checkout@v2 | |
# run vcvars on windows | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install Procgen Build | |
run: python -m pip install -e procgen-build | |
- name: Test | |
run: python -u -m procgen_build.dev_test | |
# This has to run as a separate job because the upload action only runs on linux | |
publish: | |
name: publish | |
needs: [build] | |
runs-on: "ubuntu-18.04" | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v2 | |
with: | |
path: artifacts | |
- name: Move files so the next action can find them | |
run: mkdir dist && mv artifacts/wheels/* dist/ | |
# this doesn't work because the development versions use PEP 440 local version identifiers | |
# the fix would be to instead use .dev<number> but it's not obvious how to make that work | |
# well especially with branches | |
# - name: Publish distribution 📦 to Test PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
# repository_url: https://test.pypi.org/legacy/ | |
- name: Publish distribution 📦 to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} |