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 b1092f4b70..d780b329fc 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 eaa4311423..e2b6bfdfcc 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 8f9c0c3aba..3edff4fa9c 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 4fbc4e51e6..e347e452d3 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 96a6dc12ed..798d8912b2 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 e7c11fc1d3..9ac18e6c97 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 f0f7c4b436..4f9623d276 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 983bc759ea..bf6644d574 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 ebc72a106b..f819825cc1 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 89d6a1b470..7a0a69e6f0 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 f24322b9e6..912ebed24b 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 05fecab7d2..7ccd818ec0 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 20d80c2c89..23d2b3700b 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 fc11c53bc3..728b572f73 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 ea4f00c6ee..02f3372fe5 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 adc418ea04..e23ae45058 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 879fecccd3..45b08a4146 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 18a03452f6..0e0b8f3efe 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 700a790079..f385b65a97 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 f0b4dcb1e4..132db0725e 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 a5e9626292..8c31d45224 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 eb768b343f..b551aad495 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 4f2d69a6ac..1197b832a4 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 02cd876eab..70b03825be 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 b309b4abd7..b5676623b1 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 e0b039bacf..8c3ef25b20 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 3a5470ed74..427f79a7a7 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 8666073bec..d5ce77d1cf 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 54085d2dad..48aaae7a84 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 ebda509007..7179d84f2d 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 5be33e0a66..da2ead8bc0 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 6a43bd94f9..1003a8dacc 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 54d90d5f73..1fa3c42e20 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 36cb3980bb..80067e155b 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',