1
- # Copyright 2021-2023 Andrey Semashev
1
+ # Copyright 2021-2024 Andrey Semashev
2
2
#
3
3
# Distributed under the Boost Software License, Version 1.0.
4
4
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
@@ -317,8 +317,6 @@ jobs:
317
317
fi
318
318
git config --global pack.threads 0
319
319
320
- - uses : actions/checkout@v3
321
-
322
320
- name : Install packages
323
321
if : matrix.install
324
322
run : |
@@ -433,11 +431,25 @@ jobs:
433
431
then
434
432
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
435
433
fi
434
+ mkdir -p snapshot
435
+ cd snapshot
436
+ echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
437
+ curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
438
+ tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz"
439
+ if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ]
440
+ then
441
+ echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:"
442
+ ls -la
443
+ exit 1
444
+ fi
445
+ rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz"
436
446
cd ..
437
447
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
438
448
cd boost-root
439
- mkdir -p libs/$LIBRARY
440
- cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
449
+ mkdir -p libs
450
+ rm -rf "libs/$LIBRARY"
451
+ mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY"
452
+ rm -rf "../snapshot"
441
453
git submodule update --init tools/boostdep
442
454
DEPINST_ARGS+=("$LIBRARY")
443
455
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
@@ -459,7 +471,7 @@ jobs:
459
471
- name : Run tests
460
472
if : matrix.cmake_tests == ''
461
473
run : |
462
- cd ../ boost-root
474
+ cd boost-root
463
475
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
464
476
if [ -n "${{matrix.build_variant}}" ]
465
477
then
0 commit comments