Skip to content

Commit 3d3c82d

Browse files
authored
Make native workflows have 1 stage (#614)
1 parent e05026a commit 3d3c82d

File tree

6 files changed

+79
-772
lines changed

6 files changed

+79
-772
lines changed

.github/workflows/MacOS-arm.yml

Lines changed: 18 additions & 148 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ concurrency:
1515
cancel-in-progress: true
1616

1717
jobs:
18-
build_cache:
18+
build:
1919
name: ${{ matrix.name }}
2020
runs-on: ${{ matrix.os }}
2121
strategy:
@@ -27,41 +27,47 @@ jobs:
2727
compiler: clang
2828
clang-runtime: '20'
2929
cling: Off
30+
cppyy: Off
3031
llvm_enable_projects: "clang"
3132
llvm_targets_to_build: "host"
32-
- name: osx15-arm-clang-clang-repl-19
33+
- name: osx15-arm-clang-clang-repl-19-cppyy
3334
os: macos-15
3435
compiler: clang
3536
clang-runtime: '19'
3637
cling: Off
38+
cppyy: On
3739
llvm_enable_projects: "clang"
3840
llvm_targets_to_build: "host"
39-
- name: osx15-arm-clang-clang-repl-18
41+
- name: osx15-arm-clang-clang-repl-18-cppyy
4042
os: macos-15
4143
compiler: clang
4244
clang-runtime: '18'
4345
cling: Off
46+
cppyy: On
4447
llvm_enable_projects: "clang"
4548
llvm_targets_to_build: "host"
46-
- name: osx15-arm-clang-clang-repl-17
49+
- name: osx15-arm-clang-clang-repl-17-cppyy
4750
os: macos-15
4851
compiler: clang
4952
clang-runtime: '17'
5053
cling: Off
54+
cppyy: On
5155
llvm_enable_projects: "clang"
5256
llvm_targets_to_build: "host"
5357
- name: osx15-arm-clang-clang-repl-16
5458
os: macos-15
5559
compiler: clang
5660
clang-runtime: '16'
5761
cling: Off
62+
cppyy: Off
5863
llvm_enable_projects: "clang"
5964
llvm_targets_to_build: "host"
60-
- name: osx15-arm-clang-clang18-cling
65+
- name: osx15-arm-clang-clang18-cling-cppyy
6166
os: macos-15
6267
compiler: clang
6368
clang-runtime: '18'
6469
cling: On
70+
cppyy: On
6571
cling-version: '1.2'
6672
llvm_enable_projects: "clang"
6773
llvm_targets_to_build: "host;NVPTX"
@@ -104,17 +110,14 @@ jobs:
104110
llvm-project
105111
${{ matrix.cling=='On' && 'cling' || '' }}
106112
key: ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
107-
lookup-only: true
108113

109114
- name: Setup default Build Type
110-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
111115
run: |
112116
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
113117
echo "CODE_COVERAGE=0" >> $GITHUB_ENV
114118
echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
115119
116120
- name: Setup compiler
117-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
118121
run: |
119122
vers="${compiler#*-}"
120123
if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
@@ -145,18 +148,22 @@ jobs:
145148
compiler: ${{ matrix.compiler }}
146149

147150
- name: Install deps
148-
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
149151
run: |
150-
brew update
152+
brew update --force
151153
brew remove unxip
152154
# workaround for https://github.com/actions/setup-python/issues/577
153155
for pkg in $(brew list | grep '^python@'); do
154156
brew unlink "$pkg"
155157
brew link --overwrite "$pkg"
156158
done
157159
brew upgrade openssl >/dev/null 2>&1
158-
brew upgrade
160+
brew upgrade --force
159161
brew install ninja
162+
brew install eigen
163+
brew install boost
164+
brew install gnu-sed
165+
pip install distro pytest
166+
160167
161168
- uses: ./.github/actions/Build_LLVM
162169
with:
@@ -171,143 +178,6 @@ jobs:
171178
${{ matrix.cling=='On' && 'cling' || '' }}
172179
key: ${{ steps.cache.outputs.cache-primary-key }}
173180

174-
cppinterop_and_cppyy_build:
175-
needs: [build_cache]
176-
name: ${{ matrix.name }}
177-
runs-on: ${{ matrix.os }}
178-
strategy:
179-
fail-fast: false
180-
matrix:
181-
include:
182-
- name: osx15-arm-clang-clang-repl-20
183-
os: macos-15
184-
compiler: clang
185-
clang-runtime: '20'
186-
cling: Off
187-
cppyy: Off
188-
- name: osx15-arm-clang-clang-repl-19-cppyy
189-
os: macos-15
190-
compiler: clang
191-
clang-runtime: '19'
192-
cling: Off
193-
cppyy: On
194-
- name: osx15-arm-clang-clang-repl-18-cppyy
195-
os: macos-15
196-
compiler: clang
197-
clang-runtime: '18'
198-
cling: Off
199-
cppyy: On
200-
- name: osx15-arm-clang-clang-repl-17-cppyy
201-
os: macos-15
202-
compiler: clang
203-
clang-runtime: '17'
204-
cling: Off
205-
cppyy: On
206-
- name: osx15-arm-clang-clang-repl-16
207-
os: macos-15
208-
compiler: clang
209-
clang-runtime: '16'
210-
cling: Off
211-
cppyy: Off
212-
- name: osx15-arm-clang-clang18-cling-cppyy
213-
os: macos-15
214-
compiler: clang
215-
clang-runtime: '18'
216-
cling: On
217-
cling-version: '1.2'
218-
cppyy: On
219-
220-
steps:
221-
- uses: actions/checkout@v4
222-
with:
223-
fetch-depth: 0
224-
225-
- name: Set up Python
226-
uses: actions/setup-python@v5
227-
with:
228-
python-version: '3.11'
229-
230-
- name: Save PR Info
231-
run: |
232-
mkdir -p ./pr
233-
echo ${{ github.event.number }} > ./pr/NR
234-
echo ${{ github.repository }} > ./pr/REPO
235-
236-
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
237-
if [[ "$cling_on" == "ON" ]]; then
238-
export CLING_HASH=$(git ls-remote https://github.com/root-project/cling.git refs/tags/v${{ matrix.cling-version }} | tr '\t' '-')
239-
export LLVM_HASH=$(git ls-remote https://github.com/root-project/llvm-project.git cling-llvm${{ matrix.clang-runtime}} | tr '\t' '-')
240-
else
241-
export CLING_HASH="Repl"
242-
# May need to revert back to both having same llvm_hash, as below cause llvm to be rebuilt everytime commit is made to llvm/llvm-project for release a.x
243-
# which could be quite often for new releases
244-
export LLVM_HASH=$(git ls-remote https://github.com/llvm/llvm-project.git refs/heads/release/${{ matrix.clang-runtime}}.x | tr '\t' '-')
245-
fi
246-
247-
echo "CLING_HASH=$CLING_HASH" >> $GITHUB_ENV
248-
echo "LLVM_HASH=$LLVM_HASH" >> $GITHUB_ENV
249-
250-
- name: Setup default Build Type
251-
run: |
252-
echo "BUILD_TYPE=Release" >> $GITHUB_ENV
253-
echo "CODE_COVERAGE=0" >> $GITHUB_ENV
254-
echo "ncpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV
255-
256-
- name: Setup compiler
257-
run: |
258-
vers="${compiler#*-}"
259-
if [[ "${{ matrix.compiler }}" == *"gcc"* ]]; then
260-
brew install "gcc@$vers"
261-
echo "CC=gcc-${vers}" >> $GITHUB_ENV
262-
echo "CXX=g++-${vers}" >> $GITHUB_ENV
263-
else
264-
cling_on=$(echo "${{ matrix.cling }}" | tr '[:lower:]' '[:upper:]')
265-
if [[ "${cling_on}" == "ON" ]]; then
266-
brew install llvm@15
267-
brew remove llvm@18
268-
brew cleanup
269-
#FIXME: Do not believe setting all these environment variables are necessary
270-
# They were set to avoid using Xcodes libc++ and to stop CppInterOp using llvm@18 in tests
271-
echo 'LDFLAGS="-L/opt/homebrew/opt/llvm@15/lib/ -L/opt/homebrew/opt/llvm@15/c++/"' >> $GITHUB_ENV
272-
echo 'CPPFLAGS="-I/opt/homebrew/opt/llvm@15/include"' >> $GITHUB_ENV
273-
echo 'CPATH="/opt/homebrew/include/"' >> $GITHUB_ENV
274-
echo 'LIBRARY_PATH="/opt/homebrew/lib/"' >> $GITHUB_ENV
275-
echo "CC=$(brew --prefix llvm@15)/bin/clang" >> $GITHUB_ENV
276-
echo "CXX=$(brew --prefix llvm@15)/bin/clang++" >> $GITHUB_ENV
277-
else
278-
echo "CC=$(brew --prefix llvm@18)/bin/clang" >> $GITHUB_ENV
279-
echo "CXX=$(brew --prefix llvm@18)/bin/clang++" >> $GITHUB_ENV
280-
fi
281-
fi
282-
echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> $GITHUB_ENV
283-
env:
284-
compiler: ${{ matrix.compiler }}
285-
286-
- name: Install deps
287-
run: |
288-
brew update --force
289-
brew remove unxip
290-
# workaround for https://github.com/actions/setup-python/issues/577
291-
for pkg in $(brew list | grep '^python@'); do
292-
brew unlink "$pkg"
293-
brew link --overwrite "$pkg"
294-
done
295-
brew upgrade --force
296-
brew install eigen
297-
brew install boost
298-
brew install gnu-sed
299-
pip install distro pytest
300-
301-
302-
- name: Restore Cache LLVM/Clang runtime build directory
303-
uses: actions/cache/restore@v4
304-
id: cache
305-
with:
306-
path: |
307-
llvm-project
308-
${{ matrix.cling=='On' && 'cling' || '' }}
309-
key: ${{ env.CLING_HASH }}-${{ runner.os }}-${{ matrix.os }}-${{ matrix.compiler }}-clang-${{ matrix.clang-runtime }}.x-patch-${{ hashFiles(format('patches/llvm/clang{0}-*.patch', matrix.clang-runtime)) || 'none' }}
310-
311181
- uses: ./.github/actions/Build_and_Test_CppInterOp
312182

313183
- uses: ./.github/actions/Build_and_Test_cppyy

0 commit comments

Comments
 (0)