mirror of
https://github.com/actions/runner-images.git
synced 2025-12-29 05:17:11 +08:00
Merge branch 'v-mitim/add_ubuntu_20_to_ci' of https://github.com/miketimofeev/virtual-environments into v-mitim/add_ubuntu_20_to_ci
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: preparemetadata.sh
|
||||
## Desc: This script adds a image title information to the metadata
|
||||
## document
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
WriteItem "<!--- DO NOT EDIT - This markdown file is autogenerated. -->"
|
||||
AddTitle "$(lsb_release -ds)"
|
||||
WriteItem "The following software is installed on machines with the $IMAGE_VERSION update."
|
||||
WriteItem "***"
|
||||
@@ -1,13 +0,0 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: preparemetadata.sh
|
||||
## Desc: This script adds a image title information to the metadata
|
||||
## document
|
||||
################################################################################
|
||||
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
WriteItem "<!--- DO NOT EDIT - This markdown file is autogenerated. -->"
|
||||
AddTitle "$(lsb_release -ds)"
|
||||
WriteItem "The following software is installed on machines with the $IMAGE_VERSION update."
|
||||
WriteItem "***"
|
||||
@@ -50,11 +50,6 @@ echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \
|
||||
"platforms;android-26" \
|
||||
"platforms;android-25" \
|
||||
"platforms;android-24" \
|
||||
"platforms;android-23" \
|
||||
"platforms;android-22" \
|
||||
"platforms;android-21" \
|
||||
"platforms;android-19" \
|
||||
"platforms;android-17" \
|
||||
"build-tools;29.0.3" \
|
||||
"build-tools;29.0.2" \
|
||||
"build-tools;29.0.0" \
|
||||
@@ -78,14 +73,6 @@ echo "y" | ${ANDROID_SDK_ROOT}/tools/bin/sdkmanager \
|
||||
"build-tools;24.0.2" \
|
||||
"build-tools;24.0.1" \
|
||||
"build-tools;24.0.0" \
|
||||
"build-tools;23.0.3" \
|
||||
"build-tools;23.0.2" \
|
||||
"build-tools;23.0.1" \
|
||||
"build-tools;22.0.1" \
|
||||
"build-tools;21.1.2" \
|
||||
"build-tools;20.0.0" \
|
||||
"build-tools;19.1.0" \
|
||||
"build-tools;17.0.0" \
|
||||
"extras;android;m2repository" \
|
||||
"extras;google;m2repository" \
|
||||
"extras;google;google_play_services" \
|
||||
@@ -114,11 +101,6 @@ DocumentInstalledItem "Android SDK Platform 27"
|
||||
DocumentInstalledItem "Android SDK Platform 26"
|
||||
DocumentInstalledItem "Android SDK Platform 25"
|
||||
DocumentInstalledItem "Android SDK Platform 24"
|
||||
DocumentInstalledItem "Android SDK Platform 23"
|
||||
DocumentInstalledItem "Android SDK Platform 22"
|
||||
DocumentInstalledItem "Android SDK Platform 21"
|
||||
DocumentInstalledItem "Android SDK Platform 19"
|
||||
DocumentInstalledItem "Android SDK Platform 17"
|
||||
DocumentInstalledItem "Android SDK Patch Applier v4"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 29.0.3"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 29.0.2"
|
||||
@@ -143,12 +125,4 @@ DocumentInstalledItem "Android SDK Build-Tools 24.0.3"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 24.0.2"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 24.0.1"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 24.0.0"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 23.0.3"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 23.0.2"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 23.0.1"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 22.0.1"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 21.1.2"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 20.0.0"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 19.1.0"
|
||||
DocumentInstalledItem "Android SDK Build-Tools 17.0.0"
|
||||
DocumentInstalledItem "Android NDK $(cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | cut -d ' ' -f 3)"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# Source the helpers for use with the script
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
source $HELPER_SCRIPTS/apt.sh
|
||||
source $HELPER_SCRIPTS/os.sh
|
||||
|
||||
# Install Herbert V. Riedel's PPA for managing multiple version of ghc on ubuntu.
|
||||
# https://launchpad.net/~hvr/+archive/ubuntu/ghc
|
||||
@@ -15,16 +15,42 @@ add-apt-repository -y ppa:hvr/ghc
|
||||
apt-get update
|
||||
|
||||
# Install various versions of ghc and cabal
|
||||
apt-get install -y \
|
||||
ghc-8.0.2 \
|
||||
ghc-8.2.2 \
|
||||
ghc-8.4.4 \
|
||||
ghc-8.6.5 \
|
||||
ghc-8.8.3 \
|
||||
ghc-8.10.1 \
|
||||
cabal-install-2.4 \
|
||||
cabal-install-3.0 \
|
||||
cabal-install-3.2
|
||||
if isUbuntu20 ; then
|
||||
apt-get install -y \
|
||||
ghc-8.6.5 \
|
||||
ghc-8.8.3 \
|
||||
ghc-8.10.1 \
|
||||
cabal-install-2.4 \
|
||||
cabal-install-3.0 \
|
||||
cabal-install-3.2
|
||||
|
||||
ghcVersions="8.6.5 8.8.3 8.10.1"
|
||||
cabalVersions="2.4 3.0 3.2"
|
||||
fi
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
# Install various versions of ghc and cabal
|
||||
apt-get install -y \
|
||||
ghc-8.0.2 \
|
||||
ghc-8.2.2 \
|
||||
ghc-8.4.4 \
|
||||
ghc-8.6.2 \
|
||||
ghc-8.6.3 \
|
||||
ghc-8.6.4 \
|
||||
ghc-8.6.5 \
|
||||
ghc-8.8.1 \
|
||||
ghc-8.8.2 \
|
||||
ghc-8.8.3 \
|
||||
ghc-8.10.1 \
|
||||
cabal-install-2.0 \
|
||||
cabal-install-2.2 \
|
||||
cabal-install-2.4 \
|
||||
cabal-install-3.0 \
|
||||
cabal-install-3.2
|
||||
|
||||
ghcVersions="8.0.2 8.2.2 8.4.4 8.6.2 8.6.3 8.6.4 8.6.5 8.8.1 8.8.2 8.8.3 8.10.1"
|
||||
cabalVersions="2.0 2.2 2.4 3.0 3.2"
|
||||
fi
|
||||
|
||||
# Install the latest stable release of haskell stack
|
||||
curl -sSL https://get.haskellstack.org/ | sh
|
||||
@@ -32,14 +58,14 @@ curl -sSL https://get.haskellstack.org/ | sh
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
# Check all ghc versions
|
||||
for version in 8.0.2 8.2.2 8.4.4 8.6.5 8.8.3 8.10.1; do
|
||||
for version in $ghcVersions; do
|
||||
if ! command -v /opt/ghc/$version/bin/ghc; then
|
||||
echo "ghc $version was not installed"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
# Check all cabal versions
|
||||
for version in 2.4 3.0 3.2; do
|
||||
for version in $cabalVersions; do
|
||||
if ! command -v /opt/cabal/$version/bin/cabal; then
|
||||
echo "cabal $version was not installed"
|
||||
exit 1
|
||||
@@ -52,10 +78,10 @@ fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
for version in 2.4 3.0 3.2; do
|
||||
for version in $cabalVersions; do
|
||||
DocumentInstalledItem "Haskell Cabal ($(/opt/cabal/$version/bin/cabal --version))"
|
||||
done
|
||||
for version in 8.0.2 8.2.2 8.4.4 8.6.5 8.8.3 8.10.1; do
|
||||
for version in $ghcVersions; do
|
||||
DocumentInstalledItem "GHC ($(/opt/ghc/$version/bin/ghc --version))"
|
||||
done
|
||||
DocumentInstalledItem "Haskell Stack ($(stack --version))"
|
||||
|
||||
@@ -8,7 +8,13 @@
|
||||
source $HELPER_SCRIPTS/document.sh
|
||||
|
||||
# Install Powershell
|
||||
snap install powershell --classic --channel=edge/useedge
|
||||
if isUbuntu20 ; then
|
||||
snap install powershell --classic --channel=edge/useedge
|
||||
fi
|
||||
|
||||
if isUbuntu16 || isUbuntu18 ; then
|
||||
apt-get install -y powershell
|
||||
fi
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
|
||||
@@ -6,6 +6,10 @@ os_name=$(lsb_release -ds | sed "s/ /\\\n/g")
|
||||
image_label="ubuntu-$(lsb_release -rs)"
|
||||
github_url="https://github.com/actions/virtual-environments/blob"
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-20" ]]; then
|
||||
software_url="${github_url}/ubuntu20/${image_version}/images/linux/Ubuntu2004-README.md"
|
||||
fi
|
||||
|
||||
if [[ "$image_label" =~ "ubuntu-18" ]]; then
|
||||
software_url="${github_url}/ubuntu18/${image_version}/images/linux/Ubuntu1804-README.md"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user