Skip to content
This repository was archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
Fixing CI (#1297)
Browse files Browse the repository at this point in the history
  • Loading branch information
wdanilo authored Mar 5, 2021
1 parent 8e1da4f commit 590b10d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/gui-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ jobs:
if: >-
github.base_ref == 'develop' || github.base_ref == 'unstable' ||
github.base_ref == 'stable'
- name: Fail if squash commit to the 'unstable' or the 'stable' branch.
run: >-
if [[ ${{ github.base_ref }} == "unstable" || ${{ github.base_ref }}
== "stable" ]]; then exit 1; fi
lint:
name: Linter
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -240,7 +244,8 @@ jobs:
if: >-
!(contains(github.event.head_commit.message,'[ci build]') ||
github.base_ref == 'develop' || github.base_ref == 'unstable' ||
github.base_ref == 'stable')
github.base_ref == 'stable' || github.ref == 'refs/heads/unstable' ||
github.ref == 'refs/heads/stable')
build:
name: Build
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -368,7 +373,8 @@ jobs:
if: >-
contains(github.event.head_commit.message,'[ci build]') || github.base_ref
== 'develop' || github.base_ref == 'unstable' || github.base_ref ==
'stable'
'stable' || github.ref == 'refs/heads/unstable' || github.ref ==
'refs/heads/stable'
release_to_github:
name: GitHub Release
runs-on: ${{ matrix.os }}
Expand Down
12 changes: 9 additions & 3 deletions build/workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,17 @@ let assertReleaseDoNotExists = [
}
]

assertNoSquashCommitForRelease = {
name: `Fail if squash commit to the 'unstable' or the 'stable' branch.`,
run: 'if [[ ${{ github.base_ref }} == "unstable" || ${{ github.base_ref }} == "stable" ]]; then exit 1; fi',
}

let assertions = list(
assertVersionUnstable,
assertVersionStable,
assertReleaseDoNotExists,
assertChangelogWasUpdated
assertChangelogWasUpdated,
assertNoSquashCommitForRelease,
)


Expand All @@ -378,7 +384,7 @@ 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'`
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}`

let workflow = {
name : "GUI CI",
Expand Down Expand Up @@ -452,7 +458,7 @@ let workflow = {
uploadToCDN('index.js.gz','style.css','ide.wasm','wasm_imports.js.gz'),
],{ if:releaseCondition,
needs:['version_assertions','lint','test','wasm-test','build']
}),
})
}
}

Expand Down

0 comments on commit 590b10d

Please sign in to comment.