From bbe53bbc750824717545778fae14fb676d81460d Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Wed, 8 Nov 2023 15:55:05 -0800 Subject: [PATCH 1/3] Delete needless import --- Sources/Half/Functions.swift | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Sources/Half/Functions.swift b/Sources/Half/Functions.swift index a073c4d..58c55bd 100644 --- a/Sources/Half/Functions.swift +++ b/Sources/Half/Functions.swift @@ -5,12 +5,6 @@ // Copyright © 2022 SomeRandomiOSDev. All rights reserved. // -#if os(Linux) -import Glibc -#else -import Darwin -#endif - // Implmentation of public functions found in swift/stdlib/public/Platform for Half precision. // // For the sake of simplicity, we'll implement these functions by casting up the From 411194e2330c03c85ce27151487982c96877495f Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 13 Nov 2023 10:59:23 -0800 Subject: [PATCH 2/3] Don't swallow errors in CI and scripts --- .github/CONTRIBUTORS.md | 4 +--- .github/workflows/carthage.yml | 3 +++ .github/workflows/cocoapods.yml | 3 +++ .github/workflows/documentation.yml | 3 +++ .github/workflows/publish-cocoapods.yml | 3 +++ .github/workflows/swift-package.yml | 3 +++ .github/workflows/swiftlint.yml | 3 +++ .github/workflows/upload-assets.yml | 3 +++ .github/workflows/xcframework.yml | 3 +++ .github/workflows/xcodebuild.yml | 5 ++++- Sources/Half/Functions.swift | 6 ++++++ scripts/carthage.sh | 6 +++--- scripts/findproject.sh | 2 +- scripts/printformat.sh | 2 +- scripts/resolvepath.sh | 2 +- scripts/versions.sh | 2 +- scripts/xcframework.sh | 2 +- 17 files changed, 43 insertions(+), 12 deletions(-) diff --git a/.github/CONTRIBUTORS.md b/.github/CONTRIBUTORS.md index 48e129e..f3d4f1d 100644 --- a/.github/CONTRIBUTORS.md +++ b/.github/CONTRIBUTORS.md @@ -4,9 +4,7 @@ I would like to give a special thanks to all of the people below who have contributed to this project and to all of those who will contribute to it moving forward. -> None so far; you could be the first! See the section below on how to contribute. -> -> To the first person contributing to this project, please remove this block and replace it with your information using the following format: `- [Your Name](https://github.com/YourGitHubUsername)` +- [Dave Abrahams](https://github.com/dabrahams) ## I would like to join this list! How can I help the project? diff --git a/.github/workflows/carthage.yml b/.github/workflows/carthage.yml index f96146e..f0fb16c 100644 --- a/.github/workflows/carthage.yml +++ b/.github/workflows/carthage.yml @@ -1,4 +1,7 @@ name: Carthage +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/.github/workflows/cocoapods.yml b/.github/workflows/cocoapods.yml index 12208e1..a93532e 100644 --- a/.github/workflows/cocoapods.yml +++ b/.github/workflows/cocoapods.yml @@ -1,4 +1,7 @@ name: Cocoapods +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 05c3002..49fee0a 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -1,4 +1,7 @@ name: Documentation +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/.github/workflows/publish-cocoapods.yml b/.github/workflows/publish-cocoapods.yml index b19469f..bbc9cd6 100644 --- a/.github/workflows/publish-cocoapods.yml +++ b/.github/workflows/publish-cocoapods.yml @@ -1,4 +1,7 @@ name: Publish CocoaPods +defaults: + run: + shell: bash -eo pipefail {0} on: release: types: [published] diff --git a/.github/workflows/swift-package.yml b/.github/workflows/swift-package.yml index 07b96b0..4ada578 100644 --- a/.github/workflows/swift-package.yml +++ b/.github/workflows/swift-package.yml @@ -1,4 +1,7 @@ name: Swift Package +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/.github/workflows/swiftlint.yml b/.github/workflows/swiftlint.yml index 109111a..1116ede 100644 --- a/.github/workflows/swiftlint.yml +++ b/.github/workflows/swiftlint.yml @@ -1,4 +1,7 @@ name: SwiftLint +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/.github/workflows/upload-assets.yml b/.github/workflows/upload-assets.yml index d32bce5..451488e 100644 --- a/.github/workflows/upload-assets.yml +++ b/.github/workflows/upload-assets.yml @@ -1,4 +1,7 @@ name: Upload Assets +defaults: + run: + shell: bash -eo pipefail {0} on: release: types: [published] diff --git a/.github/workflows/xcframework.yml b/.github/workflows/xcframework.yml index fa04499..60a5e24 100644 --- a/.github/workflows/xcframework.yml +++ b/.github/workflows/xcframework.yml @@ -1,4 +1,7 @@ name: XCFramework +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml index 5f538a7..3935da5 100644 --- a/.github/workflows/xcodebuild.yml +++ b/.github/workflows/xcodebuild.yml @@ -1,4 +1,7 @@ -name: Xcode Project + : Xcode Project +defaults: + run: + shell: bash -eo pipefail {0} on: workflow_dispatch: push: diff --git a/Sources/Half/Functions.swift b/Sources/Half/Functions.swift index 58c55bd..a073c4d 100644 --- a/Sources/Half/Functions.swift +++ b/Sources/Half/Functions.swift @@ -5,6 +5,12 @@ // Copyright © 2022 SomeRandomiOSDev. All rights reserved. // +#if os(Linux) +import Glibc +#else +import Darwin +#endif + // Implmentation of public functions found in swift/stdlib/public/Platform for Half precision. // // For the sake of simplicity, we'll implement these functions by casting up the diff --git a/scripts/carthage.sh b/scripts/carthage.sh index 9e9811c..00e08cf 100755 --- a/scripts/carthage.sh +++ b/scripts/carthage.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -e -o pipefail # # carthage.sh # Copyright © 2022 SomeRandomiOSDev. All rights reserved. @@ -8,9 +8,9 @@ # Needed to circumvent an issue with Carthage version < 0.37.0: https://github.com/Carthage/Carthage/issues/3019 VERSION="$(carthage version)" -"$(dirname "$0")/versions.sh" "$VERSION" "0.37.0" +comparison=$("$(dirname "$0")/versions.sh" "$VERSION" "0.37.0"; echo $?) -if [ $? -ge 0 ]; then +if [ "$comparison" -ge 0 ]; then # Carthage version is greater than or equal to 0.37.0 meaning we can use the --use-xcframeworks flag carthage "$@" --use-xcframeworks else diff --git a/scripts/findproject.sh b/scripts/findproject.sh index 782a48c..d513bc2 100755 --- a/scripts/findproject.sh +++ b/scripts/findproject.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -e -o pipefail # # findproject.sh # Copyright © 2022 SomeRandomiOSDev. All rights reserved. diff --git a/scripts/printformat.sh b/scripts/printformat.sh index f8c201e..04923a0 100755 --- a/scripts/printformat.sh +++ b/scripts/printformat.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -e -o pipefail # # printformat.sh # Copyright © 2022 SomeRandomiOSDev. All rights reserved. diff --git a/scripts/resolvepath.sh b/scripts/resolvepath.sh index 36630fc..cf7d954 100755 --- a/scripts/resolvepath.sh +++ b/scripts/resolvepath.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -e -o pipefail # # resolvepath.sh # Copyright © 2022 SomeRandomiOSDev. All rights reserved. diff --git a/scripts/versions.sh b/scripts/versions.sh index 8892134..c6fdccf 100755 --- a/scripts/versions.sh +++ b/scripts/versions.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -e -o pipefail # # versions.sh # Copyright © 2022 SomeRandomiOSDev. All rights reserved. diff --git a/scripts/xcframework.sh b/scripts/xcframework.sh index 921d08d..c53e56b 100755 --- a/scripts/xcframework.sh +++ b/scripts/xcframework.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env bash -e -o pipefail # # xcframework.sh # Copyright © 2022 SomeRandomiOSDev. All rights reserved. From 6c21c01d99936901305faaf8b40254b5520bf1c6 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Mon, 13 Nov 2023 11:35:04 -0800 Subject: [PATCH 3/3] typo --- .github/workflows/xcodebuild.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/xcodebuild.yml b/.github/workflows/xcodebuild.yml index 3935da5..59d0ef9 100644 --- a/.github/workflows/xcodebuild.yml +++ b/.github/workflows/xcodebuild.yml @@ -1,4 +1,4 @@ - : Xcode Project +name: Xcode Project defaults: run: shell: bash -eo pipefail {0}