From e544cd568ed38766aff72ab81103e8caf60edd86 Mon Sep 17 00:00:00 2001 From: Adam Fowler Date: Tue, 21 Sep 2021 10:49:25 +0100 Subject: [PATCH] Updates from Package update --- .github/workflows/ci.yml | 9 +++++++-- .github/workflows/nightly.yml | 4 ++-- .github/workflows/sanity.yml | 2 +- CONTRIBUTING.md | 4 ++-- Dockerfile | 7 +++++-- scripts/sanity.sh | 6 +++--- 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fab131b..02ad179 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,12 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: ['swift:5.3-bionic', 'swift:5.3-focal', 'swift:5.3-amazonlinux2', 'swift:5.3-centos8'] + image: + - 'swift:5.4-bionic' + - 'swift:5.4-focal' + - 'swift:5.4-amazonlinux2' + - 'swift:5.4-centos8' + - 'swiftlang/swift:nightly-5.5-focal' container: image: ${{ matrix.image }} @@ -44,7 +49,7 @@ jobs: uses: actions/checkout@v2 - name: Test run: | - swift test --enable-test-discovery --enable-code-coverage --sanitize=thread + swift test --enable-test-discovery --enable-code-coverage - name: Convert coverage files run: | llvm-cov export -format="lcov" \ diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7f1632e..8401d71 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - image: ['nightly-5.4-bionic', 'nightly-5.4-focal', 'nightly-5.4-centos8', 'nightly-5.4-amazonlinux2'] + image: ['nightly-bionic', 'nightly-focal', 'nightly-centos8', 'nightly-amazonlinux2'] container: image: swiftlang/swift:${{ matrix.image }} @@ -26,4 +26,4 @@ jobs: uses: actions/checkout@v2 - name: Test run: | - swift test --enable-test-discovery --sanitize=thread + swift test --enable-test-discovery diff --git a/.github/workflows/sanity.yml b/.github/workflows/sanity.yml index 6bcdf0e..0f7c7f2 100644 --- a/.github/workflows/sanity.yml +++ b/.github/workflows/sanity.yml @@ -16,6 +16,6 @@ jobs: - name: Install Dependencies run: | brew install mint - mint install NickLockwood/SwiftFormat@0.47.4 --no-link + mint install NickLockwood/SwiftFormat@0.47.13 --no-link - name: run script run: ./scripts/sanity.sh diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5689bd7..49baa5e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,8 +26,8 @@ Remember the requirements for Hummingbird and HummingbirdCore (No Foundation and Please keep your PRs to a minimal number of changes. If a PR is large try to split it up into smaller PRs. Don't move code around unnecessarily it makes comparing old with new very hard. -The main development branch of the repository is `main`. +The main development branch of the repository is `main`. ### Formatting -We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.47.4. +We use Nick Lockwood's SwiftFormat for formatting code. PRs will not be accepted if they haven't be formatted. The current version of SwiftFormat we are using is v0.47.13. diff --git a/Dockerfile b/Dockerfile index 72ca5a6..cce40b6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,7 @@ -FROM swift:5.3-focal +# ================================ +# Build image +# ================================ +FROM swift:5.4 as build WORKDIR /build @@ -12,4 +15,4 @@ RUN swift package resolve # Copy entire repo into container COPY . . -RUN swift test --sanitize=thread --enable-test-discovery +RUN swift test --enable-test-discovery --sanitize=thread diff --git a/scripts/sanity.sh b/scripts/sanity.sh index 07074e1..eb90324 100755 --- a/scripts/sanity.sh +++ b/scripts/sanity.sh @@ -13,7 +13,7 @@ ## ##===----------------------------------------------------------------------===## -SWIFT_VERSION=5.1 +SWIFT_FORMAT_VERSION=0.47.13 set -eu here="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" @@ -28,8 +28,8 @@ function replace_acceptable_years() { printf "=> Checking format... " FIRST_OUT="$(git status --porcelain)" if [[ -n "${CI-""}" ]]; then - printf "(using v$(mint run NickLockwood/SwiftFormat@0.47.4 --version)) " - mint run NickLockwood/SwiftFormat@0.47.4 . > /dev/null 2>&1 + printf "(using v$(mint run NickLockwood/SwiftFormat@"$SWIFT_FORMAT_VERSION" --version)) " + mint run NickLockwood/SwiftFormat@"$SWIFT_FORMAT_VERSION" . > /dev/null 2>&1 else printf "(using v$(swiftformat --version)) " swiftformat . > /dev/null 2>&1