Skip to content

Commit d9eddd7

Browse files
committed
Add latest gcc/clang/macos compilers
1 parent 92d126f commit d9eddd7

File tree

1 file changed

+85
-21
lines changed

1 file changed

+85
-21
lines changed

.github/workflows/ci.yml

Lines changed: 85 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,16 @@ jobs:
128128
- toolset: gcc-13
129129
cxxstd: "11,14,17,20,2b"
130130
os: ubuntu-latest
131-
container: ubuntu:23.04
131+
container: ubuntu:24.04
132132
install: g++-13-multilib
133133
address-model: 32,64
134+
# Linux, gcc-14
135+
- toolset: gcc-14
136+
cxxstd: "11,14,17,20,2b"
137+
os: ubuntu-latest
138+
container: ubuntu:24.04
139+
install: g++-14-multilib
140+
address-model: 32,64
134141
# Linux, gcc-12 UBSAN
135142
- name: UBSAN
136143
toolset: gcc-12
@@ -285,16 +292,23 @@ jobs:
285292
- toolset: clang
286293
compiler: clang++-16
287294
cxxstd: "03,11,14,17,20,2b"
288-
container: ubuntu:23.04
295+
container: ubuntu:24.04
289296
os: ubuntu-latest
290297
install: clang-16
291298
# Linux, clang-17
292299
- toolset: clang
293300
compiler: clang++-17
294301
cxxstd: "03,11,14,17,20,2b"
295-
container: ubuntu:23.10
302+
container: ubuntu:24.04
296303
os: ubuntu-latest
297304
install: clang-17
305+
# Linux, clang-18
306+
- toolset: clang
307+
compiler: clang++-18
308+
cxxstd: "03,11,14,17,20,2b"
309+
container: ubuntu:24.04
310+
os: ubuntu-latest
311+
install: clang-18
298312
# Linux, clang-15 libc++
299313
- toolset: clang
300314
compiler: clang++-15
@@ -304,10 +318,17 @@ jobs:
304318
- clang-15
305319
- libc++-15-dev
306320
- libc++abi-15-dev
307-
sources:
308-
- "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
309-
source_keys:
310-
- "https://apt.llvm.org/llvm-snapshot.gpg.key"
321+
cxxflags: -stdlib=libc++
322+
linkflags: -stdlib=libc++
323+
# Linux, clang-18 libc++
324+
- toolset: clang
325+
compiler: clang++-18
326+
cxxstd: "11,14,17,20,2b"
327+
os: ubuntu-24.04
328+
install:
329+
- clang-18
330+
- libc++-18-dev
331+
- libc++abi-18-dev
311332
cxxflags: -stdlib=libc++
312333
linkflags: -stdlib=libc++
313334
# Linux, clang-14 libc++, ubsan
@@ -323,13 +344,22 @@ jobs:
323344
- clang-14
324345
- libc++-14-dev
325346
- libc++abi-14-dev
347+
# Linux, clang-18 libc++, ubsan
348+
- name: UBSAN
349+
toolset: clang
350+
compiler: clang++-18
351+
cxxstd: "11,14,17,20"
352+
cxxflags: -stdlib=libc++
353+
linkflags: -stdlib=libc++
354+
ubsan: 1
355+
os: ubuntu-24.04
356+
install:
357+
- clang-18
358+
- libc++-18-dev
359+
- libc++abi-18-dev
326360
#------------------
327361
# MacOS, clang
328362
#------------------
329-
# Macos 11, clang
330-
- toolset: clang
331-
cxxstd: "11,14,17,2a"
332-
os: macos-11
333363
# Macos 12, clang
334364
- toolset: clang
335365
cxxstd: "11,14,17,20,2b"
@@ -338,6 +368,10 @@ jobs:
338368
- toolset: clang
339369
cxxstd: "11,14,17,20,2b"
340370
os: macos-13
371+
# Macos 17, clang
372+
- toolset: clang
373+
cxxstd: "11,14,17,20,2b"
374+
os: macos-14
341375

