mirror of
https://github.com/actions/runner-images.git
synced 2025-12-14 13:17:54 +00:00
added swift support
This commit is contained in:
24
images/linux/scripts/installers/swift.sh
Normal file
24
images/linux/scripts/installers/swift.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
################################################################################
|
||||
## File: swift.sh
|
||||
## Desc: Installs Swift
|
||||
################################################################################
|
||||
|
||||
# Install # Install
|
||||
image_label="$(lsb_release -rs)"
|
||||
wget https://swift.org/builds/swift-5.1.5-release/ubuntu${image_label//./}/swift-5.1.5-RELEASE/swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz
|
||||
tar xzf swift-5.1.5-RELEASE-ubuntu$image_label.tar.gz
|
||||
sudo mv swift-5.1.5-RELEASE-ubuntu$image_label /usr/share/swift
|
||||
sudo echo "PATH=/usr/share/swift/usr/bin:$PATH" | sudo tee -a /etc/environment
|
||||
source ~/.bashrc
|
||||
|
||||
# Run tests to determine that the software installed as expected
|
||||
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
||||
if ! command -v swift; then
|
||||
echo "Swift was not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Document what was added to the image
|
||||
echo "Lastly, documenting what we added to the metadata file"
|
||||
DocumentInstalledItem "$(swift --version)"
|
||||
Reference in New Issue
Block a user