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 }}" 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..e5f157881c 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' && matrix.version != 'nightly-latest' + run: sudo xcode-select -s "/Applications/Xcode_16.app" + - uses: ./../action/init id: init with: @@ -101,11 +106,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..8fdb34724f 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -67,14 +67,15 @@ jobs: with: go-version: ${{ inputs.go-version || '>=1.21.0' }} cache: false + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' && matrix.version != 'nightly-latest' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init 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..4756c02da9 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' && matrix.version != 'nightly-latest' + run: sudo xcode-select -s "/Applications/Xcode_16.app" + - uses: ./../action/init id: init with: @@ -10,11 +15,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..dc504a8651 100644 --- a/pr-checks/checks/swift-custom-build.yml +++ b/pr-checks/checks/swift-custom-build.yml @@ -6,14 +6,15 @@ installGo: "true" env: DOTNET_GENERATE_ASPNET_CERTIFICATE: "false" steps: + - name: Use Xcode 16 + shell: bash + if: runner.os == 'macOS' && matrix.version != 'nightly-latest' + run: sudo xcode-select -s "/Applications/Xcode_16.app" - uses: ./../action/init id: init 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