aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorZach Burnett <zburnett@stsci.edu>2023-12-22 21:38:15 -0500
committerGitHub <noreply@github.com>2023-12-22 21:38:15 -0500
commit6be65634f635642a5ecfc46532b3b2b39f8b1982 (patch)
tree41c1ba7d0c7a747e5b2fb7224274756d137b1edc /.github
parent91cffa5610904acfbd9aec198476445ac0bc864f (diff)
downloadastroconda-releases-6be65634f635642a5ecfc46532b3b2b39f8b1982.tar.gz
add workflow to build environment / test changes to requirements (#160)
* add workflow to test JWSTDP build * add workflow to test CALDP build * retrieve latest release * fix quotes * add documentation * print release * add release to name * concurrency based on inputs * resolve links * get release name * fix output * refactor triggers
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build_caldp.yaml52
-rw-r--r--.github/workflows/build_jwstdp.yaml56
2 files changed, 108 insertions, 0 deletions
diff --git a/.github/workflows/build_caldp.yaml b/.github/workflows/build_caldp.yaml
new file mode 100644
index 0000000..160175b
--- /dev/null
+++ b/.github/workflows/build_caldp.yaml
@@ -0,0 +1,52 @@
+name: build CALDP
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - caldp/**
+ pull_request:
+ paths:
+ - caldp/**
+ workflow_dispatch:
+ inputs:
+ release:
+ description: CALDP release (can also be `latest`, `stable`)
+ type: string
+ required: false
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.release }}
+ cancel-in-progress: true
+
+jobs:
+ release:
+ name: name of release
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - id: release
+ run: echo "release=$(basename $(readlink -f caldp/${{ inputs.release || 'latest' }}))" >> $GITHUB_OUTPUT
+ - run: echo "release=${{ steps.release.outputs.release }}"
+ outputs:
+ release: ${{ steps.release.outputs.release }}
+ build:
+ needs: [ release ]
+ name: build CALDP `${{ needs.release.outputs.release }}` (${{ matrix.runs-on }})
+ runs-on: ${{ matrix.runs-on }}
+ strategy:
+ matrix:
+ runs-on: [ ubuntu-latest, macos-latest ]
+ defaults:
+ run:
+ shell: micromamba-shell {0}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: mamba-org/setup-micromamba@v1
+ with:
+ environment-name: caldp-${{ runner.os }}
+ environment-file: caldp/${{ needs.release.outputs.release }}/latest-${{ runner.os == 'Linux' && 'linux' || 'macos' }}.yml
+ init-shell: none
+ generate-run-shell: true
+ - run: pip list
diff --git a/.github/workflows/build_jwstdp.yaml b/.github/workflows/build_jwstdp.yaml
new file mode 100644
index 0000000..7bde9da
--- /dev/null
+++ b/.github/workflows/build_jwstdp.yaml
@@ -0,0 +1,56 @@
+name: build JWSTDP
+
+on:
+ push:
+ branches:
+ - master
+ paths:
+ - jwstdp/**
+ pull_request:
+ paths:
+ - jwstdp/**
+ workflow_dispatch:
+ inputs:
+ release:
+ description: JWSTDP release
+ type: string
+ required: false
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.release }}
+ cancel-in-progress: true
+
+jobs:
+ release:
+ name: name of release
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - id: latest
+ run: echo "latest=$(ls -1 jwstdp | sort -t "." -k1,1n -k2,2n -k3,3n | tail -n1)" >> $GITHUB_OUTPUT
+ - run: echo "latest=${{ steps.latest.outputs.latest }}"
+ - id: release
+ run: echo "release=${{ inputs.release || steps.latest.outputs.latest }}" >> $GITHUB_OUTPUT
+ - run: echo "release=${{ steps.release.outputs.release }}"
+ outputs:
+ release: ${{ steps.release.outputs.release }}
+ build:
+ needs: [ release ]
+ name: build JWSTDP `${{ needs.release.outputs.release }}` (${{ matrix.runs-on }})
+ runs-on: ${{ matrix.runs-on }}
+ strategy:
+ matrix:
+ runs-on: [ ubuntu-latest, macos-latest ]
+ defaults:
+ run:
+ shell: micromamba-shell {0}
+ steps:
+ - uses: actions/checkout@v4
+ - uses: mamba-org/setup-micromamba@v1
+ with:
+ environment-name: jwstdp-${{ runner.os }}
+ environment-file: jwstdp/${{ needs.release.outputs.release }}/conda_python_${{ runner.os == 'macOS' && 'macos-' || '' }}stable-deps.txt
+ init-shell: none
+ generate-run-shell: true
+ - run: pip install -r jwstdp/${{ needs.release.outputs.release }}/reqs_${{ runner.os == 'macOS' && 'macos-' || '' }}stable-deps.txt
+ - run: pip list