From eb8923f3c54d2d4e89ca0b3a779b6fb71fdc2305 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 30 Jan 2021 12:34:54 -0800 Subject: [PATCH] ci: adjust continuous/nightly schedule This commit reduces the cron schedule for nightly builds down from hourly and to actually nightly (at ~3am). The push-to-master flow now triggers effectively the same thing at push time, so if anything, this will reduce the latency of the continuous package build and deploy. The push-to-master flow will now skip builds if it changes only the docs. --- .github/workflows/gen_centos7.yml | 5 ++--- .github/workflows/gen_centos7_continuous.yml | 7 ++++++- .github/workflows/gen_centos8.yml | 5 ++--- .github/workflows/gen_centos8_continuous.yml | 7 ++++++- .github/workflows/gen_debian10.3.yml | 5 ++--- .github/workflows/gen_debian10.3_continuous.yml | 7 ++++++- .github/workflows/gen_debian9.12.yml | 5 ++--- .github/workflows/gen_debian9.12_continuous.yml | 7 ++++++- .github/workflows/gen_fedora31.yml | 5 ++--- .github/workflows/gen_fedora31_continuous.yml | 7 ++++++- .github/workflows/gen_fedora32.yml | 5 ++--- .github/workflows/gen_fedora32_continuous.yml | 7 ++++++- .github/workflows/gen_fedora33.yml | 5 ++--- .github/workflows/gen_fedora33_continuous.yml | 7 ++++++- .github/workflows/gen_macos.yml | 5 ++--- .github/workflows/gen_macos_continuous.yml | 7 ++++++- .github/workflows/gen_ubuntu16.yml | 5 ++--- .github/workflows/gen_ubuntu16_continuous.yml | 7 ++++++- .github/workflows/gen_ubuntu18.yml | 5 ++--- .github/workflows/gen_ubuntu18_continuous.yml | 7 ++++++- .github/workflows/gen_ubuntu20.04.yml | 5 ++--- .github/workflows/gen_ubuntu20.04_continuous.yml | 7 ++++++- .github/workflows/gen_windows.yml | 5 ++--- .github/workflows/gen_windows_continuous.yml | 7 ++++++- ci/generate-workflows.py | 14 +++++++++----- 25 files changed, 105 insertions(+), 53 deletions(-) diff --git a/.github/workflows/gen_centos7.yml b/.github/workflows/gen_centos7.yml index b42da34d0..392323272 100644 --- a/.github/workflows/gen_centos7.yml +++ b/.github/workflows/gen_centos7.yml @@ -2,12 +2,11 @@ name: centos7 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_centos7_continuous.yml b/.github/workflows/gen_centos7_continuous.yml index daa1ed314..06333fcbe 100644 --- a/.github/workflows/gen_centos7_continuous.yml +++ b/.github/workflows/gen_centos7_continuous.yml @@ -3,7 +3,12 @@ name: centos7_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_centos8.yml b/.github/workflows/gen_centos8.yml index ff08b0ef1..e9707891b 100644 --- a/.github/workflows/gen_centos8.yml +++ b/.github/workflows/gen_centos8.yml @@ -2,12 +2,11 @@ name: centos8 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_centos8_continuous.yml b/.github/workflows/gen_centos8_continuous.yml index 299358ed2..e1b148b78 100644 --- a/.github/workflows/gen_centos8_continuous.yml +++ b/.github/workflows/gen_centos8_continuous.yml @@ -3,7 +3,12 @@ name: centos8_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_debian10.3.yml b/.github/workflows/gen_debian10.3.yml index 1dcf8d681..36b7d5ec5 100644 --- a/.github/workflows/gen_debian10.3.yml +++ b/.github/workflows/gen_debian10.3.yml @@ -2,12 +2,11 @@ name: debian10.3 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_debian10.3_continuous.yml b/.github/workflows/gen_debian10.3_continuous.yml index 05af8e2a1..ab189d20d 100644 --- a/.github/workflows/gen_debian10.3_continuous.yml +++ b/.github/workflows/gen_debian10.3_continuous.yml @@ -3,7 +3,12 @@ name: debian10.3_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_debian9.12.yml b/.github/workflows/gen_debian9.12.yml index e0c07e472..df7f37e5d 100644 --- a/.github/workflows/gen_debian9.12.yml +++ b/.github/workflows/gen_debian9.12.yml @@ -2,12 +2,11 @@ name: debian9.12 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_debian9.12_continuous.yml b/.github/workflows/gen_debian9.12_continuous.yml index cc2a2d851..396af0b80 100644 --- a/.github/workflows/gen_debian9.12_continuous.yml +++ b/.github/workflows/gen_debian9.12_continuous.yml @@ -3,7 +3,12 @@ name: debian9.12_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_fedora31.yml b/.github/workflows/gen_fedora31.yml index 7358c8136..49e5a57d0 100644 --- a/.github/workflows/gen_fedora31.yml +++ b/.github/workflows/gen_fedora31.yml @@ -2,12 +2,11 @@ name: fedora31 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_fedora31_continuous.yml b/.github/workflows/gen_fedora31_continuous.yml index 39f991549..7aea72878 100644 --- a/.github/workflows/gen_fedora31_continuous.yml +++ b/.github/workflows/gen_fedora31_continuous.yml @@ -3,7 +3,12 @@ name: fedora31_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_fedora32.yml b/.github/workflows/gen_fedora32.yml index bcb227c8e..6ff972455 100644 --- a/.github/workflows/gen_fedora32.yml +++ b/.github/workflows/gen_fedora32.yml @@ -2,12 +2,11 @@ name: fedora32 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_fedora32_continuous.yml b/.github/workflows/gen_fedora32_continuous.yml index 93c8ac839..feaad1472 100644 --- a/.github/workflows/gen_fedora32_continuous.yml +++ b/.github/workflows/gen_fedora32_continuous.yml @@ -3,7 +3,12 @@ name: fedora32_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_fedora33.yml b/.github/workflows/gen_fedora33.yml index 9110a3488..25770c0cf 100644 --- a/.github/workflows/gen_fedora33.yml +++ b/.github/workflows/gen_fedora33.yml @@ -2,12 +2,11 @@ name: fedora33 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_fedora33_continuous.yml b/.github/workflows/gen_fedora33_continuous.yml index 691c32ad9..516429943 100644 --- a/.github/workflows/gen_fedora33_continuous.yml +++ b/.github/workflows/gen_fedora33_continuous.yml @@ -3,7 +3,12 @@ name: fedora33_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_macos.yml b/.github/workflows/gen_macos.yml index 6ee315760..be0f817ad 100644 --- a/.github/workflows/gen_macos.yml +++ b/.github/workflows/gen_macos.yml @@ -2,12 +2,11 @@ name: macos on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_macos_continuous.yml b/.github/workflows/gen_macos_continuous.yml index 35e51bf2e..7327c6840 100644 --- a/.github/workflows/gen_macos_continuous.yml +++ b/.github/workflows/gen_macos_continuous.yml @@ -3,7 +3,12 @@ name: macos_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_ubuntu16.yml b/.github/workflows/gen_ubuntu16.yml index 9d46f252b..6b801b9af 100644 --- a/.github/workflows/gen_ubuntu16.yml +++ b/.github/workflows/gen_ubuntu16.yml @@ -2,12 +2,11 @@ name: ubuntu16 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_ubuntu16_continuous.yml b/.github/workflows/gen_ubuntu16_continuous.yml index cb6af8c68..371968374 100644 --- a/.github/workflows/gen_ubuntu16_continuous.yml +++ b/.github/workflows/gen_ubuntu16_continuous.yml @@ -3,7 +3,12 @@ name: ubuntu16_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_ubuntu18.yml b/.github/workflows/gen_ubuntu18.yml index aa8bbcec3..715a451be 100644 --- a/.github/workflows/gen_ubuntu18.yml +++ b/.github/workflows/gen_ubuntu18.yml @@ -2,12 +2,11 @@ name: ubuntu18 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_ubuntu18_continuous.yml b/.github/workflows/gen_ubuntu18_continuous.yml index 1cec51838..da3f1c506 100644 --- a/.github/workflows/gen_ubuntu18_continuous.yml +++ b/.github/workflows/gen_ubuntu18_continuous.yml @@ -3,7 +3,12 @@ name: ubuntu18_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_ubuntu20.04.yml b/.github/workflows/gen_ubuntu20.04.yml index efbd3577b..243cd722a 100644 --- a/.github/workflows/gen_ubuntu20.04.yml +++ b/.github/workflows/gen_ubuntu20.04.yml @@ -2,12 +2,11 @@ name: ubuntu20.04 on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_ubuntu20.04_continuous.yml b/.github/workflows/gen_ubuntu20.04_continuous.yml index 6b4a0b82f..c7402f7eb 100644 --- a/.github/workflows/gen_ubuntu20.04_continuous.yml +++ b/.github/workflows/gen_ubuntu20.04_continuous.yml @@ -3,7 +3,12 @@ name: ubuntu20.04_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/.github/workflows/gen_windows.yml b/.github/workflows/gen_windows.yml index ec6271495..fa7c546fd 100644 --- a/.github/workflows/gen_windows.yml +++ b/.github/workflows/gen_windows.yml @@ -2,12 +2,11 @@ name: windows on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' jobs: diff --git a/.github/workflows/gen_windows_continuous.yml b/.github/workflows/gen_windows_continuous.yml index 07498f25c..d84a6a9c3 100644 --- a/.github/workflows/gen_windows_continuous.yml +++ b/.github/workflows/gen_windows_continuous.yml @@ -3,7 +3,12 @@ name: windows_continuous on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' jobs: diff --git a/ci/generate-workflows.py b/ci/generate-workflows.py index 2b88f45e6..82910e3e8 100755 --- a/ci/generate-workflows.py +++ b/ci/generate-workflows.py @@ -40,7 +40,7 @@ class RunStep(Step): if env: for k, v in env.items(): - if self.shell is "bash": + if self.shell == "bash": run = f"export {k}={v}\n{run}\n" f.write(f" run: {yv(run)}\n") @@ -590,12 +590,11 @@ def generate_pr_actions(): lambda t: t.pull_request(), trigger=""" on: - push: - branches: - - master pull_request: branches: - master + paths-ignore: + - 'docs/*' """, is_continuous=False, ) @@ -608,7 +607,12 @@ def continuous_actions(): trigger=""" on: schedule: - - cron: "10 * * * *" + - cron: "10 3 * * *" + push: + branches: + - master + paths-ignore: + - 'docs/**' """, is_continuous=True, )