From b15e02d0f4cb4edbe1f1173092ebd2d9c32eb9cf Mon Sep 17 00:00:00 2001 From: Marc-Antoine Ruel Date: Mon, 26 Feb 2024 10:26:00 -0500 Subject: [PATCH] Add .cirun.yml to declare the OS configurations we want to use. --- .cirun.yml | 21 ++++++++++++ .github/workflows/SwiftGen.yml | 2 +- .github/workflows/SwiftLint.yml | 2 +- .github/workflows/swift-toolchain.yml | 46 +++++++++++++++++++++++++-- 4 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 .cirun.yml diff --git a/.cirun.yml b/.cirun.yml new file mode 100644 index 000000000..5a5646a53 --- /dev/null +++ b/.cirun.yml @@ -0,0 +1,21 @@ +runners: + - name: win11pro-23h2-x64-16 + cloud: azure + instance_type: Standard_F16s_v2 + machine_image: "/subscriptions/fe7bef8e-1cf6-4ac1-9385-be50a1504961/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2024.04.11" + labels: + - cirun-win11pro-23h2-x64-16-2024-04-11 + extra_config: + runner_path: "D:\\r" + runner_user: runner + run_as: interactive + - name: win11pro-23h2-x64-64 + cloud: azure + instance_type: Standard_F64s_v2 + machine_image: "/subscriptions/fe7bef8e-1cf6-4ac1-9385-be50a1504961/resourceGroups/Win-CI/providers/Microsoft.Compute/galleries/base_images/images/win11-23h2-pro-x64/versions/2024.04.11" + labels: + - cirun-win11pro-23h2-x64-64-2024-04-11 + extra_config: + runner_path: "D:\\r" + runner_user: runner + run_as: interactive diff --git a/.github/workflows/SwiftGen.yml b/.github/workflows/SwiftGen.yml index 16b291aaa..f9c4fa251 100644 --- a/.github/workflows/SwiftGen.yml +++ b/.github/workflows/SwiftGen.yml @@ -11,7 +11,7 @@ on: jobs: windows: - runs-on: windows-latest + runs-on: "${{ vars.USE_WINDOWS_GHA_RUNNER == 'true' && 'windows-latest' || format('cirun-win11pro-23h2-x64-16-2024-04-11--{0}', github.run_id) }}" strategy: matrix: diff --git a/.github/workflows/SwiftLint.yml b/.github/workflows/SwiftLint.yml index a9ccb9e79..d41c4b762 100644 --- a/.github/workflows/SwiftLint.yml +++ b/.github/workflows/SwiftLint.yml @@ -5,7 +5,7 @@ on: jobs: windows: - runs-on: windows-latest + runs-on: "${{ vars.USE_WINDOWS_GHA_RUNNER == 'true' && 'windows-latest' || format('cirun-win11pro-23h2-x64-16-2024-04-11--{0}', github.run_id) }}" strategy: matrix: diff --git a/.github/workflows/swift-toolchain.yml b/.github/workflows/swift-toolchain.yml index 3c4dbcd18..a868b47f9 100644 --- a/.github/workflows/swift-toolchain.yml +++ b/.github/workflows/swift-toolchain.yml @@ -54,6 +54,7 @@ on: required: true PASSPHRASE: required: true + pull_request: env: SCCACHE_DIRECT: yes @@ -197,8 +198,13 @@ jobs: fi fi - echo windows_build_runner=${{ vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} - echo compilers_build_runner=${{ vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} + if [[ "${{vars.USE_WINDOWS_GHA_RUNNER}}" == "false" ]]; then + echo windows_build_runner=cirun-win11pro-23h2-x64-64-2024-04-11--${{github.run_id}} >> ${GITHUB_OUTPUT} + echo compilers_build_runner=cirun-win11pro-23h2-x64-16-2024-04-11--${{github.run_id}} >> ${GITHUB_OUTPUT} + else + echo windows_build_runner=${{ vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} + echo compilers_build_runner=${{ vars.COMPILERS_BUILD_RUNNER || vars.WINDOWS_BUILD_RUNNER || 'windows-latest' }} >> ${GITHUB_OUTPUT} + fi - uses: actions/upload-artifact@v4 with: @@ -236,6 +242,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: ${{ matrix.arch }} + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -297,6 +307,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: amd64 + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -383,6 +397,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: ${{ matrix.arch }} + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -442,6 +460,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: ${{ matrix.arch }} + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -501,6 +523,10 @@ jobs: - uses: compnerd/gha-setup-vsdevenv@main + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -671,6 +697,10 @@ jobs: release-asset-name: installer-amd64.exe release-tag-name: '20231016.0' + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -845,6 +875,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: ${{ matrix.arch }} + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -907,6 +941,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: ${{ matrix.arch }} + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: @@ -1041,6 +1079,10 @@ jobs: components: 'Microsoft.VisualStudio.Component.VC.Tools.x86.x64;Microsoft.VisualStudio.Component.VC.Tools.ARM64' arch: ${{ matrix.arch }} + - name: Fix things (maruel temporary) + run: | + echo c:\\users\\runner\\.cargo\\bin >> $GITHUB_PATH + - name: Setup sccache uses: compnerd/ccache-action@sccache-0.7.4 with: