Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove legend todo and update CI #48

Merged
merged 7 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,46 @@ concurrency:
jobs:
formatting:
name: Formatting and static analysis
runs-on: ubuntu-22.04
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e static
- uses: stefanzweifel/git-auto-commit-action@v4
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply automatic formatting

tests:
name: Tests
needs: formatting
runs-on: ubuntu-22.04
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox

docs:
needs: tests
name: Documentation
runs-on: ubuntu-22.04
runs-on: 'ubuntu-latest'
steps:
- run: sudo apt install --yes pandoc
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'
- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/ci.txt
- run: tox -e docs
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: html
path: html/
65 changes: 40 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,35 +15,39 @@ defaults:
jobs:
build_conda:
name: Conda build
runs-on: ubuntu-22.04
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0 # history required so cmake can determine version

- uses: conda-incubator/setup-miniconda@v2
- run: conda install -c conda-forge --yes conda-build boa
- run: conda mambabuild --channel conda-forge --channel scipp --python=3.8 --no-anaconda-upload --override-channels --output-folder conda/package conda
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: build-env
create-args: >-
conda-build
boa
- run: conda mambabuild --channel conda-forge --channel scipp --no-anaconda-upload --override-channels --output-folder conda/package conda

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: conda-package-noarch
path: conda/package/*/tof*.tar.bz2
path: conda/package/noarch/*.tar.bz2

build_wheels:
name: Wheels
runs-on: ubuntu-22.04
runs-on: 'ubuntu-latest'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # history required so setuptools_scm can determine version

- uses: actions/setup-python@v3
- uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.10'

- run: python -m pip install --upgrade pip
- run: python -m pip install -r requirements/wheels.txt
Expand All @@ -52,25 +56,36 @@ jobs:
run: python -m build

- name: Upload wheels
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: dist
path: dist

upload_packages:
name: Deploy packages
needs: [build_conda, build_wheels]
runs-on: ubuntu-22.04
upload_pypi:
name: Deploy PyPI
needs: [build_wheels, build_conda]
runs-on: 'ubuntu-latest'
environment: release
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v3
- uses: conda-incubator/setup-miniconda@v2
- run: conda install -c conda-forge --yes anaconda-client
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-*/*/*.tar.bz2)
- uses: actions/setup-python@v3
- uses: actions/download-artifact@v4
- uses: pypa/gh-action-pypi-publish@v1.8.14

- uses: pypa/gh-action-pypi-publish@v1.8.5
upload_conda:
name: Deploy Conda
needs: [build_wheels, build_conda]
runs-on: 'ubuntu-latest'
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/download-artifact@v4
- uses: mamba-org/setup-micromamba@v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
environment-name: upload-env
# frozen python due to breaking removal of 'imp' in 3.12
create-args: >-
anaconda-client
python=3.11
- run: anaconda --token ${{ secrets.ANACONDATOKEN }} upload --user scipp --label main $(ls conda-package-noarch/*.tar.bz2)
42 changes: 21 additions & 21 deletions requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,51 +5,51 @@
#
# pip-compile-multi
#
cachetools==5.3.0
cachetools==5.3.3
# via tox
certifi==2022.12.7
certifi==2024.6.2
# via requests
chardet==5.1.0
chardet==5.2.0
# via tox
charset-normalizer==3.1.0
charset-normalizer==3.3.2
# via requests
colorama==0.4.6
# via tox
distlib==0.3.6
distlib==0.3.8
# via virtualenv
filelock==3.12.0
filelock==3.15.4
# via
# tox
# virtualenv
gitdb==4.0.10
gitdb==4.0.11
# via gitpython
gitpython==3.1.31
# via -r requirements/ci.in
idna==3.4
gitpython==3.1.43
# via -r ci.in
idna==3.7
# via requests
packaging==23.1
packaging==24.1
# via
# pyproject-api
# tox
platformdirs==3.3.0
platformdirs==4.2.2
# via
# tox
# virtualenv
pluggy==1.0.0
pluggy==1.5.0
# via tox
pyproject-api==1.5.1
pyproject-api==1.7.1
# via tox
requests==2.28.2
# via -r requirements/ci.in
smmap==5.0.0
requests==2.32.3
# via -r ci.in
smmap==5.0.1
# via gitdb
tomli==2.0.1
# via
# pyproject-api
# tox
tox==4.5.0
# via -r requirements/ci.in
urllib3==1.26.15
tox==4.15.1
# via -r ci.in
urllib3==2.2.2
# via requests
virtualenv==20.22.0
virtualenv==20.26.3
# via tox
Loading
Loading