From 095075cb76681a7e99066a876d214dcc33f5bbb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wojciech=20Dani=C5=82o?= Date: Mon, 8 Mar 2021 13:27:10 +0100 Subject: [PATCH] Fixing unnecessary full builds on PR to develop (https://github.com/enso-org/ide/pull/1309) Original commit: https://github.com/enso-org/ide/commit/6a3845e32aee1f20e4b70d24843ffff5232d2684 --- gui/.github/workflows/gui-ci.yml | 14 +++++++------- gui/build/workflow.js | 6 ++++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/gui/.github/workflows/gui-ci.yml b/gui/.github/workflows/gui-ci.yml index 27f1a682a10d..38631b969cc5 100644 --- a/gui/.github/workflows/gui-ci.yml +++ b/gui/.github/workflows/gui-ci.yml @@ -245,10 +245,10 @@ jobs: run: node ./run dist --skip-version-validation --target macos if: startsWith(matrix.os,'macos') if: >- - !(contains(github.event.head_commit.message,'[ci build]') || - github.base_ref == 'develop' || github.base_ref == 'unstable' || - github.base_ref == 'stable' || github.ref == 'refs/heads/unstable' || - github.ref == 'refs/heads/stable') + !(contains(github.event.head_commit.message,'[ci build]') || github.ref == + 'develop' || github.base_ref == 'unstable' || github.base_ref == 'stable' + || github.ref == 'refs/heads/unstable' || github.ref == + 'refs/heads/stable') build: name: Build runs-on: ${{ matrix.os }} @@ -374,9 +374,9 @@ jobs: dist/client/enso-linux-${{fromJson(steps.changelog.outputs.content).version}}.AppImage.sha256 if: startsWith(matrix.os,'ubuntu') if: >- - contains(github.event.head_commit.message,'[ci build]') || github.base_ref - == 'develop' || github.base_ref == 'unstable' || github.base_ref == - 'stable' || github.ref == 'refs/heads/unstable' || github.ref == + contains(github.event.head_commit.message,'[ci build]') || github.ref == + 'develop' || github.base_ref == 'unstable' || github.base_ref == 'stable' + || github.ref == 'refs/heads/unstable' || github.ref == 'refs/heads/stable' release_to_github: name: GitHub Release diff --git a/gui/build/workflow.js b/gui/build/workflow.js index e2287cdaa5e2..7ceddb2efdc3 100644 --- a/gui/build/workflow.js +++ b/gui/build/workflow.js @@ -400,8 +400,10 @@ let releaseCondition = `github.ref == 'refs/heads/unstable' || github.ref == 're /// Make a full build if one of the following conditions is true: /// 1. There was a `FLAG_FORCE_CI_BUILD` flag set in the commit message (see its docs for more info). -/// 2. It was a pull request to 'develop', 'unstable', or 'stable'. -let buildCondition = `contains(github.event.head_commit.message,'${FLAG_FORCE_CI_BUILD}') || github.base_ref == 'develop' || github.base_ref == 'unstable' || github.base_ref == 'stable' || ${releaseCondition}` +/// 2. It was a pull request to the 'unstable', or the 'stable' branch. +/// 3. It was a commit to the 'develop' branch. +/// Otherwise, perform a simplified (faster) build only. +let buildCondition = `contains(github.event.head_commit.message,'${FLAG_FORCE_CI_BUILD}') || github.ref == 'develop' || github.base_ref == 'unstable' || github.base_ref == 'stable' || ${releaseCondition}` let workflow = { name : "GUI CI",