Skip to content

[libc++] Use GitHub-provided runners for the windows CI #79326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/libcxx-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,45 @@ jobs:
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*
windows:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we're ready to merge this, we should add needs: [ stage1, stage2, stage3 ] to only trigger the Windows CI if the other stages are happy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather only wait for stage1, since the GitHub-provided agents are quite slow. I think it's quite unlikely that we'll actually hit resource limits, since we have up to 60 concurrent agents available, i.e. more than 7 libc++ patches uploaded in an hour that don't fail on stage1. We can still put that higher later if we do hit limitations at some point.

runs-on: windows-2022
needs: [ stage1 ]
strategy:
fail-fast: false
matrix:
include:
- { config: clang-cl-dll, mingw: false }
- { config: clang-cl-static, mingw: false }
- { config: clang-cl-no-vcruntime, mingw: false }
- { config: clang-cl-debug, mingw: false }
- { config: clang-cl-static-crt, mingw: false }
- { config: mingw-dll, mingw: true }
- { config: mingw-static, mingw: true }
- { config: mingw-dll-i686, mingw: true }
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
choco install -y ninja wget
pip install psutil
- name: Install a current LLVM
if: ${{ matrix.mingw != true }}
run: |
choco install -y llvm --version=17.0.6
- name: Install llvm-mingw
if: ${{ matrix.mingw == true }}
run: |
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20231128/llvm-mingw-20231128-ucrt-x86_64.zip
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
del llvm-mingw*.zip
mv llvm-mingw* c:\llvm-mingw
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Add Git Bash to the path
run: |
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
- name: Set up the MSVC dev environment
if: ${{ matrix.mingw != true }}
uses: ilammy/msvc-dev-cmd@v1
- name: Build and test
run: |
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
Empty file added libcxx/trigger
Empty file.
50 changes: 0 additions & 50 deletions libcxx/utils/ci/buildkite-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,56 +57,6 @@ environment_definitions:


steps:
- group: ':windows: Windows'
steps:
- label: Clang-cl (DLL)
command: bash libcxx/utils/ci/run-buildbot clang-cl-dll
agents:
queue: windows
<<: *common

- label: Clang-cl (Static)
command: bash libcxx/utils/ci/run-buildbot clang-cl-static
agents:
queue: windows
<<: *common

- label: Clang-cl (no vcruntime exceptions)
command: bash libcxx/utils/ci/run-buildbot clang-cl-no-vcruntime
<<: *common
agents:
queue: windows

- label: Clang-cl (Debug mode)
command: bash libcxx/utils/ci/run-buildbot clang-cl-debug
agents:
queue: windows
<<: *common

- label: Clang-cl (Static CRT)
command: bash libcxx/utils/ci/run-buildbot clang-cl-static-crt
agents:
queue: windows
<<: *common

- label: MinGW (DLL, x86_64)
command: bash libcxx/utils/ci/run-buildbot mingw-dll
agents:
queue: windows
<<: *common

- label: MinGW (Static, x86_64)
command: bash libcxx/utils/ci/run-buildbot mingw-static
agents:
queue: windows
<<: *common

- label: MinGW (DLL, i686)
command: bash libcxx/utils/ci/run-buildbot mingw-dll-i686
agents:
queue: windows
<<: *common

- group: ':mac: Apple'
steps:
- label: MacOS x86_64
Expand Down
3 changes: 3 additions & 0 deletions runtimes/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ set(LLVM_COMPILER_CHECKED ON)
include(AddLLVM)
include(HandleLLVMOptions)

# Loot at the PATH first to avoid a version mismatch between the command-line
# python and the CMake-found version
set(Python3_FIND_REGISTRY LAST)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI - ideally we wouldn't need to have things like this in the main CMakeLists.txt.

Ideally we'd set it in the CI environment, as we happen to need it there due to how the Github runners are set up. It is possible to pass this on the CMake command line, I think, like -DPython3_FIND_REGISTRY=LAST, but the run-buildbot script doesn't support passing extra command line parameters to cmake.

On the other hand - this doesn't really hurt either; the cmake default behaviour is really really surprising here, and this makes it less surprising. It makes things a little inconsistent to keep setting this in the runtimes/CMakeLists.txt only - I wonder if we could set it e.g. cmake/Modules/CMakePolicy.cmake as a sort of project-wide default policy?

Anyway, just venting my thoughts on the matter - no urgent action needed.

find_package(Python3 REQUIRED COMPONENTS Interpreter)

# Host triple is used by tests to check if they are running natively.
Expand Down