Skip to content

Commit d38eb96

Browse files
committed
[libc++] Move some macOS CI jobs to Github actions
This is an attempt to decouple macOS CI testing from BuildKite, which would make the maintenance of macOS CI easier and more accessible to all contributors. Right now, the macOS CI is running entirely on machines owned by the LLVM Foundation with only a small set of contributors having direct access to them. The story for performing back-deployment testing still needs to be figured out, so for now we are retaining some jobs under BuildKite.
1 parent ec5e585 commit d38eb96

File tree

2 files changed

+17
-352
lines changed

2 files changed

+17
-352
lines changed

.github/workflows/libcxx-build-and-test.yaml

Lines changed: 16 additions & 169 deletions
Original file line numberDiff line numberDiff line change
@@ -47,189 +47,36 @@ env:
4747

4848

4949
jobs:
50-
stage1:
51-
if: github.repository_owner == 'llvm'
52-
runs-on: libcxx-runners-8-set
53-
continue-on-error: false
50+
macos:
51+
runs-on: macos-14
5452
strategy:
5553
fail-fast: false
5654
matrix:
5755
config: [
58-
'generic-cxx03',
59-
'generic-cxx26',
60-
'generic-modules'
56+
generic-cxx03,
57+
generic-cxx23,
58+
generic-modules,
59+
apple-configuration
6160
]
62-
cc: [ 'clang-19' ]
63-
cxx: [ 'clang++-19' ]
64-
include:
65-
- config: 'generic-gcc'
66-
cc: 'gcc-14'
67-
cxx: 'g++-14'
6861
steps:
6962
- uses: actions/checkout@v4
70-
- name: ${{ matrix.config }}.${{ matrix.cxx }}
71-
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
72-
env:
73-
CC: ${{ matrix.cc }}
74-
CXX: ${{ matrix.cxx }}
75-
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
76-
if: always()
63+
- uses: maxim-lobanov/setup-xcode@v1
7764
with:
78-
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
79-
path: |
80-
**/test-results.xml
81-
**/*.abilist
82-
**/CMakeError.log
83-
**/CMakeOutput.log
84-
**/crash_diagnostics/*
85-
stage2:
86-
if: github.repository_owner == 'llvm'
87-
runs-on: libcxx-runners-8-set
88-
needs: [ stage1 ]
89-
continue-on-error: false
90-
strategy:
91-
fail-fast: false
92-
matrix:
93-
config: [
94-
'generic-cxx11',
95-
'generic-cxx14',
96-
'generic-cxx17',
97-
'generic-cxx20',
98-
'generic-cxx23'
99-
]
100-
cc: [ 'clang-19' ]
101-
cxx: [ 'clang++-19' ]
102-
include:
103-
- config: 'generic-gcc-cxx11'
104-
cc: 'gcc-14'
105-
cxx: 'g++-14'
106-
- config: 'generic-cxx23'
107-
cc: 'clang-17'
108-
cxx: 'clang++-17'
109-
- config: 'generic-cxx26'
110-
cc: 'clang-18'
111-
cxx: 'clang++-18'
112-
steps:
113-
- uses: actions/checkout@v4
114-
- name: ${{ matrix.config }}
115-
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
116-
env:
117-
CC: ${{ matrix.cc }}
118-
CXX: ${{ matrix.cxx }}
65+
xcode-version: 'latest-stable'
66+
- uses: seanmiddleditch/gha-setup-ninja@master
67+
- name: Build and test
68+
run: |
69+
python3 -m venv .venv
70+
source .venv/bin/activate
71+
python3 -m pip install psutil
72+
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
11973
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
12074
if: always() # Upload artifacts even if the build or test suite fails
12175
with:
122-
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
123-
path: |
124-
**/test-results.xml
125-
**/*.abilist
126-
**/CMakeError.log
127-
**/CMakeOutput.log
128-
**/crash_diagnostics/*
129-
stage3:
130-
if: github.repository_owner == 'llvm'
131-
needs: [ stage1, stage2 ]
132-
continue-on-error: false
133-
strategy:
134-
fail-fast: false
135-
max-parallel: 8
136-
matrix:
137-
config: [
138-
'generic-abi-unstable',
139-
'generic-hardening-mode-debug',
140-
'generic-hardening-mode-extensive',
141-
'generic-hardening-mode-fast',
142-
'generic-hardening-mode-fast-with-abi-breaks',
143-
'generic-merged',
144-
'generic-modules-lsv',
145-
'generic-no-exceptions',
146-
'generic-no-experimental',
147-
'generic-no-filesystem',
148-
'generic-no-localization',
149-
'generic-no-terminal',
150-
'generic-no-random_device',
151-
'generic-no-threads',
152-
'generic-no-tzdb',
153-
'generic-no-unicode',
154-
'generic-no-wide-characters',
155-
'generic-no-rtti',
156-
'generic-optimized-speed',
157-
'generic-static',
158-
# TODO Find a better place for the benchmark and bootstrapping builds to live. They're either very expensive
159-
# or don't provide much value since the benchmark run results are too noise on the bots.
160-
'benchmarks',
161-
'bootstrapping-build'
162-
]
163-
machine: [ 'libcxx-runners-8-set' ]
164-
include:
165-
- config: 'generic-cxx26'
166-
machine: libcxx-runners-8-set
167-
- config: 'generic-asan'
168-
machine: libcxx-runners-8-set
169-
- config: 'generic-tsan'
170-
machine: libcxx-runners-8-set
171-
- config: 'generic-ubsan'
172-
machine: libcxx-runners-8-set
173-
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
174-
- config: 'generic-msan'
175-
machine: libcxx-runners-8-set
176-
runs-on: ${{ matrix.machine }}
177-
steps:
178-
- uses: actions/checkout@v4
179-
- name: ${{ matrix.config }}
180-
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
181-
env:
182-
CC: clang-19
183-
CXX: clang++-19
184-
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
185-
if: always()
186-
with:
187-
name: ${{ matrix.config }}-results
76+
name: macos-${{ matrix.config }}-results
18877
path: |
18978
**/test-results.xml
19079
**/*.abilist
19180
**/CMakeError.log
19281
**/CMakeOutput.log
19382
**/crash_diagnostics/*
194-
windows:
195-
runs-on: windows-2022
196-
needs: [ stage1 ]
197-
strategy:
198-
fail-fast: false
199-
matrix:
200-
include:
201-
- { config: clang-cl-dll, mingw: false }
202-
- { config: clang-cl-static, mingw: false }
203-
- { config: clang-cl-no-vcruntime, mingw: false }
204-
- { config: clang-cl-debug, mingw: false }
205-
- { config: clang-cl-static-crt, mingw: false }
206-
- { config: mingw-dll, mingw: true }
207-
- { config: mingw-static, mingw: true }
208-
- { config: mingw-dll-i686, mingw: true }
209-
steps:
210-
- uses: actions/checkout@v4
211-
- name: Install dependencies
212-
run: |
213-
choco install -y ninja
214-
pip install psutil
215-
- name: Install a current LLVM
216-
if: ${{ matrix.mingw != true }}
217-
run: |
218-
choco install -y llvm --version=18.1.6 --allow-downgrade
219-
- name: Install llvm-mingw
220-
if: ${{ matrix.mingw == true }}
221-
run: |
222-
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20240606/llvm-mingw-20240606-ucrt-x86_64.zip
223-
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
224-
del llvm-mingw*.zip
225-
mv llvm-mingw* c:\llvm-mingw
226-
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
227-
- name: Add Git Bash to the path
228-
run: |
229-
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
230-
- name: Set up the MSVC dev environment
231-
if: ${{ matrix.mingw != true }}
232-
uses: ilammy/msvc-dev-cmd@v1
233-
- name: Build and test
234-
run: |
235-
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}

0 commit comments

Comments
 (0)