From 5896c12c39418cd7ae6339c4f9121b3642d0dc5d Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 28 Aug 2025 13:56:38 +0100 Subject: [PATCH 1/4] Remove `setup-swift` steps --- .github/workflows/__export-file-baseline-information.yml | 4 ---- .github/workflows/__multi-language-autodetect.yml | 5 ----- .github/workflows/__swift-autobuild.yml | 3 --- .github/workflows/__swift-custom-build.yml | 3 --- pr-checks/checks/export-file-baseline-information.yml | 4 ---- pr-checks/checks/multi-language-autodetect.yml | 5 ----- pr-checks/checks/swift-autobuild.yml | 3 --- pr-checks/checks/swift-custom-build.yml | 3 --- 8 files changed, 30 deletions(-) diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 411a0c701b..86c519d5a8 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -72,10 +72,6 @@ jobs: with: languages: javascript tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - if: runner.os == 'macOS' - with: - codeql-path: ${{ steps.init.outputs.codeql-path }} - name: Build code shell: bash run: ./build.sh diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index 5a56f8bdb5..0d5539ae33 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -101,11 +101,6 @@ jobs: || '' }} tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - if: runner.os == 'macOS' - with: - codeql-path: ${{ steps.init.outputs.codeql-path }} - - name: Build code shell: bash run: ./build.sh diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index 7dd3afec2e..82045f1a44 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -54,9 +54,6 @@ jobs: languages: swift build-mode: autobuild tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - with: - codeql-path: ${{steps.init.outputs.codeql-path}} - name: Check working directory shell: bash run: pwd diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index 0d3e927409..c051702e56 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -72,9 +72,6 @@ jobs: with: languages: swift tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - with: - codeql-path: ${{steps.init.outputs.codeql-path}} - name: Check working directory shell: bash run: pwd diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml index 10f7bf752e..731377e949 100644 --- a/pr-checks/checks/export-file-baseline-information.yml +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -10,10 +10,6 @@ steps: with: languages: javascript tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - if: runner.os == 'macOS' - with: - codeql-path: ${{ steps.init.outputs.codeql-path }} - name: Build code shell: bash run: ./build.sh diff --git a/pr-checks/checks/multi-language-autodetect.yml b/pr-checks/checks/multi-language-autodetect.yml index 197c99afbe..d31e51028c 100644 --- a/pr-checks/checks/multi-language-autodetect.yml +++ b/pr-checks/checks/multi-language-autodetect.yml @@ -10,11 +10,6 @@ steps: languages: ${{ runner.os == 'Linux' && 'cpp,csharp,go,java,javascript,python,ruby' || '' }} tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - if: runner.os == 'macOS' - with: - codeql-path: ${{ steps.init.outputs.codeql-path }} - - name: Build code shell: bash run: ./build.sh diff --git a/pr-checks/checks/swift-autobuild.yml b/pr-checks/checks/swift-autobuild.yml index 9e3a39f347..d7575035fc 100644 --- a/pr-checks/checks/swift-autobuild.yml +++ b/pr-checks/checks/swift-autobuild.yml @@ -9,9 +9,6 @@ steps: languages: swift build-mode: autobuild tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - with: - codeql-path: ${{steps.init.outputs.codeql-path}} - name: Check working directory shell: bash run: pwd diff --git a/pr-checks/checks/swift-custom-build.yml b/pr-checks/checks/swift-custom-build.yml index 31c6a55abd..a9e32b78ab 100644 --- a/pr-checks/checks/swift-custom-build.yml +++ b/pr-checks/checks/swift-custom-build.yml @@ -11,9 +11,6 @@ steps: with: languages: swift tools: ${{ steps.prepare-test.outputs.tools-url }} - - uses: ./../action/.github/actions/setup-swift - with: - codeql-path: ${{steps.init.outputs.codeql-path}} - name: Check working directory shell: bash run: pwd From 5dc3d776334a8b6b144cc39cb2261535f0cc3339 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 28 Aug 2025 13:56:56 +0100 Subject: [PATCH 2/4] Remove `setup-swift` action from repo --- .github/actions/setup-swift/action.yml | 39 -------------------------- 1 file changed, 39 deletions(-) delete mode 100644 .github/actions/setup-swift/action.yml diff --git a/.github/actions/setup-swift/action.yml b/.github/actions/setup-swift/action.yml deleted file mode 100644 index 374eb207b8..0000000000 --- a/.github/actions/setup-swift/action.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: "Set up Swift on Linux" -description: Sets up an appropriate Swift version on Linux. -inputs: - codeql-path: - description: Path to the CodeQL CLI executable. - required: true -runs: - using: "composite" - steps: - - name: Get Swift version - id: get_swift_version - if: runner.os == 'Linux' - shell: bash - env: - CODEQL_PATH: ${{ inputs.codeql-path }} - run: | - SWIFT_EXTRACTOR_DIR="$("$CODEQL_PATH" resolve languages --format json | jq -r '.swift[0]')" - if [ $SWIFT_EXTRACTOR_DIR = "null" ]; then - VERSION="null" - else - VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/linux64/extractor" --version | awk '/version/ { print $3 }')" - # Specify 5.x.0, otherwise setup Action will default to latest minor version. - if [ $VERSION = "5.7" ]; then - VERSION="5.7.0" - elif [ $VERSION = "5.8" ]; then - VERSION="5.8.0" - elif [ $VERSION = "5.9" ]; then - VERSION="5.9.0" - # setup-swift does not yet support v5.9.1 Remove this when it does. - elif [ $VERSION = "5.9.1" ]; then - VERSION="5.9.0" - fi - fi - echo "version=$VERSION" | tee -a $GITHUB_OUTPUT - - - uses: redsun82/setup-swift@362f49f31da2f5f4f851657046bdd1290d03edc8 # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test. - if: runner.os == 'Linux' && steps.get_swift_version.outputs.version != 'null' - with: - swift-version: "${{ steps.get_swift_version.outputs.version }}" From caeeaa1fe821494071a103413ef46cf59fa6f50f Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 28 Aug 2025 14:01:23 +0100 Subject: [PATCH 3/4] Select Xcode 16 in workflows that analyse Swift --- .github/workflows/__export-file-baseline-information.yml | 4 ++++ .github/workflows/__multi-language-autodetect.yml | 5 +++++ .github/workflows/__swift-autobuild.yml | 4 ++++ .github/workflows/__swift-custom-build.yml | 4 ++++ pr-checks/checks/export-file-baseline-information.yml | 4 ++++ pr-checks/checks/multi-language-autodetect.yml | 5 +++++ pr-checks/checks/swift-autobuild.yml | 4 ++++ pr-checks/checks/swift-custom-build.yml | 4 ++++ 8 files changed, 34 insertions(+) diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 86c519d5a8..02ae05f453 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -67,6 +67,10 @@ jobs: with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index 0d5539ae33..cc791703fb 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -93,6 +93,11 @@ jobs: with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" + - uses: ./../action/init id: init with: diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index 82045f1a44..4263774e6c 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -48,6 +48,10 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index c051702e56..5bddf47be3 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -67,6 +67,10 @@ jobs: with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml index 731377e949..4130b8e3db 100644 --- a/pr-checks/checks/export-file-baseline-information.yml +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -5,6 +5,10 @@ installGo: "true" env: CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true steps: + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/multi-language-autodetect.yml b/pr-checks/checks/multi-language-autodetect.yml index d31e51028c..546f837148 100644 --- a/pr-checks/checks/multi-language-autodetect.yml +++ b/pr-checks/checks/multi-language-autodetect.yml @@ -3,6 +3,11 @@ description: "An end-to-end integration test of a multi-language repository usin operatingSystems: ["macos", "ubuntu"] installGo: "true" steps: + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" + - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/swift-autobuild.yml b/pr-checks/checks/swift-autobuild.yml index d7575035fc..a86cb2b3c2 100644 --- a/pr-checks/checks/swift-autobuild.yml +++ b/pr-checks/checks/swift-autobuild.yml @@ -3,6 +3,10 @@ description: "Tests creation of a Swift database using autobuild" versions: ["nightly-latest"] operatingSystems: ["macos"] steps: + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/swift-custom-build.yml b/pr-checks/checks/swift-custom-build.yml index a9e32b78ab..76404e811e 100644 --- a/pr-checks/checks/swift-custom-build.yml +++ b/pr-checks/checks/swift-custom-build.yml @@ -6,6 +6,10 @@ installGo: "true" env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: From c0abce94a0f0ccb14abff138099416ba73405541 Mon Sep 17 00:00:00 2001 From: "Michael B. Gale" Date: Thu, 28 Aug 2025 15:13:19 +0100 Subject: [PATCH 4/4] Don't pin Xcode for nightly tests --- .github/workflows/__export-file-baseline-information.yml | 4 ---- .github/workflows/__multi-language-autodetect.yml | 2 +- .github/workflows/__swift-autobuild.yml | 4 ---- .github/workflows/__swift-custom-build.yml | 2 +- pr-checks/checks/export-file-baseline-information.yml | 4 ---- pr-checks/checks/multi-language-autodetect.yml | 2 +- pr-checks/checks/swift-autobuild.yml | 4 ---- pr-checks/checks/swift-custom-build.yml | 2 +- 8 files changed, 4 insertions(+), 20 deletions(-) diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index 02ae05f453..86c519d5a8 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -67,10 +67,6 @@ jobs: with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false - - name: Use Xcode 16 - shell: bash - if: runner.os == 'macOS' - run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index cc791703fb..e5f157881c 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -95,7 +95,7 @@ jobs: cache: false - name: Use Xcode 16 shell: bash - if: runner.os == 'macOS' + if: runner.os == 'macOS' && matrix.version != 'nightly-latest' run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init diff --git a/.github/workflows/__swift-autobuild.yml b/.github/workflows/__swift-autobuild.yml index 4263774e6c..82045f1a44 100644 --- a/.github/workflows/__swift-autobuild.yml +++ b/.github/workflows/__swift-autobuild.yml @@ -48,10 +48,6 @@ jobs: version: ${{ matrix.version }} use-all-platform-bundle: 'false' setup-kotlin: 'true' - - name: Use Xcode 16 - shell: bash - if: runner.os == 'macOS' - run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index 5bddf47be3..8fdb34724f 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -69,7 +69,7 @@ jobs: cache: false - name: Use Xcode 16 shell: bash - if: runner.os == 'macOS' + if: runner.os == 'macOS' && matrix.version != 'nightly-latest' run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init diff --git a/pr-checks/checks/export-file-baseline-information.yml b/pr-checks/checks/export-file-baseline-information.yml index 4130b8e3db..731377e949 100644 --- a/pr-checks/checks/export-file-baseline-information.yml +++ b/pr-checks/checks/export-file-baseline-information.yml @@ -5,10 +5,6 @@ installGo: "true" env: CODEQL_ACTION_SUBLANGUAGE_FILE_COVERAGE: true steps: - - name: Use Xcode 16 - shell: bash - if: runner.os == 'macOS' - run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/multi-language-autodetect.yml b/pr-checks/checks/multi-language-autodetect.yml index 546f837148..4756c02da9 100644 --- a/pr-checks/checks/multi-language-autodetect.yml +++ b/pr-checks/checks/multi-language-autodetect.yml @@ -5,7 +5,7 @@ installGo: "true" steps: - name: Use Xcode 16 shell: bash - if: runner.os == 'macOS' + if: runner.os == 'macOS' && matrix.version != 'nightly-latest' run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init diff --git a/pr-checks/checks/swift-autobuild.yml b/pr-checks/checks/swift-autobuild.yml index a86cb2b3c2..d7575035fc 100644 --- a/pr-checks/checks/swift-autobuild.yml +++ b/pr-checks/checks/swift-autobuild.yml @@ -3,10 +3,6 @@ description: "Tests creation of a Swift database using autobuild" versions: ["nightly-latest"] operatingSystems: ["macos"] steps: - - name: Use Xcode 16 - shell: bash - if: runner.os == 'macOS' - run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init with: diff --git a/pr-checks/checks/swift-custom-build.yml b/pr-checks/checks/swift-custom-build.yml index 76404e811e..dc504a8651 100644 --- a/pr-checks/checks/swift-custom-build.yml +++ b/pr-checks/checks/swift-custom-build.yml @@ -8,7 +8,7 @@ env: steps: - name: Use Xcode 16 shell: bash - if: runner.os == 'macOS' + if: runner.os == 'macOS' && matrix.version != 'nightly-latest' run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init