Skip to content

Commit 3829fcb

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 21d6434 commit 3829fcb

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,6 @@ jobs:
315315
fi
316316
git config --global pack.threads 0
317317
318-
- uses: actions/checkout@v3
319-
320318
- name: Install packages
321319
if: matrix.install
322320
run: |
@@ -431,11 +429,25 @@ jobs:
431429
then
432430
DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS")
433431
fi
432+
mkdir -p snapshot
433+
cd snapshot
434+
echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
435+
curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz"
436+
tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz"
437+
if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ]
438+
then
439+
echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:"
440+
ls -la
441+
exit 1
442+
fi
443+
rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz"
434444
cd ..
435445
git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root"
436446
cd boost-root
437-
mkdir -p libs/$LIBRARY
438-
cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY
447+
mkdir -p libs
448+
rm -rf "libs/$LIBRARY"
449+
mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY"
450+
rm -rf "../snapshot"
439451
git submodule update --init tools/boostdep
440452
DEPINST_ARGS+=("$LIBRARY")
441453
python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}"
@@ -457,7 +469,7 @@ jobs:
457469
- name: Run tests
458470
if: matrix.cmake_tests == ''
459471
run: |
460-
cd ../boost-root
472+
cd boost-root
461473
B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}")
462474
if [ -n "${{matrix.build_variant}}" ]
463475
then

0 commit comments

Comments
 (0)