Skip to content

Commit 9383173

Browse files
release-actions: migrate to the central actions for installation
* Use the centrally defined meta-release management thinggy for installing Cylc components from the correct branches. * Perform nightly builds for all active Cylc meta-releases (not just the latest).
1 parent d016834 commit 9383173

File tree

4 files changed

+61
-68
lines changed

4 files changed

+61
-68
lines changed

.github/actions/install-libs/action.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,21 @@ jobs:
8585
working-directory: docs
8686
run: pip install ".[all]"
8787

88-
- name: install libs to document
89-
uses: cylc/cylc-doc/.github/actions/install-libs@master
88+
- name: install libs
89+
uses: cylc/release-actions/install-cylc-components@v1
9090
with:
91-
metomi-rose-tag: '2.0.x'
91+
cylc_flow: true
92+
cylc_flow_opts: 'main_loop-log_data_store,main_loop-log_db,main_loop-log_main_loop,main_loop-log_memory'
93+
cylc_flow_tag: ${{ inputs.cylc-flow-tag }}
94+
cylc_uiserver: true
95+
cylc_uiserver_opts: ''
96+
cylc_uiserver_tag: ${{ inputs.cylc-uis-tag }}
97+
cylc_rose: true
98+
cylc_rose_opts: ''
99+
cylc_rose_tag: ${{ inputs.cylc-rose-tag }}
100+
metomi_rose: true
101+
metomi_rose_opts: ''
102+
metomi_rose_tag: ${{ inputs.metomi-rose-tag }}
92103

93104
- name: create conda envs
94105
uses: ./docs/.github/actions/create-conda-envs

.github/workflows/nightly.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,33 @@ concurrency:
3030
group: ${{ github.workflow }}-${{ github.ref }}
3131

3232
jobs:
33+
set-meta-releases:
34+
# read the meta-release versions from the branches.json file
35+
runs-on: ubuntu-latest
36+
timeout-minutes: 2
37+
outputs:
38+
meta-releases: ${{ steps.set-meta-releases.outputs.meta-releases }}
39+
steps:
40+
- name: install libs
41+
id: set-meta-releases
42+
uses: cylc/release-actions/set-meta-releases@v1
43+
3344
deploy:
45+
needs: set-meta-releases
3446
runs-on: ubuntu-latest
3547
timeout-minutes: 10
3648
defaults:
3749
run:
3850
# use login shell for conda activation
3951
shell: bash -leo pipefail {0}
52+
strategy:
53+
# run one job per meta-release
54+
matrix:
55+
meta_release: ${{ fromJson(needs.set-meta-releases.outputs.meta-releases) }}
56+
# don't stop if one job fails
57+
fail-fast: false
58+
# only run one job at a time
59+
max-parallel: 1
4060
steps:
4161
- name: configure python
4262
uses: actions/setup-python@v4
@@ -55,13 +75,17 @@ jobs:
5575
run: pip install "${{ github.workspace }}/docs[all]"
5676

5777
- name: install libs to document
58-
uses: ./docs/.github/actions/install-libs
78+
uses: cylc/release-actions/install-cylc-components@v1
5979
with:
60-
# NOTE: these need to be manually updated as necessary:
61-
cylc-flow-tag: '8.1.x'
62-
# cylc-rose-tag:
63-
# cylc-uis-tag:
64-
metomi-rose-tag: '2.0.x'
80+
meta_release: ${{ matrix.meta_release }}
81+
cylc_flow: true
82+
cylc_flow_opts: 'main_loop-log_data_store,main_loop-log_db,main_loop-log_main_loop,main_loop-log_memory'
83+
cylc_uiserver: true
84+
cylc_uiserver_opts: ''
85+
cylc_rose: true
86+
cylc_rose_opts: ''
87+
metomi_rose: true
88+
metomi_rose_opts: ''
6589

6690
- name: checkout gh-pages branch
6791
uses: actions/checkout@v3
@@ -91,7 +115,8 @@ jobs:
91115
git log --oneline --graph --no-abbrev-commit gh-pages
92116
echo "::endgroup::"
93117
echo "[command]git rebase -i --root"
94-
EDITOR='sed -i "s/pick \([0-9a-z]* -nightly build-\)/drop \1/"' \
118+
# drop all "-nightly build-" commits which didn't come from this workflow run
119+
EDITOR="sed -i '/-nightly build ${GITHUB_RUN_ID}-/! s/pick \(.* -nightly build\)/drop \1/'" \
95120
git rebase -i --root
96121
97122
# if versions have been added/removed since the last build, we will
@@ -110,21 +135,22 @@ jobs:
110135
111136
- name: build docs
112137
run: |
113-
version="nightly.$(isodatetime --utc -f %Y-%m-%d)"
138+
version="nightly:${{ matrix.meta_release}}.$(isodatetime --utc -f %Y-%m-%d)"
139+
builddir="nightly_${{ matrix.meta_release }}"
114140
make -C docs \
115141
html \
116142
slides \
117143
linkcheck \
118144
SPHINXOPTS="-Wn --keep-going -A sidebar_version_name=${version}" \
119145
STABLE=false \
120146
LATEST=false \
121-
BUILDDIR='doc/nightly' \
147+
BUILDDIR="doc/$builddir" \
122148
FORCE_COLOR=true
123-
git -C gh-pages add 'nightly' 'versions.json'
149+
git -C gh-pages add "$builddir" 'versions.json'
124150
125151
- name: push changes
126152
working-directory: gh-pages
127153
run: |
128154
git status
129-
git commit -m '-nightly build-'
155+
git commit -m "-nightly build ${GITHUB_RUN_ID}-"
130156
git push --force-with-lease origin gh-pages

.github/workflows/test.yml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,17 @@ jobs:
5151
- name: install cylc-doc
5252
run: pip install .[all]
5353

54-
- name: install libs to document (8.0.x)
55-
if: github.base_ref == '8.0.x'
56-
uses: ./.github/actions/install-libs
54+
- name: install libs
55+
uses: cylc/release-actions/install-cylc-components@v1
5756
with:
58-
# NOTE: these need to be manually updated as necessary:
59-
cylc-flow-tag: '8.0.x'
60-
cylc-rose-tag: '1.1.x'
61-
cylc-uis-tag: '1.1.x'
62-
metomi-rose-tag: '2.0.x'
63-
64-
- name: install libs to document (other branches)
65-
if: github.base_ref != '8.0.x'
66-
uses: ./.github/actions/install-libs
67-
with:
68-
# NOTE: these need to be manually updated as necessary:
69-
cylc-flow-tag: '8.1.x'
70-
# cylc-rose-tag:
71-
# cylc-uis-tag:
72-
metomi-rose-tag: '2.0.x'
57+
cylc_flow: true
58+
cylc_flow_opts: 'main_loop-log_data_store,main_loop-log_db,main_loop-log_main_loop,main_loop-log_memory'
59+
cylc_uiserver: true
60+
cylc_uiserver_opts: ''
61+
cylc_rose: true
62+
cylc_rose_opts: ''
63+
metomi_rose: true
64+
metomi_rose_opts: ''
7365

7466
- name: install eslint
7567
run: |

0 commit comments

Comments
 (0)