diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8c13e6775..b85ea52e5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,7 +14,6 @@ jobs: uses: actions/checkout@v1 - name: Xcode Version run: | - sudo xcode-select -s /Applications/Xcode_12.app xcodebuild -version swift --version - name: Swift Version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index b728fe01c..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Release - -on: - release: - -jobs: -# Build XCFramework - xcframework: - name: XCFramework - runs-on: macos-latest - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Xcode Version - run: | - sudo xcode-select -s /Applications/Xcode_12.app - xcodebuild -version - swift --version - - name: Swift Version - run: swift --version - # Create a release - - name: Install Mint - run: brew install mint - - name: Install swift-create-xcframework - run: mint install unsignedapps/swift-create-xcframework - - name: Build XCFramework - run: swift-create-xcframework - # Upload build artifacts - - name: Upload xcframework - uses: actions/upload-artifact@v2 - with: - name: xcframework - path: "./*.xcframework" - - linux-swift-armv7: - name: Linux ARMv7 - runs-on: [self-hosted, linux, arm] - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Swift Version - run: swift --version - - name: Build (Release) - run: swift build -j 1 -c release - # Upload build artifacts - - name: Upload build artifacts - uses: actions/upload-artifact@v2 - with: - name: build-linux-armv7 - path: "./.build/armv7*/release/*.so" diff --git a/.github/workflows/swift-arm.yml b/.github/workflows/swift-arm.yml deleted file mode 100644 index 23f3ac28a..000000000 --- a/.github/workflows/swift-arm.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Swift ARM - -on: - push: - branches: [ master ] - -jobs: - - linux-swift-armv7: - name: Linux ARMv7 - runs-on: [self-hosted, linux, arm] - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Swift Version - run: swift --version - - name: Build (Debug) - run: swift build -j 1 -c debug - - name: Test (Debug) - run: swift test -j 1 --configuration debug - - name: Test (Release) - run: swift test -j 1 --configuration release -Xswiftc -enable-testing - - name: Clean - run: rm -rf .build - - name: Build (Release) - run: swift build -j 1 -c release - - name: Upload build artifacts - uses: actions/upload-artifact@v2 - with: - name: build-linux-armv7 - path: "./.build/armv7*/release/*.so" - - linux-swift-arm64: - name: Linux ARM64 - runs-on: [self-hosted, linux, arm64] - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Swift Version - run: swift --version - - name: Build (Debug) - run: swift build -j 1 -c debug - - name: Test (Debug) - run: swift test -j 1 --configuration debug - - name: Test (Release) - run: swift test -j 1 --configuration release -Xswiftc -enable-testing - - name: Clean - run: rm -rf .build - - name: Build (Release) - run: swift build -j 1 -c release - - name: Upload build artifacts - uses: actions/upload-artifact@v2 - with: - name: build-linux-arm64 - path: "./.build/aarch64*/release/*.so" diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 93a3095b6..0395eb560 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -4,15 +4,14 @@ on: [push] jobs: - macOS-swift-51: - name: macOS (Swift 5.1) + macOS-swift: + name: macOS runs-on: macOS-latest steps: - name: Checkout uses: actions/checkout@v1 - name: Xcode Version run: | - sudo xcode-select -s /Applications/Xcode_11.3.1.app xcodebuild -version swift --version - name: Swift Version @@ -23,96 +22,13 @@ jobs: run: swift build -c release - name: Test (Debug) run: swift test --configuration debug --enable-test-discovery - - name: Test (Release) - run: swift test --configuration release -Xswiftc -enable-testing - - macOS-swift-52: - name: macOS (Swift 5.2) - runs-on: macOS-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Xcode Version - run: | - sudo xcode-select -s /Applications/Xcode_11.4.app - xcodebuild -version - swift --version - - name: Swift Version - run: swift --version - - name: Build (Debug) - run: swift build -c debug - - name: Build (Release) - run: swift build -c release - - name: Test (Debug) - run: swift test --configuration debug --enable-test-discovery - - name: Test (Release) - run: swift test --configuration release -Xswiftc -enable-testing --enable-test-discovery - - - macOS-swift-53: - name: macOS (Swift 5.3) - runs-on: macOS-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Xcode Version - run: | - sudo xcode-select -s /Applications/Xcode_12.app - xcodebuild -version - swift --version - - name: Swift Version - run: swift --version - - name: Build (Debug) - run: swift build -c debug - - name: Build (Release) - run: swift build -c release - - name: Test (Debug) - run: swift test --configuration debug --enable-test-discovery - - name: Test (Release) - run: swift test --configuration release -Xswiftc -enable-testing --enable-test-discovery - - - linux-swift-51: - name: Linux x86_64 (Swift 5.1) - runs-on: ubuntu-18.04 - container: swift:5.1 - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Swift Version - run: swift --version - - name: Build (Debug) - run: swift build -c debug - - name: Build (Release) - run: swift build -c release - - name: Test (Debug) - run: swift test --configuration debug --enable-test-discovery - - name: Test (Release) - run: swift test --configuration release -Xswiftc -enable-testing - - - linux-swift-52: - name: Linux x86_64 (Swift 5.2) - runs-on: ubuntu-18.04 - container: swift:5.2.3-bionic - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Swift Version - run: swift --version - - name: Build (Debug) - run: swift build -c debug - - name: Build (Release) - run: swift build -c release - - name: Test (Debug) - run: swift test --configuration debug --enable-test-discovery - name: Test (Release) run: swift test --configuration release -Xswiftc -enable-testing --enable-test-discovery - linux-swift-53: - name: Linux x86_64 (Swift 5.3) + linux-swift: + name: Linux x86_64 runs-on: ubuntu-20.04 - container: swift:5.3-focal + container: swift:5.6.1-focal steps: - name: Checkout uses: actions/checkout@v1 diff --git a/.github/workflows/xcode.yml b/.github/workflows/xcode.yml deleted file mode 100644 index 983475b93..000000000 --- a/.github/workflows/xcode.yml +++ /dev/null @@ -1,219 +0,0 @@ -name: Xcode - -on: [push] - -jobs: - - xcode-swift-52: - name: Xcode (Swift 5.2) - runs-on: macOS-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Make Logs Directory - run: mkdir logs - - name: Xcode Version - run: | - sudo xcode-select -s /Applications/Xcode_11.4.app - xcodebuild -version - swift --version - - name: XC Pretty - run: sudo gem install xcpretty-travis-formatter - - name: Detect Workspace & Scheme (macOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-macOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (macOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-macOS-xcode-build-debug.log | xcpretty - - name: Detect Workspace & Scheme (iOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-iOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (iOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-iOS-build-debug.log | xcpretty - - name: Detect Workspace & Scheme (tvOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-tvOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (tvOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-tvOS-build-debug.log | xcpretty - - name: Detect Workspace & Scheme (watchOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-watchOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (watchOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-watchOS-build-debug.log | xcpretty - - name: Upload Logs - uses: actions/upload-artifact@v1 - if: always() - with: - name: logs - path: logs - - xcode-swift-53: - name: Xcode (Swift 5.3) - runs-on: macOS-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - name: Make Logs Directory - run: mkdir logs - - name: Xcode Version - run: | - sudo xcode-select -s /Applications/Xcode_12.app - xcodebuild -version - swift --version - - name: XC Pretty - run: sudo gem install xcpretty-travis-formatter - - name: Detect Workspace & Scheme (macOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-macOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (macOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-macOS-xcode-build-debug.log | xcpretty - - name: Detect Workspace & Scheme (iOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-iOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (iOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-iOS-build-debug.log | xcpretty - - name: Detect Workspace & Scheme (tvOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-tvOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (tvOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-tvOS-build-debug.log | xcpretty - - name: Detect Workspace & Scheme (watchOS) - run: | - WORKSPACE="Bluetooth.xcworkspace" - if [[ ! -e "$WORKSPACE" ]] - then - WORKSPACE="." - GOTPACKAGE=$(xcodebuild -workspace . -list | (grep Bluetooth-Package || true)) - if [[ $GOTPACKAGE != "" ]] - then - SCHEME="Bluetooth-Package" - else - SCHEME="Bluetooth" - fi - else - SCHEME="Bluetooth-watchOS" - fi - echo "set -o pipefail; export PATH='swift-latest:$PATH'; WORKSPACE='$WORKSPACE'; SCHEME='$SCHEME'" > setup.sh - - name: Build (watchOS Debug) - run: | - source "setup.sh" - echo "Building workspace $WORKSPACE scheme $SCHEME." - xcodebuild clean build -workspace "$WORKSPACE" -scheme "$SCHEME" -configuration Debug CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO | tee logs/xcodebuild-watchOS-build-debug.log | xcpretty diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9f1eb4b0..75dabe3d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,14 +2,14 @@ stages: - build - test -build-osx-swift5: +build-macos: stage: build script: swift build tags: - osx - swift5 -test-osx-swift5: +test-macos: stage: test script: swift test tags: diff --git a/.swiftlint.yml b/.swiftlint.yml deleted file mode 100644 index c1f1e5e3c..000000000 --- a/.swiftlint.yml +++ /dev/null @@ -1,42 +0,0 @@ -disabled_rules: # rule identifiers to exclude from running - - control_statement - - trailing_whitespace - - nesting - - implicit_getter - - void_return - - large_tuple - - file_length - - statement_position - - line_length - - unused_optional_binding - - redundant_discardable_let - - todo - - identifier_name - - function_body_length - - legacy_hashing -opt_in_rules: # some rules are only opt-in - - empty_count - # Find all the available rules by running: - # swiftlint rules -included: # paths to include during linting. `--path` is ignored if present. - - Sources -excluded: # paths to ignore during linting. Takes precedence over `included`. - - Carthage - - Xcode - - Assets -cyclomatic_complexity: - warning: 15 - error: 20 -force_cast: error # implicitly -force_try: - severity: error # explicitly -type_body_length: - - 900 # warning - - 1000 # error -type_name: - min_length: 2 # only warning - max_length: # warning and error - warning: 70 - error: 100 - excluded: iPhone # excluded via string -reporter: "xcode" diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c6d760f7a..000000000 --- a/.travis.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -addons: - apt: - packages: - - clang - - curl - - binutils - - git - - libc6-dev - - libcurl4 - - libedit2 - - libpython2.7 - - libxml2 - - libz3-dev - - pkg-config - - tzdata - update: true -language: generic -matrix: - include: - - - os: osx - osx_image: xcode11.3 - - - os: osx - osx_image: xcode11.6 - - - os: osx - osx_image: xcode12 - - - arch: amd64 - dist: focal - install: - - SWIFT_VERSION=swift-5.3-RELEASE - - "SWIFT_URL=https://swift.org/builds/swift-5.3-release/ubuntu2004/swift-5.3-RELEASE/swift-5.3-RELEASE-ubuntu20.04.tar.gz" - - SWIFT_DIR=tests - - "mkdir $SWIFT_DIR" - - "curl $SWIFT_URL -s | tar xz -C $SWIFT_DIR &> /dev/null" - - "export PATH=$(pwd)/tests/$SWIFT_VERSION-ubuntu20.04/usr/bin:\"${PATH}\"" - os: linux - - - arch: arm64 - dist: focal - install: - - "curl -s https://packagecloud.io/install/repositories/swift-arm/release/script.deb.sh | sudo bash" - - "sudo apt install -y swiftlang" - os: linux -script: - - "uname -a" - - "swift --version" - - "if [[ \"$TRAVIS_OS_NAME\" == \"osx\" ]]; then swift test ; fi" - - "swift build -c release"