Remove step YAML anchor and env.SKIP_JOB
This commit is contained in:
parent
246ee53637
commit
4942a35f24
28
.github/workflows/ci.yml
vendored
28
.github/workflows/ci.yml
vendored
@ -88,79 +88,57 @@ jobs:
|
|||||||
run: "echo \"[CI_PR_NUMBER=$num]\""
|
run: "echo \"[CI_PR_NUMBER=$num]\""
|
||||||
env:
|
env:
|
||||||
num: "${{ github.event.number }}"
|
num: "${{ github.event.number }}"
|
||||||
if: "success() && !env.SKIP_JOB && github.event_name == 'pull_request'"
|
if: "success() && github.event_name == 'pull_request'"
|
||||||
- name: add extra environment variables
|
- name: add extra environment variables
|
||||||
run: src/ci/scripts/setup-environment.sh
|
run: src/ci/scripts/setup-environment.sh
|
||||||
env:
|
env:
|
||||||
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
|
EXTRA_VARIABLES: "${{ toJson(matrix.env) }}"
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: ensure the channel matches the target branch
|
- name: ensure the channel matches the target branch
|
||||||
run: src/ci/scripts/verify-channel.sh
|
run: src/ci/scripts/verify-channel.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: collect CPU statistics
|
- name: collect CPU statistics
|
||||||
run: src/ci/scripts/collect-cpu-stats.sh
|
run: src/ci/scripts/collect-cpu-stats.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: show the current environment
|
- name: show the current environment
|
||||||
run: src/ci/scripts/dump-environment.sh
|
run: src/ci/scripts/dump-environment.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install awscli
|
- name: install awscli
|
||||||
run: src/ci/scripts/install-awscli.sh
|
run: src/ci/scripts/install-awscli.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install sccache
|
- name: install sccache
|
||||||
run: src/ci/scripts/install-sccache.sh
|
run: src/ci/scripts/install-sccache.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: select Xcode
|
- name: select Xcode
|
||||||
run: src/ci/scripts/select-xcode.sh
|
run: src/ci/scripts/select-xcode.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install clang
|
- name: install clang
|
||||||
run: src/ci/scripts/install-clang.sh
|
run: src/ci/scripts/install-clang.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install tidy
|
- name: install tidy
|
||||||
run: src/ci/scripts/install-tidy.sh
|
run: src/ci/scripts/install-tidy.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install WIX
|
- name: install WIX
|
||||||
run: src/ci/scripts/install-wix.sh
|
run: src/ci/scripts/install-wix.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: disable git crlf conversion
|
- name: disable git crlf conversion
|
||||||
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: checkout submodules
|
- name: checkout submodules
|
||||||
run: src/ci/scripts/checkout-submodules.sh
|
run: src/ci/scripts/checkout-submodules.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install MSYS2
|
- name: install MSYS2
|
||||||
run: src/ci/scripts/install-msys2.sh
|
run: src/ci/scripts/install-msys2.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install MinGW
|
- name: install MinGW
|
||||||
run: src/ci/scripts/install-mingw.sh
|
run: src/ci/scripts/install-mingw.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: install ninja
|
- name: install ninja
|
||||||
run: src/ci/scripts/install-ninja.sh
|
run: src/ci/scripts/install-ninja.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: enable ipv6 on Docker
|
- name: enable ipv6 on Docker
|
||||||
run: src/ci/scripts/enable-docker-ipv6.sh
|
run: src/ci/scripts/enable-docker-ipv6.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: disable git crlf conversion
|
- name: disable git crlf conversion
|
||||||
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: ensure line endings are correct
|
- name: ensure line endings are correct
|
||||||
run: src/ci/scripts/verify-line-endings.sh
|
run: src/ci/scripts/verify-line-endings.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: ensure backported commits are in upstream branches
|
- name: ensure backported commits are in upstream branches
|
||||||
run: src/ci/scripts/verify-backported-commits.sh
|
run: src/ci/scripts/verify-backported-commits.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: ensure the stable version number is correct
|
- name: ensure the stable version number is correct
|
||||||
run: src/ci/scripts/verify-stable-version-number.sh
|
run: src/ci/scripts/verify-stable-version-number.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: run the build
|
- name: run the build
|
||||||
run: src/ci/scripts/run-build-from-ci.sh 2>&1
|
run: src/ci/scripts/run-build-from-ci.sh 2>&1
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
|
AWS_ACCESS_KEY_ID: "${{ env.CACHES_AWS_ACCESS_KEY_ID }}"
|
||||||
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
|
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}"
|
||||||
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
|
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: create github artifacts
|
- name: create github artifacts
|
||||||
run: src/ci/scripts/create-doc-artifacts.sh
|
run: src/ci/scripts/create-doc-artifacts.sh
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: upload artifacts to github
|
- name: upload artifacts to github
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
@ -168,13 +146,12 @@ jobs:
|
|||||||
path: obj/artifacts/doc
|
path: obj/artifacts/doc
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
- name: upload artifacts to S3
|
- name: upload artifacts to S3
|
||||||
run: src/ci/scripts/upload-artifacts.sh
|
run: src/ci/scripts/upload-artifacts.sh
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
|
AWS_ACCESS_KEY_ID: "${{ env.ARTIFACTS_AWS_ACCESS_KEY_ID }}"
|
||||||
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
|
AWS_SECRET_ACCESS_KEY: "${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.ARTIFACTS_AWS_ACCESS_KEY_ID)] }}"
|
||||||
if: "success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
|
if: "success() && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')"
|
||||||
master:
|
master:
|
||||||
name: master
|
name: master
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -199,7 +176,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
|
TOOLSTATE_REPO_ACCESS_TOKEN: "${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}"
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
try-success:
|
try-success:
|
||||||
needs:
|
needs:
|
||||||
- job
|
- job
|
||||||
|
@ -107,9 +107,6 @@ x--expand-yaml-anchors--remove:
|
|||||||
- &job-aarch64-linux
|
- &job-aarch64-linux
|
||||||
os: [self-hosted, ARM64, linux]
|
os: [self-hosted, ARM64, linux]
|
||||||
|
|
||||||
- &step
|
|
||||||
if: success() && !env.SKIP_JOB
|
|
||||||
|
|
||||||
- &base-ci-job
|
- &base-ci-job
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@ -151,7 +148,7 @@ x--expand-yaml-anchors--remove:
|
|||||||
run: echo "[CI_PR_NUMBER=$num]"
|
run: echo "[CI_PR_NUMBER=$num]"
|
||||||
env:
|
env:
|
||||||
num: ${{ github.event.number }}
|
num: ${{ github.event.number }}
|
||||||
if: success() && !env.SKIP_JOB && github.event_name == 'pull_request'
|
if: success() && github.event_name == 'pull_request'
|
||||||
|
|
||||||
- name: add extra environment variables
|
- name: add extra environment variables
|
||||||
run: src/ci/scripts/setup-environment.sh
|
run: src/ci/scripts/setup-environment.sh
|
||||||
@ -161,67 +158,51 @@ x--expand-yaml-anchors--remove:
|
|||||||
# are passed to the `setup-environment.sh` script encoded in JSON,
|
# are passed to the `setup-environment.sh` script encoded in JSON,
|
||||||
# which then uses log commands to actually set them.
|
# which then uses log commands to actually set them.
|
||||||
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
|
EXTRA_VARIABLES: ${{ toJson(matrix.env) }}
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: ensure the channel matches the target branch
|
- name: ensure the channel matches the target branch
|
||||||
run: src/ci/scripts/verify-channel.sh
|
run: src/ci/scripts/verify-channel.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: collect CPU statistics
|
- name: collect CPU statistics
|
||||||
run: src/ci/scripts/collect-cpu-stats.sh
|
run: src/ci/scripts/collect-cpu-stats.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: show the current environment
|
- name: show the current environment
|
||||||
run: src/ci/scripts/dump-environment.sh
|
run: src/ci/scripts/dump-environment.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install awscli
|
- name: install awscli
|
||||||
run: src/ci/scripts/install-awscli.sh
|
run: src/ci/scripts/install-awscli.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install sccache
|
- name: install sccache
|
||||||
run: src/ci/scripts/install-sccache.sh
|
run: src/ci/scripts/install-sccache.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: select Xcode
|
- name: select Xcode
|
||||||
run: src/ci/scripts/select-xcode.sh
|
run: src/ci/scripts/select-xcode.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install clang
|
- name: install clang
|
||||||
run: src/ci/scripts/install-clang.sh
|
run: src/ci/scripts/install-clang.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install tidy
|
- name: install tidy
|
||||||
run: src/ci/scripts/install-tidy.sh
|
run: src/ci/scripts/install-tidy.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install WIX
|
- name: install WIX
|
||||||
run: src/ci/scripts/install-wix.sh
|
run: src/ci/scripts/install-wix.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: disable git crlf conversion
|
- name: disable git crlf conversion
|
||||||
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: checkout submodules
|
- name: checkout submodules
|
||||||
run: src/ci/scripts/checkout-submodules.sh
|
run: src/ci/scripts/checkout-submodules.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install MSYS2
|
- name: install MSYS2
|
||||||
run: src/ci/scripts/install-msys2.sh
|
run: src/ci/scripts/install-msys2.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install MinGW
|
- name: install MinGW
|
||||||
run: src/ci/scripts/install-mingw.sh
|
run: src/ci/scripts/install-mingw.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: install ninja
|
- name: install ninja
|
||||||
run: src/ci/scripts/install-ninja.sh
|
run: src/ci/scripts/install-ninja.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: enable ipv6 on Docker
|
- name: enable ipv6 on Docker
|
||||||
run: src/ci/scripts/enable-docker-ipv6.sh
|
run: src/ci/scripts/enable-docker-ipv6.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
# Disable automatic line ending conversion (again). On Windows, when we're
|
# Disable automatic line ending conversion (again). On Windows, when we're
|
||||||
# installing dependencies, something switches the git configuration directory or
|
# installing dependencies, something switches the git configuration directory or
|
||||||
@ -230,19 +211,15 @@ x--expand-yaml-anchors--remove:
|
|||||||
# appropriate line endings.
|
# appropriate line endings.
|
||||||
- name: disable git crlf conversion
|
- name: disable git crlf conversion
|
||||||
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
run: src/ci/scripts/disable-git-crlf-conversion.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: ensure line endings are correct
|
- name: ensure line endings are correct
|
||||||
run: src/ci/scripts/verify-line-endings.sh
|
run: src/ci/scripts/verify-line-endings.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: ensure backported commits are in upstream branches
|
- name: ensure backported commits are in upstream branches
|
||||||
run: src/ci/scripts/verify-backported-commits.sh
|
run: src/ci/scripts/verify-backported-commits.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: ensure the stable version number is correct
|
- name: ensure the stable version number is correct
|
||||||
run: src/ci/scripts/verify-stable-version-number.sh
|
run: src/ci/scripts/verify-stable-version-number.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: run the build
|
- name: run the build
|
||||||
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
|
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
|
||||||
@ -251,11 +228,9 @@ x--expand-yaml-anchors--remove:
|
|||||||
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ env.CACHES_AWS_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets[format('AWS_SECRET_ACCESS_KEY_{0}', env.CACHES_AWS_ACCESS_KEY_ID)] }}
|
||||||
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
|
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: create github artifacts
|
- name: create github artifacts
|
||||||
run: src/ci/scripts/create-doc-artifacts.sh
|
run: src/ci/scripts/create-doc-artifacts.sh
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: upload artifacts to github
|
- name: upload artifacts to github
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@ -265,7 +240,6 @@ x--expand-yaml-anchors--remove:
|
|||||||
path: obj/artifacts/doc
|
path: obj/artifacts/doc
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
retention-days: 5
|
retention-days: 5
|
||||||
<<: *step
|
|
||||||
|
|
||||||
- name: upload artifacts to S3
|
- name: upload artifacts to S3
|
||||||
run: src/ci/scripts/upload-artifacts.sh
|
run: src/ci/scripts/upload-artifacts.sh
|
||||||
@ -277,8 +251,7 @@ x--expand-yaml-anchors--remove:
|
|||||||
# adding the condition is helpful as this way CI will not silently skip
|
# adding the condition is helpful as this way CI will not silently skip
|
||||||
# deploying artifacts from a dist builder if the variables are misconfigured,
|
# deploying artifacts from a dist builder if the variables are misconfigured,
|
||||||
# erroring about invalid credentials instead.
|
# erroring about invalid credentials instead.
|
||||||
if: success() && !env.SKIP_JOB && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
|
if: success() && (github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1')
|
||||||
<<: *step
|
|
||||||
|
|
||||||
# These snippets are used by the try-success, try-failure, auto-success and auto-failure jobs.
|
# These snippets are used by the try-success, try-failure, auto-success and auto-failure jobs.
|
||||||
# Check out their documentation for more information on why they're needed.
|
# Check out their documentation for more information on why they're needed.
|
||||||
@ -395,7 +368,6 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
|
TOOLSTATE_REPO_ACCESS_TOKEN: ${{ secrets.TOOLSTATE_REPO_ACCESS_TOKEN }}
|
||||||
<<: *step
|
|
||||||
|
|
||||||
# These jobs don't actually test anything, but they're used to tell bors the
|
# These jobs don't actually test anything, but they're used to tell bors the
|
||||||
# build completed, as there is no practical way to detect when a workflow is
|
# build completed, as there is no practical way to detect when a workflow is
|
||||||
|
Loading…
Reference in New Issue
Block a user