-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #342 from oliver-sanders/8.0b3-installation-changes
8.0b3 installation changes
- Loading branch information
Showing
26 changed files
with
403 additions
and
165 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build Conda Envs | ||
description: Create Conda environments from documented env files. | ||
|
||
inputs: | ||
python_version: | ||
description: Version to install. | ||
required: true | ||
cylc_flow_version: | ||
description: Version to install. | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- shell: bash | ||
run: | | ||
# get cylc version... | ||
if [[ -z '${{ inputs.cylc_flow_version }}' ]]; then | ||
# ... from cylc library | ||
CYLC_RELEASE="$(python src/lib/cylc_release.py)" | ||
else | ||
# ... from GitHub action input | ||
CYLC_RELEASE="${{ inputs.cylc_flow_version }}" | ||
fi | ||
echo "CYLC_RELEASE=$CYLC_RELEASE" >> "${GITHUB_ENV}" | ||
- shell: bash | ||
run: | | ||
# use mamba (much faster) | ||
# use this when released: https://github.com/mamba-org/setup-mamba | ||
conda install -n base -c conda-forge -y mamba | ||
- shell: bash | ||
run: | | ||
for env_file in $(echo src/reference/environments/envs/*.yml); do | ||
echo "# creating env from: ${env_file}" | ||
new_env_file="$(sed 's/\(.*\)\.yml/\1-2.yml/' <<< "${env_file}")" | ||
# substitute the python and cylc-flow versions in the env files | ||
# TODO: add explicit python dep | ||
sed \ | ||
-e 's/python =.*/python =${{ inputs.python_version }}/' \ | ||
-e "s/|release|/${CYLC_RELEASE}/" \ | ||
"${env_file}" \ | ||
> "${new_env_file}" | ||
# create the env | ||
conda run -n base mamba env create -f "${new_env_file}" -n cylc-env | ||
# test the env | ||
conda run -n cylc-env cylc version | ||
conda env remove -n cylc-env | ||
done |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: create conda environments | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- '.github/workflows/create-conda-envs.yml' | ||
- 'src/reference/environments/env/*.ya?ml' | ||
workflow_dispatch: | ||
inputs: | ||
cylc_flow_version: | ||
description: 'Version to install.' | ||
required: true | ||
|
||
jobs: | ||
test_conda_install: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
python: [3.7, 3.8, 3.9] | ||
steps: | ||
- name: checkout cylc-doc | ||
uses: actions/checkout@v2 | ||
|
||
- name: configure python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.7' | ||
|
||
- name: install | ||
run: | | ||
# pick up deps for version processing | ||
pip install 'setuptools>=49' | ||
- name: checkout cylc-flow init file | ||
run: | | ||
# needed to extract the cylc-flow version | ||
LIB_PATH='src/lib/cylc/flow' | ||
mkdir -p "$LIB_PATH" | ||
curl \ | ||
https://raw.githubusercontent.com/cylc/cylc-flow/master/cylc/flow/__init__.py \ | ||
> "$LIB_PATH/__init__.py" | ||
- name: create conda envs | ||
uses: ./.github/actions/create-conda-envs | ||
with: | ||
python_version: ${{ matrix.python }} | ||
cylc_flow_version: ${{ github.event.inputs.cylc_flow_version }} |
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
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
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
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
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
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
Oops, something went wrong.