-
Notifications
You must be signed in to change notification settings - Fork 29
51 lines (45 loc) · 1.64 KB
/
ismrmrd_python_conda.yml
File metadata and controls
51 lines (45 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Conda
on:
push:
branches: [master]
tags: ["v*.*.*"]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build-conda-packages:
name: Build and publish conda package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: conda-incubator/setup-miniconda@v4
with:
miniforge-version: latest
activate-environment: ismrmrd-python-build
environment-file: conda/environment.yml
python-version: 3.12
auto-activate-base: false
- name: Check generated schema files are up to date
shell: bash -l {0}
run: |
pip install ".[dev]" -q
python setup.py generate_schema
git diff --exit-code ismrmrd/xsd/ismrmrdschema/ || \
(echo "ERROR: Generated schema files are out of date. Run 'python setup.py generate_schema' and commit the result." && exit 1)
- name: Build conda package
shell: bash -l {0}
working-directory: conda
run: |
./package.sh
echo "Packages built: $(find build_pkg -name 'ismrmrd-python*.conda' -or -name 'ismrmrd-python*.tar.bz2')"
- name: Push conda package
shell: bash -l {0}
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
env:
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
working-directory: conda
run: |
for p in $(find build_pkg -name 'ismrmrd-python*.conda' -or -name 'ismrmrd-python*.tar.bz2')
do
./publish_package.sh -u ismrmrd -t "$ANACONDA_TOKEN" -p "$p"
done