-
Notifications
You must be signed in to change notification settings - Fork 0
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
2 changed files
with
54 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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-22.04' | ||
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/[email protected] | ||
|
||
- uses: pypa/[email protected] | ||
upload_conda: | ||
name: Deploy Conda | ||
needs: [build_wheels, build_conda] | ||
runs-on: 'ubuntu-22.04' | ||
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) |