Dev->main->deployment 0.0.1 (#5) #14
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: Test brainmaze | |
on: [push, pull_request] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: '3.9' | |
architecture: 'x64' | |
- os: ubuntu-latest | |
python-version: '3.10' | |
architecture: 'x64' | |
- os: ubuntu-latest | |
python-version: '3.11' | |
architecture: 'x64' | |
- os: ubuntu-latest | |
python-version: '3.12' | |
architecture: 'x64' | |
- os: macos-latest | |
python-version: '3.11' | |
- os: macos-latest | |
python-version: '3.12' | |
- os: windows-latest | |
python-version: '3.11' | |
- os: windows-latest | |
python-version: '3.12' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout submodules | |
shell: bash | |
run: | | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools | |
pip install numpy | |
pip install wheel | |
- name: Setup package | |
run: | |
python setup.py bdist_wheel sdist | |
- name: Install package | |
run: | |
pip install . | |
- name: Test package | |
run: | |
pytest | |
release: | |
if: contains(github.ref, 'refs/tags/') | |
needs: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
python-version: '3.11' | |
docker_python_version: 'cp36-cp36m' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Checkout submodules | |
shell: bash | |
run: | | |
auth_header="$(git config --local --get http.https://github.com/.extraheader)" | |
git submodule sync --recursive | |
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 | |
# Set up python after manylinux build otherwise it interferes with auditwheel in the image | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools | |
pip install twine | |
pip install wheel | |
- name: Setup package | |
run: | |
python setup.py bdist_wheel sdist | |
- name: Publish package | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_Token_General }} | |
run: | | |
twine upload --skip-existing dist/* |