Merge pull request #20 from ESSS/fb-PWDA-8717-locking-support #10
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: PyPI | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- v* | |
jobs: | |
publish: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
env: | |
REAKTORO_USE_OPENLIBM: 1 | |
NUMBER_OF_COMPILATION_JOBS: 2 | |
strategy: | |
fail-fast: true | |
max-parallel: 4 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-activate-base: true | |
activate-environment: "" | |
channels: conda-forge | |
channel-priority: true | |
- name: Configuring Conda Environment | |
shell: bash -l {0} | |
env: | |
PY_VER: 3.7 | |
run: | | |
conda config --set always_yes yes --set changeps1 no | |
conda config --add channels conda-forge | |
conda install conda-devenv | |
conda devenv | |
- name: Building and Installing Reaktoro | |
shell: bash -l {0} | |
run: | | |
source activate reaktoro | |
inv -e compile -n ${{ env.NUMBER_OF_COMPILATION_JOBS }} | |
python ci/check_compiled_files.py | |
- name: Testing Reaktoro | |
shell: bash -l {0} | |
run: | | |
source activate reaktoro | |
pytest . -n auto | |
- name: Publish Reaktoro to PyPI | |
uses: pypa/gh-action-pypi-publish@master | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: artifacts/python/dist |