mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
[Ubuntu] Remove workaround for vcpkg (#728)
* remove workaround * add workaround for ubuntu 16 * remove sudo * Spelling * remove extra lines
This commit is contained in:
@@ -6,22 +6,30 @@
|
|||||||
|
|
||||||
# Source the helpers for use with the script
|
# Source the helpers for use with the script
|
||||||
source $HELPER_SCRIPTS/document.sh
|
source $HELPER_SCRIPTS/document.sh
|
||||||
|
source $HELPER_SCRIPTS/os.sh
|
||||||
|
|
||||||
# Set env variable for vcpkg
|
# Set env variable for vcpkg
|
||||||
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
|
VCPKG_INSTALLATION_ROOT=/usr/local/share/vcpkg
|
||||||
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environment
|
echo "VCPKG_INSTALLATION_ROOT=${VCPKG_INSTALLATION_ROOT}" | tee -a /etc/environment
|
||||||
|
|
||||||
# Install vcpkg
|
# Install vcpkg
|
||||||
git clone https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT
|
git clone --depth=1 https://github.com/Microsoft/vcpkg $VCPKG_INSTALLATION_ROOT
|
||||||
# Workaround to avoid issues caused by this PR https://github.com/microsoft/vcpkg/pull/10834
|
|
||||||
cd $VCPKG_INSTALLATION_ROOT
|
# vcpkg requires g++ version 7+, yet Ubuntu 16 default is 5.4. Set version 7 as default temporarily
|
||||||
git checkout 1e19af09e53e5f306ed89c2033817a21e5ee0bcf
|
if isUbuntu16; then
|
||||||
|
ln -sf g++-7 /usr/bin/g++
|
||||||
|
fi
|
||||||
|
|
||||||
$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh
|
$VCPKG_INSTALLATION_ROOT/bootstrap-vcpkg.sh
|
||||||
$VCPKG_INSTALLATION_ROOT/vcpkg integrate install
|
$VCPKG_INSTALLATION_ROOT/vcpkg integrate install
|
||||||
chmod 0777 -R $VCPKG_INSTALLATION_ROOT
|
chmod 0777 -R $VCPKG_INSTALLATION_ROOT
|
||||||
ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin
|
ln -sf $VCPKG_INSTALLATION_ROOT/vcpkg /usr/local/bin
|
||||||
|
|
||||||
|
# Set back g++ 5.4 as default
|
||||||
|
if isUbuntu16; then
|
||||||
|
ln -sf g++-5 /usr/bin/g++
|
||||||
|
fi
|
||||||
|
|
||||||
# Run tests to determine that the software installed as expected
|
# Run tests to determine that the software installed as expected
|
||||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||||
if ! command -v vcpkg; then
|
if ! command -v vcpkg; then
|
||||||
|
|||||||
Reference in New Issue
Block a user