add missing checkout action #33
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
name: check compatibility ilastik | |
concurrency: ilastik | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- .github/workflows/check_compatibility_ilastik.yaml | |
- scripts/check_compatibility_ilastik.py | |
workflow_dispatch: | |
schedule: | |
- cron: 0 1 * * * # update compatibility once a day | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
outputs: | |
version_matrix: ${{ steps.cvm.outputs.version_matrix }} | |
steps: | |
- name: download version list | |
run: wget https://files.ilastik.org/ilastik-versions-bmz.json | |
- name: create version matrix | |
id: cvm | |
shell: python | |
run: | | |
import json | |
import os | |
with open("ilastik-versions-bmz.json") as f: | |
vs = json.load(f) | |
version_matrix = dict(include=[dict(v=v, env_url=f"https://files.ilastik.org/ilastik-{v}-Linux.yml") for v in vs]) | |
with open(os.environ["GITHUB_OUTPUT"], "a") as fh: | |
print(f"version_matrix={version_matrix}", file=fh) | |
generate-reports: | |
runs-on: ubuntu-latest | |
needs: setup | |
environment: 'production' | |
strategy: | |
fail-fast: false | |
matrix: ${{ fromJson(needs.setup.outputs.version_matrix) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: wget https://${{vars.S3_HOST}}/${{vars.S3_BUCKET}}/${{vars.S3_FOLDER}}/all_versions_draft.json | |
- run: wget https://${{vars.S3_HOST}}/${{vars.S3_BUCKET}}/${{vars.S3_FOLDER}}/all_versions.json | |
- name: Download ilastik env | |
run: wget --output-document env.yaml ${{ matrix.env_url }} | |
- name: ignore unrelated packages | |
run: sed -i '/multi-hypotheses-tracking-with-gurobi/d; /gurobi-symlink/d' env.yaml | |
- name: Setup ilastik env | |
uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: env.yaml | |
cache-downloads: true | |
cache-environment: true | |
- name: test drafts with ilastik ${{ matrix.v }} | |
shell: bash -l {0} | |
run: python scripts/check_compatibility_ilastik.py ${{ matrix.v }} all_versions_draft.json generated-reports | |
- name: test published versions with ilastik ${{ matrix.v }} | |
shell: bash -l {0} | |
run: python scripts/check_compatibility_ilastik.py ${{ matrix.v }} all_versions.json generated-reports | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: generated-reports | |
path: generated-reports | |
upload-reports: | |
needs: generate-reports | |
environment: 'production' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
cache: "pip" # caching pip dependencies | |
- run: pip install . | |
- uses: actions/download-artifact@v4 | |
with: | |
name: generated-reports | |
path: generated-reports | |
- run: python scripts/upload_reports.py generated-reports | |