342376
timeout-minutes: 180
343377
runs-on: ${{matrix.os}}
@@ -357,7 +391,6 @@ jobs:
357391
if [ -f "/etc/debian_version" ]
358392
then
359393
apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
360-
apt-get -o Acquire::Retries=$NET_RETRY_COUNT dist-upgrade -y
361394
if [ "$(apt-cache search "^python-is-python3$" | wc -l)" -ne 0 ]
362395
then
363396
PYTHON_PACKAGE="python-is-python3"
@@ -368,7 +401,6 @@ jobs:
368401
fi
369402
fi
370403
git config --global pack.threads 0
371-
- uses: actions/checkout@v3
372404
373405
- name: Install packages
374406
if: matrix.install
@@ -425,8 +457,8 @@ jobs:
425457
done
426458
fi
427459
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT update
428-
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT dist-upgrade -y
429460
sudo apt-get -o Acquire::Retries=$NET_RETRY_COUNT install -y ${{join(matrix.install, ' ')}}
461+
430462
- name: Setup GCC Toolchain
431463
if: matrix.gcc_toolchain
432464
run: |
@@ -438,6 +470,7 @@ jobs:
438470
ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin"
439471
mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET"
440472
ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}"
473+
441474
- name: Setup Boost
442475
run: |
443476
echo GITHUB_REPOSITORY: $GITHUB_REPOSITORY
@@ -483,11 +516,25 @@ jobs:
483516
then
484517
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
485518
fi
519+
mkdir -p snapshot
520+
cd snapshot
521+
echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
522+
curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
523+
tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz"
524+
if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ]
525+
then
526+
echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:"
527+
ls -la
528+
exit 1
529+
fi
530+
rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz"
486531
cd ..
487532
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
488533
cd boost-root
489-
mkdir -p libs/$LIBRARY
490-
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
534+
mkdir -p libs
535+
rm -rf "libs/$LIBRARY"
536+
mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY"
537+
rm -rf "../snapshot"
491538
git submodule update --init tools/boostdep
492539
DEPINST_ARGS+=("$LIBRARY")
493540
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
@@ -502,10 +549,11 @@ jobs:
502549
fi
503550
echo " ;" >> ~/user-config.jam
504551
fi
552+
505553
- name: Run tests
506554
if: matrix.cmake_tests == ''
507555
run: |
508-
cd ../boost-root
556+
cd boost-root
509557
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
510558
if [ -n "${{matrix.build_variant}}" ]
511559
then
@@ -536,6 +584,7 @@ jobs:
536584
fi
537585
B2_ARGS+=("libs/$LIBRARY/test")
538586
./b2 "${B2_ARGS[@]}"
587+
539588
windows:
540589
strategy:
541590
fail-fast: false
@@ -562,11 +611,10 @@ jobs:
562611
addrmd: 64
563612
os: windows-2019
564613

614+
timeout-minutes: 180
565615
runs-on: ${{matrix.os}}
566616

567617
steps:
568-
- uses: actions/checkout@v3
569-
570618
- name: Setup Boost
571619
shell: cmd
572620
run: |
@@ -580,16 +628,32 @@ jobs:
580628
set BOOST_BRANCH=develop
581629
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
582630
echo BOOST_BRANCH: %BOOST_BRANCH%
631+
mkdir snapshot
632+
cd snapshot
633+
echo Downloading library snapshot: https://github.com/%GITHUB_REPOSITORY%/archive/%GITHUB_SHA%.zip
634+
curl -L --retry %NET_RETRY_COUNT% -o "%LIBRARY%-%GITHUB_SHA%.zip" "https://github.com/%GITHUB_REPOSITORY%/archive/%GITHUB_SHA%.zip"
635+
tar -xf "%LIBRARY%-%GITHUB_SHA%.zip"
636+
if not exist "%LIBRARY%-%GITHUB_SHA%\" (
637+
echo Library snapshot does not contain the library directory %LIBRARY%-%GITHUB_SHA%:
638+
dir
639+
exit /b 1
640+
)
641+
del /f "%LIBRARY%-%GITHUB_SHA%.zip"
583642
cd ..
584643
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
585644
cd boost-root
586-
xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
645+
if not exist "libs\" mkdir libs
646+
if exist "libs\%LIBRARY%\" rmdir /s /q "libs\%LIBRARY%"
647+
move /Y "..\snapshot\%LIBRARY%-%GITHUB_SHA%" "libs\%LIBRARY%"
648+
rmdir /s /q "..\snapshot"
587649
git submodule update --init tools/boostdep
588650
python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
589651
cmd /c bootstrap
590652
b2 -d0 headers
653+
591654
- name: Run tests
592655
shell: cmd
593656
run: |
594-
cd ../boost-root
657+
cd boost-root
595658
b2 -j %NUMBER_OF_PROCESSORS% libs/%LIBRARY%/test toolset=${{matrix.toolset}} cxxstd=${{matrix.cxxstd}} address-model=${{matrix.addrmd}} variant=debug,release embed-manifest-via=linker
659+

0 commit comments

Comments
 (0)