From 8c923c00a335c8b49eb52df25a45c1d3c3620730 Mon Sep 17 00:00:00 2001 From: Angela P Wen Date: Wed, 24 May 2023 09:59:40 -0700 Subject: [PATCH] Fix Swift PR Checks on `nightly-latest` CLI (#1696) --- .github/actions/setup-swift/action.yml | 21 ++++++++++++------- .github/workflows/__analyze-ref-input.yml | 3 +-- .github/workflows/__autobuild-action.yml | 3 +-- .github/workflows/__config-export.yml | 3 +-- .github/workflows/__diagnostics-export.yml | 3 +-- .../__export-file-baseline-information.yml | 3 +-- .github/workflows/__extractor-ram-threads.yml | 3 +-- .github/workflows/__go-custom-queries.yml | 3 +-- .../workflows/__go-tracing-autobuilder.yml | 3 +-- .../__go-tracing-custom-build-steps.yml | 3 +-- .../__go-tracing-legacy-workflow.yml | 3 +-- .github/workflows/__init-with-registries.yml | 3 +-- .../workflows/__javascript-source-root.yml | 3 +-- .github/workflows/__ml-powered-queries.yml | 3 +-- .../workflows/__multi-language-autodetect.yml | 7 ++++--- ...ackaging-codescanning-config-inputs-js.yml | 3 +-- .../__packaging-config-inputs-js.yml | 3 +-- .github/workflows/__packaging-config-js.yml | 3 +-- .github/workflows/__packaging-inputs-js.yml | 3 +-- .github/workflows/__remote-config.yml | 3 +-- .../workflows/__rubocop-multi-language.yml | 3 +-- .github/workflows/__ruby.yml | 3 +-- .github/workflows/__split-workflow.yml | 3 +-- .github/workflows/__submit-sarif-failure.yml | 3 +-- .github/workflows/__swift-custom-build.yml | 3 +-- .../__test-autobuild-working-dir.yml | 3 +-- .github/workflows/__test-local-codeql.yml | 3 +-- .github/workflows/__test-proxy.yml | 3 +-- .github/workflows/__unset-environment.yml | 3 +-- .github/workflows/__upload-ref-sha-input.yml | 3 +-- .github/workflows/__with-checkout-path.yml | 3 +-- .github/workflows/debug-artifacts.yml | 5 +++++ .../checks/multi-language-autodetect.yml | 4 +++- pr-checks/sync.py | 3 +-- 34 files changed, 55 insertions(+), 72 deletions(-) diff --git a/.github/actions/setup-swift/action.yml b/.github/actions/setup-swift/action.yml index b1092f4b7..d780b329f 100644 --- a/.github/actions/setup-swift/action.yml +++ b/.github/actions/setup-swift/action.yml @@ -1,5 +1,5 @@ name: "Set up Swift" -description: Sets up an appropriate Swift version if Swift is enabled via CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT. +description: Sets up an appropriate Swift version if supported on this platform. inputs: codeql-path: description: Path to the CodeQL CLI executable. @@ -9,24 +9,29 @@ runs: steps: - name: Get Swift version id: get_swift_version - if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' + if: runner.os != 'Windows' shell: bash env: CODEQL_PATH: ${{ inputs.codeql-path }} run: | - if [ $RUNNER_OS = "macOS" ]; then + if [[ $RUNNER_OS = "macOS" ]]; then PLATFORM="osx64" else # We do not run this step on Windows. PLATFORM="linux64" fi SWIFT_EXTRACTOR_DIR="$("$CODEQL_PATH" resolve languages --format json | jq -r '.swift[0]')" - VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/$PLATFORM/extractor" --version | awk '/version/ { print $3 }')" - # Specify 5.7.0, otherwise setup Action will default to latest minor version. - if [ $VERSION = "5.7" ]; then - VERSION="5.7.0" + if [ $SWIFT_EXTRACTOR_DIR = "null" ]; then + VERSION="null" + else + VERSION="$("$SWIFT_EXTRACTOR_DIR/tools/$PLATFORM/extractor" --version | awk '/version/ { print $3 }')" + # Specify 5.7.0, otherwise setup Action will default to latest minor version. + if [ $VERSION = "5.7" ]; then + VERSION="5.7.0" + fi fi echo "version=$VERSION" | tee -a $GITHUB_OUTPUT + - uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf # Please update the corresponding SHA in the CLI's CodeQL Action Integration Test. - if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' + if: runner.os != 'Windows' && steps.get_swift_version.outputs.version != 'null' with: swift-version: "${{ steps.get_swift_version.outputs.version }}" diff --git a/.github/workflows/__analyze-ref-input.yml b/.github/workflows/__analyze-ref-input.yml index eaa431142..e2b6bfdfc 100644 --- a/.github/workflows/__analyze-ref-input.yml +++ b/.github/workflows/__analyze-ref-input.yml @@ -84,8 +84,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__autobuild-action.yml b/.github/workflows/__autobuild-action.yml index 8f9c0c3ab..3edff4fa9 100644 --- a/.github/workflows/__autobuild-action.yml +++ b/.github/workflows/__autobuild-action.yml @@ -48,8 +48,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__config-export.yml b/.github/workflows/__config-export.yml index 4fbc4e51e..e347e452d 100644 --- a/.github/workflows/__config-export.yml +++ b/.github/workflows/__config-export.yml @@ -54,8 +54,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__diagnostics-export.yml b/.github/workflows/__diagnostics-export.yml index 96a6dc12e..798d8912b 100644 --- a/.github/workflows/__diagnostics-export.yml +++ b/.github/workflows/__diagnostics-export.yml @@ -60,8 +60,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__export-file-baseline-information.yml b/.github/workflows/__export-file-baseline-information.yml index e7c11fc1d..9ac18e6c9 100644 --- a/.github/workflows/__export-file-baseline-information.yml +++ b/.github/workflows/__export-file-baseline-information.yml @@ -48,8 +48,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__extractor-ram-threads.yml b/.github/workflows/__extractor-ram-threads.yml index f0f7c4b43..4f9623d27 100644 --- a/.github/workflows/__extractor-ram-threads.yml +++ b/.github/workflows/__extractor-ram-threads.yml @@ -44,8 +44,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__go-custom-queries.yml b/.github/workflows/__go-custom-queries.yml index 983bc759e..bf6644d57 100644 --- a/.github/workflows/__go-custom-queries.yml +++ b/.github/workflows/__go-custom-queries.yml @@ -84,8 +84,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__go-tracing-autobuilder.yml b/.github/workflows/__go-tracing-autobuilder.yml index ebc72a106..f819825cc 100644 --- a/.github/workflows/__go-tracing-autobuilder.yml +++ b/.github/workflows/__go-tracing-autobuilder.yml @@ -70,8 +70,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__go-tracing-custom-build-steps.yml b/.github/workflows/__go-tracing-custom-build-steps.yml index 89d6a1b47..7a0a69e6f 100644 --- a/.github/workflows/__go-tracing-custom-build-steps.yml +++ b/.github/workflows/__go-tracing-custom-build-steps.yml @@ -70,8 +70,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__go-tracing-legacy-workflow.yml b/.github/workflows/__go-tracing-legacy-workflow.yml index f24322b9e..912ebed24 100644 --- a/.github/workflows/__go-tracing-legacy-workflow.yml +++ b/.github/workflows/__go-tracing-legacy-workflow.yml @@ -70,8 +70,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__init-with-registries.yml b/.github/workflows/__init-with-registries.yml index 05fecab7d..7ccd818ec 100644 --- a/.github/workflows/__init-with-registries.yml +++ b/.github/workflows/__init-with-registries.yml @@ -60,8 +60,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__javascript-source-root.yml b/.github/workflows/__javascript-source-root.yml index 20d80c2c8..23d2b3700 100644 --- a/.github/workflows/__javascript-source-root.yml +++ b/.github/workflows/__javascript-source-root.yml @@ -48,8 +48,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__ml-powered-queries.yml b/.github/workflows/__ml-powered-queries.yml index fc11c53bc..728b572f7 100644 --- a/.github/workflows/__ml-powered-queries.yml +++ b/.github/workflows/__ml-powered-queries.yml @@ -84,8 +84,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__multi-language-autodetect.yml b/.github/workflows/__multi-language-autodetect.yml index ea4f00c6e..02f3372fe 100644 --- a/.github/workflows/__multi-language-autodetect.yml +++ b/.github/workflows/__multi-language-autodetect.yml @@ -70,8 +70,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV @@ -139,7 +138,9 @@ jobs: fi - name: Check language autodetect for Swift - if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' + if: >- + env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' || + (runner.os != 'Windows' && matrix.version == 'nightly-latest') shell: bash run: | SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }} diff --git a/.github/workflows/__packaging-codescanning-config-inputs-js.yml b/.github/workflows/__packaging-codescanning-config-inputs-js.yml index adc418ea0..e23ae4505 100644 --- a/.github/workflows/__packaging-codescanning-config-inputs-js.yml +++ b/.github/workflows/__packaging-codescanning-config-inputs-js.yml @@ -60,8 +60,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__packaging-config-inputs-js.yml b/.github/workflows/__packaging-config-inputs-js.yml index 879fecccd..45b08a414 100644 --- a/.github/workflows/__packaging-config-inputs-js.yml +++ b/.github/workflows/__packaging-config-inputs-js.yml @@ -60,8 +60,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__packaging-config-js.yml b/.github/workflows/__packaging-config-js.yml index 18a03452f..0e0b8f3ef 100644 --- a/.github/workflows/__packaging-config-js.yml +++ b/.github/workflows/__packaging-config-js.yml @@ -60,8 +60,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__packaging-inputs-js.yml b/.github/workflows/__packaging-inputs-js.yml index 700a79007..f385b65a9 100644 --- a/.github/workflows/__packaging-inputs-js.yml +++ b/.github/workflows/__packaging-inputs-js.yml @@ -60,8 +60,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__remote-config.yml b/.github/workflows/__remote-config.yml index f0b4dcb1e..132db0725 100644 --- a/.github/workflows/__remote-config.yml +++ b/.github/workflows/__remote-config.yml @@ -84,8 +84,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__rubocop-multi-language.yml b/.github/workflows/__rubocop-multi-language.yml index a5e962629..8c31d4522 100644 --- a/.github/workflows/__rubocop-multi-language.yml +++ b/.github/workflows/__rubocop-multi-language.yml @@ -44,8 +44,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__ruby.yml b/.github/workflows/__ruby.yml index eb768b343..b551aad49 100644 --- a/.github/workflows/__ruby.yml +++ b/.github/workflows/__ruby.yml @@ -54,8 +54,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__split-workflow.yml b/.github/workflows/__split-workflow.yml index 4f2d69a6a..1197b832a 100644 --- a/.github/workflows/__split-workflow.yml +++ b/.github/workflows/__split-workflow.yml @@ -54,8 +54,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__submit-sarif-failure.yml b/.github/workflows/__submit-sarif-failure.yml index 02cd876ea..70b03825b 100644 --- a/.github/workflows/__submit-sarif-failure.yml +++ b/.github/workflows/__submit-sarif-failure.yml @@ -48,8 +48,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__swift-custom-build.yml b/.github/workflows/__swift-custom-build.yml index b309b4abd..b5676623b 100644 --- a/.github/workflows/__swift-custom-build.yml +++ b/.github/workflows/__swift-custom-build.yml @@ -54,8 +54,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__test-autobuild-working-dir.yml b/.github/workflows/__test-autobuild-working-dir.yml index e0b039bac..8c3ef25b2 100644 --- a/.github/workflows/__test-autobuild-working-dir.yml +++ b/.github/workflows/__test-autobuild-working-dir.yml @@ -44,8 +44,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__test-local-codeql.yml b/.github/workflows/__test-local-codeql.yml index 3a5470ed7..427f79a7a 100644 --- a/.github/workflows/__test-local-codeql.yml +++ b/.github/workflows/__test-local-codeql.yml @@ -44,8 +44,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__test-proxy.yml b/.github/workflows/__test-proxy.yml index 8666073be..d5ce77d1c 100644 --- a/.github/workflows/__test-proxy.yml +++ b/.github/workflows/__test-proxy.yml @@ -44,8 +44,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__unset-environment.yml b/.github/workflows/__unset-environment.yml index 54085d2da..48aaae7a8 100644 --- a/.github/workflows/__unset-environment.yml +++ b/.github/workflows/__unset-environment.yml @@ -56,8 +56,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__upload-ref-sha-input.yml b/.github/workflows/__upload-ref-sha-input.yml index ebda50900..7179d84f2 100644 --- a/.github/workflows/__upload-ref-sha-input.yml +++ b/.github/workflows/__upload-ref-sha-input.yml @@ -84,8 +84,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/__with-checkout-path.yml b/.github/workflows/__with-checkout-path.yml index 5be33e0a6..da2ead8bc 100644 --- a/.github/workflows/__with-checkout-path.yml +++ b/.github/workflows/__with-checkout-path.yml @@ -84,8 +84,7 @@ jobs: matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) shell: bash run: echo "CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT=true" >> $GITHUB_ENV diff --git a/.github/workflows/debug-artifacts.yml b/.github/workflows/debug-artifacts.yml index 6a43bd94f..1003a8dac 100644 --- a/.github/workflows/debug-artifacts.yml +++ b/.github/workflows/debug-artifacts.yml @@ -49,11 +49,16 @@ jobs: with: go-version: ^1.13.1 - uses: ./../action/init + id: init with: tools: ${{ steps.prepare-test.outputs.tools-url }} debug: true debug-artifact-name: my-debug-artifacts debug-database-name: my-db + - uses: ./../action/.github/actions/setup-swift + if: matrix.version == 'nightly-latest' + 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 54d90d5f7..1fa3c42e2 100644 --- a/pr-checks/checks/multi-language-autodetect.yml +++ b/pr-checks/checks/multi-language-autodetect.yml @@ -66,7 +66,9 @@ steps: fi - name: Check language autodetect for Swift - if: env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' + if: >- + env.CODEQL_ENABLE_EXPERIMENTAL_FEATURES_SWIFT == 'true' || + (runner.os != 'Windows' && matrix.version == 'nightly-latest') shell: bash run: | SWIFT_DB=${{ fromJson(steps.analysis.outputs.db-locations).swift }} diff --git a/pr-checks/sync.py b/pr-checks/sync.py index 36cb3980b..80067e155 100644 --- a/pr-checks/sync.py +++ b/pr-checks/sync.py @@ -83,8 +83,7 @@ def writeHeader(checkStream): matrix.version == '20220908' || matrix.version == '20221211' || matrix.version == 'cached' || - matrix.version == 'latest' || - matrix.version == 'nightly-latest' + matrix.version == 'latest' ) ''').strip()), 'shell': 'bash',