From c490c48a56ab6de9b46fae1ab8780e2109e95d64 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 20 May 2021 12:42:52 +0300 Subject: [PATCH 1/3] CI changes: remove benchmarks stages, test on new versions of swift, switch to ubuntu-18.04, don't publish prebuilt binary archives on github --- .travis.yml | 162 +++++++++++++++++++++++++--------------------------- 1 file changed, 78 insertions(+), 84 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5905a64..91cb2ad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ jobs: os: osx osx_image: xcode10.1 # Swift 4.2 script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. @@ -14,180 +15,173 @@ jobs: os: osx osx_image: xcode10.3 # Swift 5.0 script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. + - xcodebuild -version + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=OS X" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=iOS Simulator,name=iPhone 8" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm" clean build + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=tvOS Simulator,name=Apple TV" clean test - stage: test language: swift os: osx osx_image: xcode11.3 # Swift 5.1 script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. + - xcodebuild -version + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=OS X" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=iOS Simulator,name=iPhone 8" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm" clean build + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=tvOS Simulator,name=Apple TV" clean test - stage: test language: swift os: osx osx_image: xcode11.4 # Swift 5.2 script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. + - xcodebuild -version + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=OS X" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=iOS Simulator,name=iPhone 8" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=watchOS Simulator,name=Apple Watch Series 4 - 44mm" clean build + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=tvOS Simulator,name=Apple TV" clean test - stage: test - language: generic - os: linux - dist: xenial - env: - - SWIFT_VERSION=4.2 - install: - - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" + language: swift + os: osx + osx_image: xcode12.4 # Swift 5.3.2 script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. + - xcodebuild -version + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=OS X" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=iOS Simulator,name=iPhone 8" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=watchOS Simulator,name=Apple Watch Series 6 - 44mm" clean build + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=tvOS Simulator,name=Apple TV" clean test - stage: test - language: generic - os: linux - dist: xenial - env: - - SWIFT_VERSION=5.0 - install: - - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" + language: swift + os: osx + osx_image: xcode12.5 # Swift 5.4 script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. + - xcodebuild -version + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=OS X" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=iOS Simulator,name=iPhone 8" clean test + # Since Xcode 12.5 watchos supports testing. + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=watchOS Simulator,name=Apple Watch Series 6 - 44mm" clean test + - xcodebuild -quiet -project BitByteData.xcodeproj -scheme BitByteData -destination "platform=tvOS Simulator,name=Apple TV" clean test - stage: test language: generic os: linux - dist: xenial + dist: bionic env: - - SWIFT_VERSION=5.1 + - SWIFT_VERSION=4.2.3 install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. - stage: test language: generic os: linux - dist: xenial + dist: bionic env: - - SWIFT_VERSION=5.2 + - SWIFT_VERSION=5.0.3 install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: + - swift --version - swift build - swift test --filter BitByteDataTests - swift build -c release # Check Release build just in case. - - stage: benchmark - language: swift - os: osx - osx_image: xcode10.1 # Swift 4.2 - script: - - ./benchmarks.py run - - stage: benchmark - language: swift - os: osx - osx_image: xcode10.3 # Swift 5.0 - script: - - ./benchmarks.py run - - stage: benchmark - language: swift - os: osx - osx_image: xcode11.3 # Swift 5.1 - script: - - ./benchmarks.py run - - stage: benchmark - language: swift - os: osx - osx_image: xcode11.4 # Swift 5.2 - script: - - ./benchmarks.py run - - stage: benchmark - if: NOT (tag IS present) + - stage: test language: generic os: linux - dist: xenial + dist: bionic env: - - SWIFT_VERSION=4.2 + - SWIFT_VERSION=5.1.5 install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: - - ./benchmarks.py run - - stage: benchmark - if: NOT (tag IS present) + - swift --version + - swift build + - swift test --filter BitByteDataTests + - swift build -c release # Check Release build just in case. + - stage: test language: generic os: linux - dist: xenial + dist: bionic env: - - SWIFT_VERSION=5.0 + - SWIFT_VERSION=5.2.5 install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: - - ./benchmarks.py run - - stage: benchmark - if: NOT (tag IS present) + - swift --version + - swift build + - swift test --filter BitByteDataTests + - swift build -c release # Check Release build just in case. + - stage: test language: generic os: linux - dist: xenial + dist: bionic env: - - SWIFT_VERSION=5.1 + - SWIFT_VERSION=5.3.3 install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: - - ./benchmarks.py run - - stage: benchmark - if: NOT (tag IS present) + - swift --version + - swift build + - swift test --filter BitByteDataTests + - swift build -c release # Check Release build just in case. + - stage: test language: generic os: linux - dist: xenial + dist: bionic env: - - SWIFT_VERSION=5.2 + - SWIFT_VERSION=5.4 install: - eval "$(curl -sL https://swiftenv.fuller.li/install.sh)" script: - - ./benchmarks.py run + - swift --version + - swift build + - swift test --filter BitByteDataTests + - swift build -c release # Check Release build just in case. - stage: deploy - if: tag IS present + # Don't deploy if it is a test release. + if: (tag IS present) AND (tag =~ /^\d+\.\d+\.\d+$/) language: generic os: osx - osx_image: xcode11.4 + osx_image: xcode12 env: secure: fmKQgrPRx2iisNPzxDhOTfXPsnQMJxDgIMItVNjl1AKByraOpiDAGVESySvy+vwQqITCB/BfvdkW7smAPcvFJxIPRx1v4J0VY9kGHdnafMw35XY0Vj9soYkzNS4zrUebxY2gWkGM6Q6dgLOGT/9MSEyWqXBTtVz9sLwA7yr3ZI72yZDbcSz3XGa1fFZRVfwv3I+bmuozG7dq7tyqcSKgRZnHg1VvaRdxcaGqSGSUsNu0YLzmNedujNcU+gTXcxMdrXA1eaheHc2pwNA0TDf3KkefJpaVMXrA/Un8e9MaJ1lMnPlIiEI3dPTuogtQY7p59vgulBNBPEJovTHI0jCaNyLUkTkHgGcUuOwHqwUIKZCEiiqM1j12sdLo4O2tAdNaNHDtd8D3bCakrdJxXlUWVfjrCwvBB555gd0drRirQgYX+5gGFwnTQE8tOcjK4qUvJaOAouHsnm/DmW+fLJPX76KoU6QOtGJt6PQ92yBgKRhaSg/sQ28WPuCmF2p7BuUSuULxcM2LU5eA5aFxayoZvR2E9uvfFxnFh01iV6clcZo25U03AuxJmuI7Mhl83amj8bm5CRBbuRw5sIljXfBujFUel+kz/HXalS7lStqH9iPyiQvh24WkPzHKNQdjRI7v3kyrVSXJ3Xl6+fopXqr/25MwqD4bt57QgglJ2IQtnLM= addons: homebrew: packages: - - carthage - sourcekitten update: true install: - gem install -N jazzy - gem update -N cocoapods before_deploy: - - > - if ! [ "$BEFORE_DEPLOY_RUN" ]; then - export BEFORE_DEPLOY_RUN=1; - # Build Carthage archive. - carthage build --no-skip-current - carthage archive BitByteData - # Generate documentation. - sourcekitten doc --spm-module BitByteData > docs.json - jazzy - fi + - sourcekitten doc --spm --module-name BitByteData > docs.json + - jazzy deploy: - - provider: releases - skip_cleanup: true - api_key: $GITHUB_TOKEN - file: "BitByteData.framework.zip" - on: - tags: true - provider: pages - skip_cleanup: true github_token: $GITHUB_TOKEN local_dir: docs + skip_cleanup: true on: tags: true - # Don't upload documentation if it is a test release. - condition: $(git describe) != *"test"* From 84402bc44f429dbb021e8e3bd3a8c1e86a29b1a7 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 20 May 2021 12:44:07 +0300 Subject: [PATCH 2/3] Fix a warning about deprecated class keyword in BitReader protocol --- Sources/BitReader.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/BitReader.swift b/Sources/BitReader.swift index a6bd420..46a472b 100644 --- a/Sources/BitReader.swift +++ b/Sources/BitReader.swift @@ -6,7 +6,7 @@ import Foundation /// A type that contains functions for reading `Data` bit-by-bit and byte-by-byte. -public protocol BitReader: class { +public protocol BitReader: AnyObject { /// True, if reader's BIT pointer is aligned with the BYTE border. var isAligned: Bool { get } From 726ce38d0a7807d5f9cb9b44acb61d0585877951 Mon Sep 17 00:00:00 2001 From: Timofey Solomko Date: Thu, 20 May 2021 13:18:39 +0300 Subject: [PATCH 3/3] Prepare for 1.4.4 release --- .jazzy.yaml | 4 ++-- BitByteData.podspec | 2 +- BitByteData.xcodeproj/BitByteData.plist | 4 ++-- BitByteData.xcodeproj/BitByteDataBenchmarks.plist | 4 ++-- BitByteData.xcodeproj/TestBitByteData.plist | 4 ++-- BitByteData.xcodeproj/project.pbxproj | 8 ++++---- CHANGELOG.md | 4 ++++ 7 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.jazzy.yaml b/.jazzy.yaml index bb596ba..343682f 100644 --- a/.jazzy.yaml +++ b/.jazzy.yaml @@ -3,11 +3,11 @@ sourcekitten_sourcefile: docs.json clean: true author: Timofey Solomko module: BitByteData -module_version: 1.4.3 +module_version: 1.4.4 copyright: '© 2020 Timofey Solomko' readme: README.md github_url: https://github.com/tsolomko/BitByteData -github_file_prefix: https://github.com/tsolomko/BitByteData/tree/1.4.3 +github_file_prefix: https://github.com/tsolomko/BitByteData/tree/1.4.4 theme: fullwidth custom_categories: diff --git a/BitByteData.podspec b/BitByteData.podspec index 98d2276..95fc2ef 100644 --- a/BitByteData.podspec +++ b/BitByteData.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "BitByteData" - s.version = "1.4.3" + s.version = "1.4.4" s.summary = "Read and write bits and bytes in Swift." s.description = "A Swift framework with classes for reading and writing bits and bytes." diff --git a/BitByteData.xcodeproj/BitByteData.plist b/BitByteData.xcodeproj/BitByteData.plist index 389a74f..d459a79 100644 --- a/BitByteData.xcodeproj/BitByteData.plist +++ b/BitByteData.xcodeproj/BitByteData.plist @@ -15,9 +15,9 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.4.3 + 1.4.4 CFBundleVersion - 22 + 23 NSHumanReadableCopyright Copyright © 2020 Timofey Solomko. All rights reserved. diff --git a/BitByteData.xcodeproj/BitByteDataBenchmarks.plist b/BitByteData.xcodeproj/BitByteDataBenchmarks.plist index 5b3c84d..6b11fff 100644 --- a/BitByteData.xcodeproj/BitByteDataBenchmarks.plist +++ b/BitByteData.xcodeproj/BitByteDataBenchmarks.plist @@ -15,8 +15,8 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.4.3 + 1.4.4 CFBundleVersion - 22 + 23 diff --git a/BitByteData.xcodeproj/TestBitByteData.plist b/BitByteData.xcodeproj/TestBitByteData.plist index 28795c9..e593d3c 100644 --- a/BitByteData.xcodeproj/TestBitByteData.plist +++ b/BitByteData.xcodeproj/TestBitByteData.plist @@ -15,8 +15,8 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 1.4.3 + 1.4.4 CFBundleVersion - 22 + 23 diff --git a/BitByteData.xcodeproj/project.pbxproj b/BitByteData.xcodeproj/project.pbxproj index 51a2690..c071d54 100644 --- a/BitByteData.xcodeproj/project.pbxproj +++ b/BitByteData.xcodeproj/project.pbxproj @@ -376,7 +376,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; @@ -424,7 +424,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CURRENT_PROJECT_VERSION = 22; + CURRENT_PROJECT_VERSION = 23; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; @@ -454,7 +454,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 22; + DYLIB_CURRENT_VERSION = 23; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = BitByteData.xcodeproj/BitByteData.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -478,7 +478,7 @@ APPLICATION_EXTENSION_API_ONLY = YES; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 22; + DYLIB_CURRENT_VERSION = 23; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = BitByteData.xcodeproj/BitByteData.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/CHANGELOG.md b/CHANGELOG.md index c8aa3a2..6b90500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## 1.4.4 + +- Fixed a compilation warning about "deprecated class keyword" appearing when using Swift 5.4. + ## 1.4.3 - Fixed incompatibility with Swift Package Manager from Swift 4.2.