Skip to content

addidng debug information to smcpy_optimizer #146

addidng debug information to smcpy_optimizer

addidng debug information to smcpy_optimizer #146

Workflow file for this run

# roughly following https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
name: Pip Build and PyPI Deployment
on: [push]
jobs:
pip_build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install MPI
run: |
sudo apt-get update
sudo apt-get install -y mpich libmpich-dev
- name: Build using pip
run: |
pip install .
- name: Run tests (use pip instead of repo)
run: |
cd ..
cp -r bingo/tests .
mv bingo bingo_full
tests/.run_tests.sh normal
mv bingo_full bingo
deploy:
needs: pip_build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install MPI
run: |
sudo apt-get update
sudo apt-get install -y mpich libmpich-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest pytest-cov pytest-mock
pip install coveralls
pip install build
pip install -r requirements.txt
- name: Build bingocpp
run: |
./.build_bingocpp.sh
- name: Build PyPI package
run: |
python -m build
- name: Remove wheel (was built for testing purposes)
run: |
cd dist
rm *.whl
cd ..
- name: Deploy to TestPyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
- name: Deploy to PyPI (only on tagged commits)
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}