Skip to content

Commit

Permalink
Upgrade GitHub Actions: upload-artifact and download-artifact (#98)
Browse files Browse the repository at this point in the history
* chore: update CI workflow configuration and remove commented code

* Restored the wrapper and wrapper_test for s2 (used in simulations). Started implemenation of trigger_schedule for PPBC simple

Closes #97 

Signed-off-by: Vlad Iftime <[email protected]>

---------

Signed-off-by: Vlad Iftime <[email protected]>
  • Loading branch information
VladIftime authored Jan 17, 2025
1 parent 40418bd commit 1977344
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ on:
# relevant branches and tags. Other branches can be checked via PRs.
branches: [main, hotfix/hackathon]
tags:
- 'v[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+' # Match tags that resemble a version
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Match tags that resemble a version
pull_request: # Run in every PR
workflow_dispatch: # Allow manually triggering the workflow
- 'v[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+' # Match tags that resemble a version
- 'v[0-9]+\.[0-9]+\.[0-9]+' # Match tags that resemble a version
pull_request: # Run in every PR
workflow_dispatch: # Allow manually triggering the workflow
schedule:
# Run roughly every 15 days at 00:00 UTC
# (useful to check if updates on dependencies break the package)
- cron: '0 0 1,16 * *'
- cron: "0 0 1,16 * *"

concurrency:
group: >-
Expand All @@ -32,10 +32,10 @@ jobs:
wheel-distribution: ${{ steps.wheel-distribution.outputs.path }}
steps:
- uses: actions/checkout@v3
with: {fetch-depth: 0} # deep clone for setuptools-scm
with: { fetch-depth: 0 } # deep clone for setuptools-scm
- uses: actions/setup-python@v4
id: setup-python
with: {python-version: "3.11"}
with: { python-version: "3.11" }
- name: Run static analysis and format checkers
run: pipx run pre-commit run --all-files --show-diff-on-failure
- name: Build package distribution files
Expand All @@ -48,7 +48,7 @@ jobs:
- name: Store the distribution files for use in other stages
# `tests` and `publish` will use the same pre-built distributions,
# so we make sure to release the exact same package that was tested
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-distribution-files
path: dist/
Expand All @@ -60,10 +60,10 @@ jobs:
matrix:
python:
- "3.10"
# - "3.7" # oldest Python supported by PSF
- "3.11" # newest Python that is stable
# - "3.7" # oldest Python supported by PSF
- "3.11" # newest Python that is stable
platform:
- ubuntu-latest
- ubuntu-latest
# - macos-latest
# - windows-latest
runs-on: ${{ matrix.platform }}
Expand All @@ -74,8 +74,10 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
uses: actions/download-artifact@v4
with:
name: python-distribution-files
path: dist/
- name: Run tests
run: >-
pipx run --python '${{ steps.setup-python.outputs.python-path }}'
Expand Down Expand Up @@ -109,10 +111,12 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: {python-version: "3.11"}
with: { python-version: "3.11" }
- name: Retrieve pre-built distribution files
uses: actions/download-artifact@v3
with: {name: python-distribution-files, path: dist/}
uses: actions/download-artifact@v4
with:
name: python-distribution-files
path: dist/
- name: Publish Package
uses: pypa/gh-action-pypi-publish@release/v1
# run: pipx run tox -e publish
Expand Down

0 comments on commit 1977344

Please sign in to comment.