From 3829fcbef45f2771df0dca00c7344992000f0b04 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Tue, 6 Feb 2024 01:15:54 +0300 Subject: [PATCH] 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: https://github.com/actions/checkout/issues/1590 --- .github/workflows/ci.yml | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e4a76a1..2ee7b30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -315,8 +315,6 @@ jobs: fi git config --global pack.threads 0 - - uses: actions/checkout@v3 - - name: Install packages if: matrix.install run: | @@ -431,11 +429,25 @@ jobs: then DEPINST_ARGS+=("--git_args" "--jobs $GIT_FETCH_JOBS") fi + mkdir -p snapshot + cd snapshot + echo "Downloading library snapshot: https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz" + curl -L --retry "$NET_RETRY_COUNT" -o "${LIBRARY}-${GITHUB_SHA}.tar.gz" "https://github.com/${GITHUB_REPOSITORY}/archive/${GITHUB_SHA}.tar.gz" + tar -xf "${LIBRARY}-${GITHUB_SHA}.tar.gz" + if [ ! -d "${LIBRARY}-${GITHUB_SHA}" ] + then + echo "Library snapshot does not contain the library directory ${LIBRARY}-${GITHUB_SHA}:" + ls -la + exit 1 + fi + rm -f "${LIBRARY}-${GITHUB_SHA}.tar.gz" cd .. git clone -b "$BOOST_BRANCH" --depth 1 "https://github.com/boostorg/boost.git" "boost-root" cd boost-root - mkdir -p libs/$LIBRARY - cp -r $GITHUB_WORKSPACE/* libs/$LIBRARY + mkdir -p libs + rm -rf "libs/$LIBRARY" + mv -f "../snapshot/${LIBRARY}-${GITHUB_SHA}" "libs/$LIBRARY" + rm -rf "../snapshot" git submodule update --init tools/boostdep DEPINST_ARGS+=("$LIBRARY") python tools/boostdep/depinst/depinst.py "${DEPINST_ARGS[@]}" @@ -457,7 +469,7 @@ jobs: - name: Run tests if: matrix.cmake_tests == '' run: | - cd ../boost-root + cd boost-root B2_ARGS=("-j" "$BUILD_JOBS" "toolset=${{matrix.toolset}}" "cxxstd=${{matrix.cxxstd}}") if [ -n "${{matrix.build_variant}}" ] then