Skip to content

Commit

Permalink
GHA CI: add fallback URL for boost library
Browse files Browse the repository at this point in the history
Boost main download site jfrog is unavailable at the time of writing.
Related: boostorg/boost#842
  • Loading branch information
Chocobo1 committed Jan 1, 2024
1 parent be5bf9a commit 800a8ad
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 19 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/ci_macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ jobs:

- name: Install boost
run: |
curl \
-L \
-o "${{ runner.temp }}/boost.tar.gz" \
"https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
boost_url="https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_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
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci_ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci_windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,15 @@ jobs:
- name: Install boost
run: |
curl `
-L `
-o "${{ runner.temp }}/boost.tar.gz" `
"https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz"
$boost_url="https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz"
$boost_url2="https://sourceforge.net/projects/boost/files/boost/1.83.0/boost_1_83_0.tar.gz"
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
if ($LastExitCode -ne 0)
{
curl -L -o "${{ runner.temp }}/boost.tar.gz" "$boost_url2"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
}
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
- name: Install Qt
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/coverity-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,15 @@ jobs:
- name: Install boost
run: |
curl \
-L \
-o "${{ runner.temp }}/boost.tar.gz" \
"https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz"
tar -xf "${{ runner.temp }}/boost.tar.gz" -C "${{ github.workspace }}/.."
boost_url="https://boostorg.jfrog.io/artifactory/main/release/1.84.0/source/boost_1_84_0.tar.gz"
boost_url2="https://sourceforge.net/projects/boost/files/boost/1.84.0/boost_1_84_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
Expand Down

0 comments on commit 800a8ad

Please sign in to comment.