Add an installation shell script for Linux/MacOS #49
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: | |
fail-fast: false | |
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: | | |
/home/runner/miniforge3/ | |
/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/.bashrc | |
/usr/local/bin/cylc | |
/usr/local/bin/rose | |
- name: Copy bioreactor-workflow to sources | |
run: | | |
mkdir -p $HOME/cylc-src | |
cp -r cylc-src/bioreactor-workflow/ $HOME/cylc-src/ | |
- name: validate RTMet | |
run: | | |
cylc --help | |
rose --help | |
conda run -p /home/runner/miniforge3/envs/wf-datamunging \ | |
frictionless --help | |
cylc validate bioreactor-workflow | |
cylc install bioreactor-workflow \ | |
-run-name=test-run | |
cp -R $GITHUB_WORKSPACE/test/tutorial_raws/* \ | |
$HOME/cylc-run/bioreactor-workflow/test-run/raws/ | |
cylc play bioreactor-workflow/test-run \ | |
--no-detach \ | |
--abort-if-any-task-fails \ | |
--final-cycle-point=3 | |