Add Intermediate Data Types #53
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: Build | |
on: | |
push: | |
branches: [main] | |
tags: ["v*.*.*"] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
env: | |
# Increase this to manually reset the conda environment cache | |
CONDA_CACHE_NUMBER: 0 | |
YARDL_VERSION: 0.6.2 | |
defaults: | |
run: | |
# See https://github.com/marketplace/actions/setup-miniconda#important | |
shell: bash -el {0} | |
jobs: | |
build: | |
name: Build and Test C++, Python, MATLAB SDKs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure Build Environment | |
uses: ./.github/actions/configure-mrd-build-environment | |
- name: Build and Test with C++17 | |
run: just cpp_version=17 matlab=enabled validate-with-no-changes | |
- name: Build and Test with C++20 | |
run: just cpp_version=20 matlab=enabled validate-with-no-changes | |
- name: Package MATLAB toolbox | |
run: just build-matlab-toolbox | |
- name: Store MATLAB Toolbox | |
uses: actions/upload-artifact@v4 | |
with: | |
name: matlab-toolbox | |
path: matlab/release/mrd*.mltbx | |
overwrite: true | |
- name: Generate CMake FetchContent source archive | |
run: just build-cmake-fetch-src | |
- name: Store CMake FetchContent source archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mrd-cmake-src | |
path: mrd-cmake-src*.tar.gz | |
overwrite: true | |
docker: | |
name: Build and Test Docker images | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up just command runner | |
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 | |
- name: Build and test Docker images | |
run: just build-docker-images && just test-docker-images | |
publishDocs: | |
name: Publish Documentation | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'ismrmrd/mrd' | |
needs: [build, docker] | |
runs-on: ubuntu-latest | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | |
concurrency: | |
group: "pages" | |
cancel-in-progress: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up just command runner | |
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 | |
- name: Build static page | |
run: just build-docs | |
- name: Setup Pages | |
uses: actions/configure-pages@v5 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: 'docs/.vitepress/dist' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
release: | |
name: Publish Release | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
needs: [build, docker] | |
runs-on: ubuntu-latest | |
environment: | |
name: github-release | |
url: https://github.com/ismrmrd/mrd/releases | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- name: Retrieve MATLAB Toolbox | |
uses: actions/download-artifact@v4 | |
with: | |
name: matlab-toolbox | |
- name: Retrieve CMake FetchContent source archive | |
uses: actions/download-artifact@v4 | |
with: | |
name: mrd-cmake-src | |
- name: Generate Checksums | |
run: | | |
sha256sum mrd*.mltbx > sha256-checksums.txt | |
sha256sum mrd-cmake-src*.tar.gz >> sha256-checksums.txt | |
- name: Publish Artifacts | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
sha256-checksums.txt | |
mrd-cmake-src*.tar.gz | |
mrd*.mltbx | |
fail_on_unmatched_files: true | |
body: | | |
See also: | |
- [MRD Conda C++ SDK](https://anaconda.org/ismrmrd/mrd) | |
- [MRD Conda Python SDK](https://anaconda.org/ismrmrd/mrd-python) | |
- [PyPi](https://pypi.org/project/mrd-python/) | |
- [Docker image](https://ghcr.io/ismrmrd/mrd-tools) | |
append_body: true | |
- name: Log into ghcr.io | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up just command runner | |
uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 | |
- name: Push Docker images | |
run: just build-docker-images --tag "${GITHUB_REF_NAME}" --push |