From 84f0ea85f6074ee270ef7ac8f509a97cad26989e Mon Sep 17 00:00:00 2001 From: Paul Schmiedmayer Date: Fri, 17 Jan 2025 14:34:50 -0800 Subject: [PATCH] Fix CodeQL Execution on GitHub Hosted Runners (#94) # Fix CodeQL Execution on GitHub Hosted Runners ## :recycle: Current situation & Problem - CodeQL is failing on GitHub hosted runners: https://github.com/github/codeql-action/issues/2506#issuecomment-2594033147 ## :gear: Release Notes - Fix CodeQL Execution on GitHub Hosted Runners ### Code of Conduct & Contributing Guidelines By submitting creating this pull request, you agree to follow our [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md): - [x] I agree to follow the [Code of Conduct](https://github.com/StanfordBDHG/.github/blob/main/CODE_OF_CONDUCT.md) and [Contributing Guidelines](https://github.com/StanfordBDHG/.github/blob/main/CONTRIBUTING.md). Signed-off-by: Paul Schmiedmayer --- .github/workflows/xcodebuild-or-fastlane.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/xcodebuild-or-fastlane.yml b/.github/workflows/xcodebuild-or-fastlane.yml index bdbc9cf..fc729b4 100644 --- a/.github/workflows/xcodebuild-or-fastlane.yml +++ b/.github/workflows/xcodebuild-or-fastlane.yml @@ -310,6 +310,14 @@ jobs: with: languages: swift db-location: '${{ inputs.path }}/.codeql' + - name: Mechanism to resolve CodeQL issue https://github.com/github/codeql-action/issues/2506#issuecomment-2594033147 + if: ${{ !env.selfhosted && inputs.codeql }} + run: | + XCODE_PATH=$(xcode-select -p) + mkdir -p $XCODE_PATH/Toolchains/XcodeDefault.xctoolchain/usr/lib + cp $XCODE_PATH/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/*.dylib $XCODE_PATH/Toolchains/XcodeDefault.xctoolchain/usr/lib + sudo mkdir -p /usr/local/lib + sudo cp $XCODE_PATH/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/host/*.dylib /usr/local/lib - name: Disable Password Autofill in the iOS Simulator (Deprecated) if: ${{ inputs.setupSimulators && inputs.destination != '' }} run: |