Add an installation shell script for Linux/MacOS #41
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: ⏬ Install Script | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- '.github/workflows/install-script.yml' | |
- 'install.sh' | |
push: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
installation-from-script: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
flags: | |
- --force --verbose | |
- --force --dryrun | |
include: | |
- flags: --force --verbose | |
to_cache: true | |
name: Install RTMet from shell script | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
name: Cache Workflow installation | |
id: cache-rtmet | |
if: ${{ matrix.to_cache }} | |
with: | |
key: rtmet-${{ runner.os }}-envs-${{ hashFiles('cylc-src/bioreactor-workflow/envs/*') }}-script-${{ hashFiles('install.sh') }} | |
path: | | |
/usr/share/miniconda/envs/ | |
/home/runner/cylc-src/ | |
/home/runner/.bashrc | |
/usr/local/bin/cylc | |
/usr/local/bin/rose | |
- name: install RTMet | |
if: ${{ steps.cache-rtmet.outputs.cache-hit != 'true' || !matrix.to_cache }} | |
run: | | |
bash install.sh ${{ matrix.flags }} | |
validate-installation: | |
needs: installation-from-script | |
name: Validate RTMet installation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
key: rtmet-${{ runner.os }}-envs-${{ hashFiles('cylc-src/bioreactor-workflow/envs/*') }}-script-${{ hashFiles('install.sh') }} | |
fail-on-cache-miss: true | |
path: | | |
/home/runner/miniforge3/ | |
/home/runner/cylc-src/ | |
/home/runner/.bashrc | |
/usr/local/bin/cylc | |
/usr/local/bin/rose | |
- name: validate RTMet | |
run: | | |
cylc --help | |
rose --help | |
conda activate wf-binner |