From e9afb345896740b8a49154903985d55e5d39d6a2 Mon Sep 17 00:00:00 2001 From: kendal Date: Fri, 14 Jun 2024 16:35:05 -0700 Subject: [PATCH] Split GitHub and Cirun calls into separate workflows --- .../pull-request-swift-toolchain-cirun.yml | 24 ++++++++ .../pull-request-swift-toolchain-github.yml | 24 ++++++++ .../pull-request-swift-toolchain.yml | 61 ------------------- .../workflows/schedule-swift-toolchain.yml | 2 +- .github/workflows/swift-toolchain.yml | 5 +- 5 files changed, 51 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/pull-request-swift-toolchain-cirun.yml create mode 100644 .github/workflows/pull-request-swift-toolchain-github.yml delete mode 100644 .github/workflows/pull-request-swift-toolchain.yml diff --git a/.github/workflows/pull-request-swift-toolchain-cirun.yml b/.github/workflows/pull-request-swift-toolchain-cirun.yml new file mode 100644 index 00000000..660da3d8 --- /dev/null +++ b/.github/workflows/pull-request-swift-toolchain-cirun.yml @@ -0,0 +1,24 @@ +name: Pull Request - Development Snapshot (Cirun) + +on: + pull_request: + branches: + - 'main' + files: + - '.github/workflows/swift-toolchain.yml' + + workflow_dispatch: + +jobs: + call_development_snapshot: + name: Development Snapshot + uses: ./.github/workflows/swift-toolchain.yml + with: + publish_artifacts: false + default_runner: "cirun-win11-23h2-pro-x64-16-2024-05-17" + compilers_runner: "cirun-win11-23h2-pro-x64-64-2024-05-17" + secrets: inherit + permissions: + contents: read + pull-requests: read + diff --git a/.github/workflows/pull-request-swift-toolchain-github.yml b/.github/workflows/pull-request-swift-toolchain-github.yml new file mode 100644 index 00000000..d4e43f44 --- /dev/null +++ b/.github/workflows/pull-request-swift-toolchain-github.yml @@ -0,0 +1,24 @@ +name: Pull Request - Development Snapshot (GitHub) + +on: + pull_request: + branches: + - 'main' + files: + - '.github/workflows/swift-toolchain.yml' + + workflow_dispatch: + +jobs: + call_development_snapshot: + name: Development Snapshot + uses: ./.github/workflows/swift-toolchain.yml + with: + publish_artifacts: false + default_runner: "swift-build-windows-latest-8-cores" + compilers_runner: "swift-build-windows-latest-64-cores" + secrets: inherit + permissions: + contents: read + pull-requests: read + diff --git a/.github/workflows/pull-request-swift-toolchain.yml b/.github/workflows/pull-request-swift-toolchain.yml deleted file mode 100644 index b03a7490..00000000 --- a/.github/workflows/pull-request-swift-toolchain.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: Pull Request - Development Snapshot - -on: - pull_request: - branches: - - 'main' - files: - - '.github/workflows/swift-toolchain.yml' - - workflow_dispatch: - -jobs: - context: - name: Generate build context - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.context.outputs.matrix }} - steps: - - id: context - run: | - matrix=$(cat <> ${GITHUB_OUTPUT} - - call_development_snapshot: - name: Development Snapshot (${{ matrix.name }}) - needs: [ context ] - uses: ./.github/workflows/swift-toolchain.yml - strategy: - matrix: ${{ fromJson(needs.context.outputs.matrix) }} - with: - dry_run: true - default_runner: ${{ matrix.default_runner }} - compilers_runner: ${{ matrix.compilers_runner }} - secrets: inherit - permissions: - contents: read - pull-requests: read - diff --git a/.github/workflows/schedule-swift-toolchain.yml b/.github/workflows/schedule-swift-toolchain.yml index 0919985d..72aa0987 100644 --- a/.github/workflows/schedule-swift-toolchain.yml +++ b/.github/workflows/schedule-swift-toolchain.yml @@ -9,7 +9,7 @@ jobs: name: Development Snapshot uses: ./.github/workflows/swift-toolchain.yml with: - dry_run: false + publish_artifacts: true default_runner: ${{ vars.USE_CIRUN && 'cirun-win11-23h2-pro-arm64-16-2024-05-17' || 'swift-build-windows-latest-8-cores' }} compilers_runner: ${{ vars.USE_CIRUN && 'cirun-win11-23h2-pro-arm64-64-2024-05-17' || 'swift-build-windows-latest-64-cores' }} secrets: inherit diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index 02b9a61e..9c31fb72 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -36,7 +36,7 @@ on: type: string compilers_runner: - description: 'The runner to use for building the compilers in this worflow. If unset, uses default_runner' + description: 'The runner to use for building the compilers in this workflow. If unset, uses default_runner' type: string required: false @@ -81,7 +81,7 @@ on: type: string compilers_runner: - description: 'The runner to use for building the compilers in this worflow. If unset, uses default_runner' + description: 'The runner to use for building the compilers in this workflow. If unset, uses default_runner' type: string required: false @@ -249,7 +249,6 @@ jobs: echo compilers_build_runner=${{ inputs.compilers_runner || inputs.default_runner }} >> ${GITHUB_OUTPUT} - uses: actions/upload-artifact@v4 - if: inputs.dry_run != true with: name: stable.xml path: stable.xml