mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-08 22:33:26 +01:00
- CI: serialize on whole workflow instead of individual jobs
This commit is contained in:
26
.github/workflows/reusable-sidestore-build.yml
vendored
26
.github/workflows/reusable-sidestore-build.yml
vendored
@@ -44,43 +44,49 @@ on:
|
|||||||
BUILD_LOG_ZIP_PASSWORD:
|
BUILD_LOG_ZIP_PASSWORD:
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
|
|
||||||
|
# since build cache, test-build cache, test-run cache are involved, out of order exec if serialization is on individual jobs will wreak all sorts of havoc
|
||||||
|
# so we serialize on the entire workflow
|
||||||
|
concurrency:
|
||||||
|
group: serialize-workflow
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
serialize:
|
shared:
|
||||||
uses: ./.github/workflows/sidestore-serialize.yml
|
uses: ./.github/workflows/sidestore-shared.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build:
|
build:
|
||||||
needs: serialize
|
needs: shared
|
||||||
uses: ./.github/workflows/sidestore-build.yml
|
uses: ./.github/workflows/sidestore-build.yml
|
||||||
with:
|
with:
|
||||||
is_beta: ${{ inputs.is_beta }}
|
is_beta: ${{ inputs.is_beta }}
|
||||||
is_shared_build_num: ${{ inputs.is_shared_build_num }}
|
is_shared_build_num: ${{ inputs.is_shared_build_num }}
|
||||||
release_tag: ${{ inputs.release_tag }}
|
release_tag: ${{ inputs.release_tag }}
|
||||||
short_commit: ${{ needs.serialize.outputs.short-commit }}
|
short_commit: ${{ needs.shared.outputs.short-commit }}
|
||||||
bundle_id: ${{ inputs.bundle_id }}
|
bundle_id: ${{ inputs.bundle_id }}
|
||||||
bundle_id_suffix: ${{ inputs.bundle_id_suffix }}
|
bundle_id_suffix: ${{ inputs.bundle_id_suffix }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
tests-build:
|
tests-build:
|
||||||
if: ${{ vars.ENABLE_TESTS == '1' && vars.ENABLE_TESTS_BUILD == '1' }}
|
if: ${{ vars.ENABLE_TESTS == '1' && vars.ENABLE_TESTS_BUILD == '1' }}
|
||||||
needs: serialize
|
needs: shared
|
||||||
uses: ./.github/workflows/sidestore-tests-build.yml
|
uses: ./.github/workflows/sidestore-tests-build.yml
|
||||||
with:
|
with:
|
||||||
release_tag: ${{ inputs.release_tag }}
|
release_tag: ${{ inputs.release_tag }}
|
||||||
short_commit: ${{ needs.serialize.outputs.short-commit }}
|
short_commit: ${{ needs.shared.outputs.short-commit }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
tests-run:
|
tests-run:
|
||||||
if: ${{ vars.ENABLE_TESTS == '1' && vars.ENABLE_TESTS_RUN == '1' }}
|
if: ${{ vars.ENABLE_TESTS == '1' && vars.ENABLE_TESTS_RUN == '1' }}
|
||||||
needs: [serialize, tests-build]
|
needs: [shared, tests-build]
|
||||||
uses: ./.github/workflows/sidestore-tests-run.yml
|
uses: ./.github/workflows/sidestore-tests-run.yml
|
||||||
with:
|
with:
|
||||||
release_tag: ${{ inputs.release_tag }}
|
release_tag: ${{ inputs.release_tag }}
|
||||||
short_commit: ${{ needs.serialize.outputs.short-commit }}
|
short_commit: ${{ needs.shared.outputs.short-commit }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
needs: [serialize, build, tests-build, tests-run] # Keep tests-run in needs
|
needs: [shared, build, tests-build, tests-run] # Keep tests-run in needs
|
||||||
if: ${{ always() && (needs.tests-run.result == 'skipped' || needs.tests-run.result == 'success') }}
|
if: ${{ always() && (needs.tests-run.result == 'skipped' || needs.tests-run.result == 'success') }}
|
||||||
uses: ./.github/workflows/sidestore-deploy.yml
|
uses: ./.github/workflows/sidestore-deploy.yml
|
||||||
with:
|
with:
|
||||||
@@ -91,7 +97,7 @@ jobs:
|
|||||||
upstream_tag: ${{ inputs.upstream_tag }}
|
upstream_tag: ${{ inputs.upstream_tag }}
|
||||||
upstream_name: ${{ inputs.upstream_name }}
|
upstream_name: ${{ inputs.upstream_name }}
|
||||||
version: ${{ needs.build.outputs.version }}
|
version: ${{ needs.build.outputs.version }}
|
||||||
short_commit: ${{ needs.serialize.outputs.short-commit }}
|
short_commit: ${{ needs.shared.outputs.short-commit }}
|
||||||
release_channel: ${{ needs.build.outputs.release-channel }}
|
release_channel: ${{ needs.build.outputs.release-channel }}
|
||||||
marketing_version: ${{ needs.build.outputs.marketing-version }}
|
marketing_version: ${{ needs.build.outputs.marketing-version }}
|
||||||
bundle_id: ${{ inputs.bundle_id }}
|
bundle_id: ${{ inputs.bundle_id }}
|
||||||
|
|||||||
@@ -1,23 +1,18 @@
|
|||||||
name: SideStore Serialize
|
name: SideStore Shared
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
outputs:
|
outputs:
|
||||||
short-commit:
|
short-commit:
|
||||||
value: ${{ jobs.serialize.outputs.short-commit }}
|
value: ${{ jobs.shared.outputs.short-commit }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
serialize:
|
shared:
|
||||||
name: Wait for other jobs
|
name: Shared Steps
|
||||||
# since build cache, test-build cache, test-run cache are involved, out of order exec if serialization is on individual jobs will wreak all sorts of havoc
|
|
||||||
# so we serialize on the entire workflow
|
|
||||||
concurrency:
|
|
||||||
group: serialize-workflow
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
runs-on: 'macos-15'
|
runs-on: 'macos-15'
|
||||||
steps:
|
steps:
|
||||||
- run: echo "No other contending jobs are running now..."
|
|
||||||
- name: Set short commit hash
|
- name: Set short commit hash
|
||||||
id: commit-id
|
id: commit-id
|
||||||
run: |
|
run: |
|
||||||
Reference in New Issue
Block a user