[Windows, Ubuntu] Boost 1.72.0 will be removed from images on March, 8
Closed this issue ยท 12 comments
Breaking changes
Boost 1.72.0 will be removed from Windows and Ubuntu images. Please note that 1.72.0 is the single version of Boost pre-installed on images.
Target date
Image deployment will start March, 8 and will take 3-4 days.
The motivation for the changes
We are going to deprecate Boost due to lack of free space on images, maintenance concerns and low popularity.
Possible impact
If your project depends on Boost 1.72.0 โ build will be broken.
Virtual environments affected
- Ubuntu 16.04
- Ubuntu 18.04
- Ubuntu 20.04
- macOS 10.13
- macOS 10.14
- macOS 10.15
- macOS 11.0
- Windows Server 2016 R2
- Windows Server 2019
What's the future of Boost?
We don't have plans to install any version of Boost on the images. Please see details in this issue: #2425
Please note the actions/boost-versions repository will not be maintained in the future.
Mitigation ways
If you need to continue using Boost 1.72.0 in your build, please consider the following ways to install it in runtime:
- Windows
- Install Boost 1.72.0 from releases of actions/boost-versions repository:
# Use the boost-1.72.0-win32-msvc14.1-x86_64.tar.gz for Windows 2016
$url = "https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-win32-msvc14.2-x86_64.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "$env:TEMP\boost.tar.gz")
7z.exe x "$env:TEMP\boost.tar.gz" -o"$env:TEMP\boostArchive" -y | Out-Null
7z.exe x "$env:TEMP\boostArchive" -o"$env:TEMP\boost" -y | Out-Null
Push-Location -Path "$env:TEMP\boost"
Invoke-Expression .\setup.ps1
The above code snippet will install Boost to the C:\hostedtoolcache\windows\Boost\1.72.0\x86_64
folder.
- Download official pre-build binaries provided by Boost team:
# Use the boost_1_72_0-msvc-14.1-64.exe for Windows 2016
$Url = "https://sourceforge.net/projects/boost/files/boost-binaries/1.72.0/boost_1_72_0-msvc-14.2-64.exe"
(New-Object System.Net.WebClient).DownloadFile($Url, "$env:TEMP\boost.exe")
Start-Process -Wait -FilePath "$env:TEMP\boost.exe" "/SILENT","/SP-","/SUPPRESSMSGBOXES","/DIR=C:\hostedtoolcache\windows\Boost\1.72.0\x86_64"
- Ubuntu:
- Install Boost 1.72.0 from releases of actions/boost-versions repository:
# Use the boost-1.72.0-linux-16.04-gcc-x64.tar.gz for Ubuntu 16.04
$url = "https://github.com/actions/boost-versions/releases/download/1.72.0-20200608.4/boost-1.72.0-linux-18.04-gcc-x64.tar.gz"
(New-Object System.Net.WebClient).DownloadFile($url, "/tmp/boost.tar.gz")
mkdir "/tmp/boost"
tar -xzf "/tmp/boost.tar.gz" -C "/tmp/boost"
Push-Location -Path "/tmp/boost"
Invoke-Expression "bash ./setup.sh"
The above code snippet will install Boost to the /opt/hostedtoolcache/boost/1.72.0/x64
folder.
- Use apt packages: https://www.osetc.com/en/how-to-install-boost-on-ubuntu-16-04-18-04-linux.html
- Use vcpkg + caching feature (the first build could take much time but consuming existing cache works really fast)
- macOS: install via
brew install boost
For anyone who uses a header-only boost and doesn't need to compile, the following will work on macOS/Linux/Windows. Courtesy of Mudlet.
env:
BOOST_ROOT: ${{github.workspace}}/3rdparty/boost
BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.bz2/download
steps:
- name: Restore Boost cache
uses: actions/cache@v2
id: cache-boost
with:
path: ${{env.BOOST_ROOT}}
key: boost
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: |
if [ "$OS" == "Windows_NT" ]; then
# fix up paths to be forward slashes consistently
BOOST_ROOT=$(echo $BOOST_ROOT | sed 's/\\/\//g')
fi
mkdir -p $BOOST_ROOT
curl --progress-bar --location --output $BOOST_ROOT/download.tar.bz2 $BOOST_URL
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar.bz2 -y -bd
7z -o$BOOST_ROOT x $BOOST_ROOT/download.tar -y -bd
cd $BOOST_ROOT && cp -r boost_*/* .
rm -rf boost_*/* download.tar.bz2 download.tar
shell: bash
Hi,
Since few minutes (?), my build that requires boost 1.72 has starting to fail because boost is not found anymore. Does anything change recently and make it unavailable 2 weeks before the announced breaking change?
The configure command use BOOST_ROOT_1_72_0
variable
cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$BOOST_ROOT_1_72_0 -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
This issue is present only with ubuntu-latest
environment (works well under Windows or Macos).
@mathbagu , no changes from our side yet.
somehow boost is still present on some windows environments and not others ? I had to guard the installation (version 1 of the proposed one ) against presence of the directory, to avoid random issues and failures on some builds.
| The file 'C:\hostedtoolcache\windows\boost\1.72.0\x86_64.complete' already exists.
cf https://github.com/simgrid/simgrid/runs/2087441243?check_suite_focus=true
edit: probably a propagation issue, it was launched on
Environment: windows-2019
Version: 20210219.1
while https://github.com/adegomme/simgrid/runs/2086527977?check_suite_focus=true which was launched before on my fork was running on
Environment: windows-2019
Version: 20210309.0
@adegomme you're right, it takes 3-4 days to propagate the new image version to all the environment. Sorry for the inconvenience
If you run your pipeline in Azure DevOps you may find this useful:
variables:
BOOST_ROOT: $(Pipeline.Workspace)\3rdparty\boost
BOOST_ROOT_1_72_0: $(Pipeline.Workspace)\3rdparty\boost
BOOST_URL: https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.zip/download
steps:
- task: PowerShell@2
displayName: Download Boost
inputs:
targetType: 'inline'
script: |
Write-Host "Downloading Boost to ${env:BOOST_ROOT}"
mkdir -p ${env:BOOST_ROOT}
$client = new-object System.Net.WebClient
$client.DownloadFile("${env:BOOST_URL}", "${env:BOOST_ROOT}\download.zip")
Write-Host " - Download complete..."
Add-Type -Assembly "System.IO.Compression.Filesystem"
[System.IO.Compression.ZipFile]::ExtractToDirectory("${env:BOOST_ROOT}\download.zip","${env:BOOST_ROOT}")
Write-Host " - Extract complete..."
cd ${env:BOOST_ROOT}
cp -r boost_*/* .
Although the variable BOOST_ROOT_1_72_0
isn't used in the task it is used in the build step of my solution - you may or may not require it.
I don't understand this decision. Boost is still very much used by a lot of C++ projects, and unless you are able to provide detailed statistics of each library's usage, saying one is less used than another is a bit imprudent.
This decision also makes Github Actions less desirable since now the onus of installing Boost goes to the maintainers, increasing build times and adding complexity.
It would be better to break down the images based on use-cases. E.g. Python stack, Ruby stack, C++ stack,etc. and let the maintainers pick which stack they prefer rather than bundling all the different libraries and runtimes into one big image.
@varunagrawal thanks for your proposal, we're also thinking about such a possibility, but, unfortunately, no ETA for now.
We've finished image deployments
Good
actions/boost-versions has been archived, but its README just says
This repository is deprecated and should no longer be used.
I would appreciate if the reason and alternative solutions are mentioned (or linked to this issue) in the description or README in the repository.