-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
46 additions
and
125 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python_version: ["3.8", "3.9", "3.10", "3.11"] | ||
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: "Set up Python ${{ matrix.python_version }}" | ||
uses: actions/setup-python@v4 | ||
|
@@ -53,20 +53,22 @@ jobs: | |
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"" | ||
|
||
|
||
# Uncomment this if you want to run mypy | ||
mypy-linux: | ||
name: mypy check on linux | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python_version: ["3.8", "3.9", "3.10", "3.11"] | ||
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: "Set up Python ${{ matrix.python_version }}" | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "${{ matrix.python_version }}" | ||
- uses: actions/checkout@v3 | ||
- name: install kiara_plugin.onboarding | ||
run: pip install -U --extra-index-url https://pypi.fury.io/dharpa/ .[all,dev_testing] | ||
run: pip install -U .[all,dev_testing] | ||
- name: Test with mypy | ||
run: make mypy | ||
|
||
|
@@ -87,14 +89,13 @@ jobs: | |
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install ruff | ||
pip install -U ruff | ||
# Include `--format=github` to enable automatic inline annotations. | ||
- name: Run Ruff | ||
run: ruff --format=github src/ | ||
run: ruff --output-format=github src/ | ||
|
||
build-docs: | ||
name: build documentation | ||
if: ${{ github.ref == 'refs/heads/develop' }} || ${{ github.ref == 'refs/heads/main' }} || startsWith(github.ref, 'refs/tags/') | ||
build_python_package: | ||
name: build python package | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test-linux | ||
|
@@ -108,63 +109,40 @@ jobs: | |
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: install kiara_plugin.onboarding package | ||
run: pip install -U --extra-index-url https://pypi.fury.io/dharpa/ .[all,dev_documentation] | ||
- run: git config --global user.email "Markus Binsteiner" | ||
- run: git config --global user.name "[email protected]" | ||
- name: create latest documentation | ||
if: ${{ ( github.ref == 'refs/heads/develop') }} | ||
run: FAIL_DOC_BUILD_ON_ERROR=true mike deploy --push latest && mike set-default --push latest | ||
- name: extract tag name | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | ||
- name: create stable documentation | ||
if: startsWith(github.ref, 'refs/tags') | ||
run: FAIL_DOC_BUILD_ON_ERROR=true mike deploy --push --update-alias --title "v ${RELEASE_VERSION}" "${RELEASE_VERSION}" stable | ||
- name: install pip | ||
run: pip install -U pip setuptools setuptools_scm build | ||
- name: create packages | ||
run: python -m build | ||
- name: upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: build-dists | ||
path: dist/ | ||
|
||
release_package: | ||
name: publish python package | ||
if: ${{ github.ref == 'refs/heads/develop' }} || ${{ github.ref == 'refs/heads/main' }} || startsWith(github.ref, 'refs/tags/') | ||
release_python_package: | ||
name: publish python package to pypi | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test-linux | ||
- mypy-linux | ||
- linting-linux | ||
- build_python_package | ||
env: | ||
GEMFURY_PUSH_TOKEN: ${{ secrets.GEMFURY_PUSH_TOKEN }} | ||
permissions: | ||
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | ||
steps: | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
- name: Retrieve build distributions | ||
uses: actions/download-artifact@v3 | ||
with: | ||
python-version: "3.11" | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: install pip | ||
run: pip install pip==21.2.4 setuptools==57.4.0 | ||
- name: install kiara | ||
run: pip install -U -e .[all] | ||
- name: install 'build' package | ||
run: pip install -U build | ||
- name: create packages | ||
run: python -m build | ||
- name: upload source package | ||
run: curl -F package=@$(ls dist/kiara*.tar.gz) https://${GEMFURY_PUSH_TOKEN}@dharpa.fury.land:443/pypi/ | ||
- name: upload wheel | ||
run: curl -F package=@$(ls dist/kiara*.whl) https://${GEMFURY_PUSH_TOKEN}@dharpa.fury.land:443/pypi/ | ||
- name: publish to PyPI | ||
if: startsWith(github.ref, 'refs/tags') | ||
name: build-dists | ||
path: dist/ | ||
- name: publish to PyPI # make sure you have pypi trusted publishing configured for this repo | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
user: __token__ | ||
password: "${{ secrets.PYPI_API_TOKEN }}" | ||
|
||
conda_package_build: | ||
build_and_release_conda_package: | ||
name: conda package build (and upload if release) | ||
runs-on: ubuntu-latest | ||
needs: | ||
- test-linux | ||
- mypy-linux | ||
- linting-linux | ||
- build_python_package | ||
steps: | ||
- name: "Set up Python 3.11" | ||
uses: actions/setup-python@v4 | ||
|
@@ -195,11 +173,10 @@ jobs: | |
merge_tag_to_main: | ||
name: merge current tag to main branch | ||
runs-on: ubuntu-latest | ||
if: ${{ startsWith(github.ref, 'refs/tags') }} | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
needs: | ||
- test-linux | ||
- mypy-linux | ||
- linting-linux | ||
- release_python_package | ||
- build_and_release_conda_package | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
|
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
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
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
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