mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Merge pull request #2883 from pre-commit/install-swift-not-needed
swift is included in github actions
This commit is contained in:
commit
f5a98eb152
2 changed files with 0 additions and 31 deletions
2
.github/workflows/languages.yaml
vendored
2
.github/workflows/languages.yaml
vendored
|
|
@ -63,8 +63,6 @@ jobs:
|
||||||
echo 'C:\Strawberry\c\bin' >> "$GITHUB_PATH"
|
echo 'C:\Strawberry\c\bin' >> "$GITHUB_PATH"
|
||||||
shell: bash
|
shell: bash
|
||||||
if: matrix.os == 'windows-latest' && matrix.language == 'perl'
|
if: matrix.os == 'windows-latest' && matrix.language == 'perl'
|
||||||
- run: testing/get-swift.sh
|
|
||||||
if: matrix.os == 'ubuntu-latest' && matrix.language == 'swift'
|
|
||||||
|
|
||||||
- name: install deps
|
- name: install deps
|
||||||
run: python -mpip install -e . -r requirements-dev.txt
|
run: python -mpip install -e . -r requirements-dev.txt
|
||||||
|
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
# This is a script used in CI to install swift
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
. /etc/lsb-release
|
|
||||||
if [ "$DISTRIB_CODENAME" = "jammy" ]; then
|
|
||||||
SWIFT_URL='https://download.swift.org/swift-5.7.1-release/ubuntu2204/swift-5.7.1-RELEASE/swift-5.7.1-RELEASE-ubuntu22.04.tar.gz'
|
|
||||||
SWIFT_HASH='7f60291f5088d3e77b0c2364beaabd29616ee7b37260b7b06bdbeb891a7fe161'
|
|
||||||
else
|
|
||||||
echo "unknown dist: ${DISTRIB_CODENAME}" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
check() {
|
|
||||||
echo "$SWIFT_HASH $TGZ" | sha256sum --check
|
|
||||||
}
|
|
||||||
|
|
||||||
TGZ="$HOME/.swift/swift.tar.gz"
|
|
||||||
mkdir -p "$(dirname "$TGZ")"
|
|
||||||
if ! check >& /dev/null; then
|
|
||||||
rm -f "$TGZ"
|
|
||||||
curl --location --silent --output "$TGZ" "$SWIFT_URL"
|
|
||||||
check
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p /tmp/swift
|
|
||||||
tar -xf "$TGZ" --strip 1 --directory /tmp/swift
|
|
||||||
|
|
||||||
echo '/tmp/swift/usr/bin' >> "$GITHUB_PATH"
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue