Remove repr in tests (#96) #446
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: CD | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v* | |
jobs: | |
build-wheels: | |
runs-on: ${{matrix.os}} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macOS-latest | |
target: macosx_10_14_universal2.macosx_10_14_x86_64.macosx_11_0_arm64 | |
python3-version: "3.8" | |
- os: ubuntu-latest | |
target: manylinux2010_x86_64 | |
python3-version: "3.8" | |
- os: windows-latest | |
target: win_amd64 | |
python3-version: "3.8" | |
- os: windows-latest | |
target: win32 | |
python3-version: "3.8" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
- name: Set up Python3 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python3-version }} | |
- name: Install python3 dependencies | |
run: | | |
python -m pip install -U pip install wheel setuptools cffi | |
- name: Download helics library | |
run: python setup.py download --plat-name=${{ matrix.target }} | |
- name: Build python3 wheel | |
run: | | |
python setup.py bdist_wheel --plat-name=${{ matrix.target }} | |
python scripts/cleanup_bdist.py ${{ matrix.target }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-dist-${{ matrix.target }} | |
path: dist/* | |
build-sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip install wheel setuptools cffi | |
- name: Download helics header files and build sdist | |
run: | | |
python setup.py sdist | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: python-sdist | |
path: dist/* | |
publish-helics: | |
needs: [build-wheels, build-sdist] | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/helics | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- name: Get the built packages | |
uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: dist | |
- name: Publish package to TestPyPI | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_PASSWORD }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish package to PyPI | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: GitHub Release | |
if: startsWith(github.ref, 'refs/tags/') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: "dist/*" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |