From 912b751901b9060a0a863e1be6468318d7b05b0a Mon Sep 17 00:00:00 2001 From: "codeql-ci-app[bot]" <276623899+codeql-ci-app[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2026 17:10:36 +0000 Subject: [PATCH 1/2] Test only: run the runner images workflow on push, without windows-2022 From 836e8edc4c2234544bd45254bb979706633affbb Mon Sep 17 00:00:00 2001 From: "codeql-ci-app[bot]" <276623899+codeql-ci-app[bot]@users.noreply.github.com> Date: Wed, 11 Nov 2026 17:10:38 +0000 Subject: [PATCH 2/2] Run the runner-images check on windows-2022 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/__runner-images.yml | 128 ++++++++++++++++++++++++++ pr-checks/checks/runner-images.yml | 70 ++++++++++++++ 2 files changed, 198 insertions(+) create mode 100644 .github/workflows/__runner-images.yml create mode 100644 pr-checks/checks/runner-images.yml diff --git a/.github/workflows/__runner-images.yml b/.github/workflows/__runner-images.yml new file mode 100644 index 0000000000..8c7ce02f7c --- /dev/null +++ b/.github/workflows/__runner-images.yml @@ -0,0 +1,128 @@ +# Warning: This file is generated automatically, and should not be modified. +# Instead, please modify the template in the pr-checks directory and run: +# pr-checks/sync.sh +# to regenerate this file. + +name: PR Check - Runner images +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GO111MODULE: auto +on: + push: + branches: + - main + - releases/v* + pull_request: {} + merge_group: + types: + - checks_requested + schedule: + - cron: "0 5 * * *" + workflow_dispatch: + inputs: + dotnet-version: + type: string + description: The version of .NET to install + required: false + default: 9.x + go-version: + type: string + description: The version of Go to install + required: false + default: ">=1.21.0" + workflow_call: + inputs: + dotnet-version: + type: string + description: The version of .NET to install + required: false + default: 9.x + go-version: + type: string + description: The version of Go to install + required: false + default: ">=1.21.0" +defaults: + run: + shell: bash +concurrency: + cancel-in-progress: ${{ github.event_name == 'pull_request' || false }} + group: runner-images-${{github.ref}}-${{inputs.dotnet-version}}-${{inputs.go-version}} +jobs: + runner-images: + strategy: + fail-fast: false + matrix: + include: + - os: ubuntu-22.04 + version: linked + - os: ubuntu-22.04-arm + version: linked + - os: ubuntu-24.04 + version: linked + - os: ubuntu-24.04-arm + version: linked + - os: ubuntu-26.04 + version: linked + - os: ubuntu-26.04-arm + version: linked + - os: windows-2022 + version: linked + - os: windows-2025 + version: linked + - os: macos-15-large + version: linked + - os: macos-15-xlarge + version: linked + - os: macos-26-large + version: linked + - os: macos-26-xlarge + version: linked + name: Runner images + if: github.triggering_actor != 'dependabot[bot]' + permissions: + contents: read + security-events: read + timeout-minutes: 45 + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Install .NET + uses: actions/setup-dotnet@a98b56852c35b8e3190ac28c8c2271da59106c68 # v6.0.0 + with: + dotnet-version: ${{ inputs.dotnet-version || '9.x' }} + - name: Install Go + uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 + with: + go-version: ${{ inputs.go-version || '>=1.21.0' }} + cache: false + - name: Prepare test + id: prepare-test + uses: ./.github/actions/prepare-test + with: + version: ${{ matrix.version }} + use-all-platform-bundle: "false" + setup-kotlin: "true" + - uses: ./../action/init + with: + languages: ${{ env.LANGUAGES }} + tools: ${{ steps.prepare-test.outputs.tools-url }} + - name: Build code + run: ./build.sh + - uses: ./../action/analyze + with: + upload-database: false + - name: Assert databases exist + run: | + cd "$RUNNER_TEMP/codeql_databases" + for lang in ${LANGUAGES//,/ }; do + if [[ ! -d "$lang" ]]; then + echo "Did not find a database for $lang" + exit 1 + fi + echo "Found database for $lang" + done + env: + LANGUAGES: cpp,csharp,go,java,javascript,python,ruby${{ startsWith(matrix.os, 'macos') && ',swift' || '' }} + CODEQL_ACTION_TEST_MODE: true diff --git a/pr-checks/checks/runner-images.yml b/pr-checks/checks/runner-images.yml new file mode 100644 index 0000000000..c7bdcddcd0 --- /dev/null +++ b/pr-checks/checks/runner-images.yml @@ -0,0 +1,70 @@ +name: "Runner images" +description: "An end-to-end integration test checking that CodeQL can analyze interpreted and compiled code on the GitHub-hosted runner images" +# This check runs on each image listed in +# https://github.com/actions/runner-images#available-images, except for images that GitHub has +# retired or is about to retire, and: +# - `ubuntu-slim`, which is intended for lightweight jobs rather than builds like this one. +# - `windows-11-arm`, since CodeQL doesn't support Windows on Arm64. +# - `xcode-27`, a preview image that the `unsupported-macos` check runs on. +# +# The `Update runner images` workflow asks Copilot to keep these images up to date, following the +# instructions in `.github/workflows/update-runner-images.md`. +operatingSystems: + # The Ubuntu 22.04 images have brownouts from 23 March 2027 and are retired on 17 April 2027, so + # remove them before the brownouts start. + # See https://github.com/actions/runner-images/issues/14254. + - os: ubuntu + runner-image: ubuntu-22.04 + - os: ubuntu + runner-image: ubuntu-22.04-arm + - os: ubuntu + runner-image: ubuntu-24.04 + - os: ubuntu + runner-image: ubuntu-24.04-arm + - os: ubuntu + runner-image: ubuntu-26.04 + - os: ubuntu + runner-image: ubuntu-26.04-arm + - os: windows + runner-image: windows-2022 + - os: windows + runner-image: windows-2025 + # Use larger runners for macOS to keep these jobs off the critical path. + - os: macos + runner-image: macos-15-large + - os: macos + runner-image: macos-15-xlarge + - os: macos + runner-image: macos-26-large + - os: macos + runner-image: macos-26-xlarge +# Other PR checks cover the supported CodeQL versions, so this check only tests the linked version. +# Linux Arm64 bundles are only available for CodeQL 2.27.0 and later, so older stable versions +# can't run on the Arm64 images. +versions: + - linked +installGo: true +installDotNet: true +# The languages to build and analyze. CodeQL only supports Swift on macOS. +env: + LANGUAGES: "cpp,csharp,go,java,javascript,python,ruby${{ startsWith(matrix.os, 'macos') && ',swift' || '' }}" +steps: + - uses: ./../action/init + with: + languages: ${{ env.LANGUAGES }} + tools: ${{ steps.prepare-test.outputs.tools-url }} + - name: Build code + run: ./build.sh + - uses: ./../action/analyze + with: + upload-database: false + - name: Assert databases exist + run: | + cd "$RUNNER_TEMP/codeql_databases" + for lang in ${LANGUAGES//,/ }; do + if [[ ! -d "$lang" ]]; then + echo "Did not find a database for $lang" + exit 1 + fi + echo "Found database for $lang" + done