diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-04-23 01:05:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 10:05:23 +0200 |
commit | dbb053492a3c64236f7e8f9358b9c7f297ba241a (patch) | |
tree | 6d5828d714f0a9580e32c2404d494c1b413ced1d /azure-pipelines.yml | |
parent | e4a3feeb92940a9b3c4ce88fc808a0cdff2e4e9c (diff) | |
download | Nim-dbb053492a3c64236f7e8f9358b9c7f297ba241a.tar.gz |
followup #17561, skipping ci now implies green (#17813)
* followup #17561, skip ci now implies green; [skip ci] * fixup [skip ci] * fixup test without skip ci * fixup [skip ci] * fixup2 [skip ci] * github actions now automatically supports [skip ci]
Diffstat (limited to 'azure-pipelines.yml')
-rw-r--r-- | azure-pipelines.yml | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5c244648d..7e5b5c27d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,6 +7,10 @@ pr: include: - '*' +variables: +- name: skipci + value: false + jobs: - job: packages @@ -58,22 +62,22 @@ jobs: fetchDepth: 2 # see D20210329T004830 - bash: | - # D20210329T004830:here refs https://github.com/microsoft/azure-pipelines-agent/issues/2944 - # `--no-merges` is needed to avoid merge commits which occur for PR's. - # $(Build.SourceVersionMessage) is not helpful - # nor is `github.event.head_commit.message` for github actions. - commitMsg=$(git log --no-merges -1 --pretty=format:"%s") - echo commitMsg: $commitMsg - echo $commitMsg | grep -v '\[skip ci\]' # fails if [skip ci] not in commit msg + set -e + . ci/funs.sh + if nimIsCiSkip; then + echo '##vso[task.setvariable variable=skipci]true' + fi displayName: 'Check whether to skip CI' - bash: git clone --depth 1 https://github.com/nim-lang/csources_v1 csources displayName: 'Checkout Nim csources' + condition: and(succeeded(), eq(variables['skipci'], 'false')) - task: NodeTool@0 inputs: versionSpec: '12.x' displayName: 'Install node.js 12.x' + condition: and(succeeded(), eq(variables['skipci'], 'false')) - bash: | set -e @@ -83,7 +87,7 @@ jobs: echo_run sudo apt-fast install --no-install-recommends -yq \ libcurl4-openssl-dev libgc-dev libsdl1.2-dev libsfml-dev valgrind libc6-dbg displayName: 'Install dependencies (amd64 Linux)' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64')) + condition: and(succeeded(), eq(variables['skipci'], 'false'), eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'amd64')) - bash: | set -e @@ -123,11 +127,11 @@ jobs: echo_run chmod 755 bin/g++ displayName: 'Install dependencies (i386 Linux)' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386')) + condition: and(succeeded(), eq(variables['skipci'], 'false'), eq(variables['Agent.OS'], 'Linux'), eq(variables['CPU'], 'i386')) - bash: brew install boehmgc make sfml displayName: 'Install dependencies (OSX)' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin')) + condition: and(succeeded(), eq(variables['skipci'], 'false'), eq(variables['Agent.OS'], 'Darwin')) - bash: | set -e @@ -140,9 +144,10 @@ jobs: echo_run echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/dist/mingw64/bin' displayName: 'Install dependencies (Windows)' - condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + condition: and(succeeded(), eq(variables['skipci'], 'false'), eq(variables['Agent.OS'], 'Windows_NT')) - bash: echo '##vso[task.prependpath]$(System.DefaultWorkingDirectory)/bin' + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'Add build binaries to PATH' - bash: | @@ -155,15 +160,18 @@ jobs: echo_run node -v echo_run echo '##[section]make version' echo_run make -v + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'System information' - bash: echo '##vso[task.setvariable variable=csources_version]'"$(git -C csources rev-parse HEAD)" + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'Get csources version' - task: Cache@2 inputs: key: 'csources | "$(Agent.OS)" | $(CPU) | $(csources_version)' path: csources/bin + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'Restore built csources' - bash: | @@ -192,13 +200,16 @@ jobs: fi echo_run cp csources/bin/nim$ext bin + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'Build 1-stage compiler from csources' - bash: nim c koch + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'Build koch' # set result to omit the "bash exited with error code '1'" message - bash: ./koch runCI || echo '##vso[task.complete result=Failed]' + condition: and(succeeded(), eq(variables['skipci'], 'false')) displayName: 'Run CI' env: SYSTEM_ACCESSTOKEN: $(System.AccessToken) |