Skip to content

Commit 23974e3

Browse files
committed
Replaced actions/checkout usage with manual download commands.
This fixes the deprecation warnings for actions/checkout@v3. actions/checkout@v4 is not functional because of the upstream bug: actions/checkout#1590
1 parent e7ed991 commit 23974e3

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2021-2023 Andrey Semashev
1+
# Copyright 2021-2024 Andrey Semashev
22
#
33
# Distributed under the Boost Software License, Version 1.0.
44
# (See accompanying file LICENSE_1_0.txt or copy at http://boost.org/LICENSE_1_0.txt)
@@ -317,8 +317,6 @@ jobs:
317317
fi
318318
git config --global pack.threads 0
319319
320-
- uses: actions/checkout@v3
321-
322320
- name: Install packages
323321
if: matrix.install
324322
run: |
@@ -433,11 +431,25 @@ jobs:
433431
then
434432
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
435433
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"
436446
cd ..
437447
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
438448
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"
441453
git submodule update --init tools/boostdep
442454
DEPINST_ARGS+=("$LIBRARY")
443455
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
@@ -459,7 +471,7 @@ jobs:
459471
- name: Run tests
460472
if: matrix.cmake_tests == ''
461473
run: |
462-
cd ../boost-root
474+
cd boost-root
463475
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
464476
if [ -n "${{matrix.build_variant}}" ]
465477
then

0 commit comments

Comments
 (0)