GHA CI: add fallback URL for boost library

Boost main download site jfrog is unavailable at the time of writing.
Related: https://github.com/boostorg/boost/issues/842
PR #20218.
This commit is contained in:
Chocobo1 2024-01-02 15:54:49 +08:00 committed by GitHub
commit 8bd604f633
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 35 additions and 19 deletions

View file

@ -48,11 +48,15 @@ jobs:
- name: Install boost
run: |
curl \
-L \
-o "${{ runner.temp }}/boost.tar.gz" \
"https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
boost_url="https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/1.76.0/boost_1_76_0.tar.gz"
set +e
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
if [ "$_exitCode" -ne "0" ]; then
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."; _exitCode="$?"
fi
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- name: Install Qt