1
- # Copyright 2023 Andrey Semashev
1
+ # Copyright 2023-2024 Andrey Semashev
2
2
#
3
3
# Distributed under the Boost Software License, Version 1.0.
4
4
# https://www.boost.org/LICENSE_1_0.txt
@@ -313,8 +313,6 @@ jobs:
313
313
fi
314
314
git config --global pack.threads 0
315
315
316
- - uses : actions/checkout@v3
317
-
318
316
- name : Install packages
319
317
if : matrix.install
320
318
run : |
@@ -429,11 +427,21 @@ jobs:
429
427
then
430
428
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
431
429
fi
432
- cd ..
433
430
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
434
431
cd boost-root
435
- mkdir -p libs/$LIBRARY
436
- cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
432
+ mkdir -p libs
433
+ cd libs
434
+ curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
435
+ tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz"
436
+ if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ]
437
+ then
438
+ echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:"
439
+ ls -la
440
+ exit 1
441
+ fi
442
+ rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz"
443
+ mv -f "${LIBRARY}-${GITHUB_SHA}" "$LIBRARY"
444
+ cd ..
437
445
git submodule update --init tools/boostdep
438
446
DEPINST_ARGS+=("$LIBRARY")
439
447
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
@@ -455,7 +463,7 @@ jobs:
455
463
- name : Run tests
456
464
if : matrix.cmake_tests == ''
457
465
run : |
458
- cd ../ boost-root
466
+ cd boost-root
459
467
if [ -z "${{matrix.extra_tests}}" ]
460
468
then
461
469
export BOOST_SCOPE_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
@@ -490,15 +498,15 @@ jobs:
490
498
- name : Build CMake tests
491
499
if : matrix.cmake_tests
492
500
run : |
493
- cd ../ boost-root
501
+ cd boost-root
494
502
mkdir __build_static__ && cd __build_static__
495
503
cmake -DBOOST_INCLUDE_LIBRARIES=$LIBRARY -DBUILD_TESTING=ON ..
496
504
cmake --build . --target tests -j $BUILD_JOBS
497
505
498
506
- name : Run CMake tests
499
507
if : matrix.cmake_tests
500
508
run : |
501
- cd ../ boost-root
509
+ cd boost-root
502
510
cd __build_static__
503
511
ctest --output-on-failure --no-tests=error
504
512
@@ -533,8 +541,6 @@ jobs:
533
541
runs-on : ${{matrix.os}}
534
542
535
543
steps :
536
- - uses : actions/checkout@v3
537
-
538
544
- name : Setup Boost
539
545
shell : cmd
540
546
run : |
@@ -548,10 +554,20 @@ jobs:
548
554
set BOOST_BRANCH=develop
549
555
for /f %%i in ("%GITHUB_BASE_REF%") do if "%%~nxi" == "master" set BOOST_BRANCH=master
550
556
echo BOOST_BRANCH: %BOOST_BRANCH%
551
- cd ..
552
557
git clone -b %BOOST_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
553
558
cd boost-root
554
- xcopy /s /e /q %GITHUB_WORKSPACE% libs\%LIBRARY%\
559
+ mkdir libs
560
+ cd libs
561
+ curl -L --retry %NET_RETRY_COUNT% -o "%LIBRARY%-%GITHUB_SHA%.zip" "https://github.com/%GITHUB_REPOSITORY%/archive/%GITHUB_SHA%.zip"
562
+ tar -xf "%LIBRARY%-%GITHUB_SHA%.zip"
563
+ if not exist "%LIBRARY%-%GITHUB_SHA%\" (
564
+ echo Library snapshot does not contain the library directory %LIBRARY%-%GITHUB_SHA%:
565
+ dir
566
+ exit /b 1
567
+ )
568
+ del /f "%LIBRARY%-%GITHUB_SHA%.zip"
569
+ ren "%LIBRARY%-%GITHUB_SHA%" "%LIBRARY%"
570
+ cd ..
555
571
git submodule update --init tools/boostdep
556
572
python tools/boostdep/depinst/depinst.py --git_args "--jobs %GIT_FETCH_JOBS%" %LIBRARY%
557
573
cmd /c bootstrap
@@ -560,7 +576,7 @@ jobs:
560
576
- name : Run tests
561
577
shell : cmd
562
578
run : |
563
- cd ../ boost-root
579
+ cd boost-root
564
580
if "${{matrix.extra_tests}}" == "" set BOOST_SCOPE_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS=1
565
581
if not "${{matrix.cxxstd}}" == "" set CXXSTD=cxxstd=${{matrix.cxxstd}}
566
582
if not "${{matrix.addrmd}}" == "" set ADDRMD=address-model=${{matrix.addrmd}}
0 commit comments