diff --git a/.ci/gemfiles/Gemfile.travis b/.ci/gemfiles/Gemfile.travis deleted file mode 100644 index a9dd99477..000000000 --- a/.ci/gemfiles/Gemfile.travis +++ /dev/null @@ -1,5 +0,0 @@ -source 'https://rubygems.org' - -gem 'xcpretty' -gem 'xcpretty-travis-formatter' -gem 'cocoapods', '~> 1.7' diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2079a3f6c..a3a4fd76d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -1,19 +1,168 @@ -name: CI +name: "GRDB CI" on: push: - branches: [ master, development ] + branches: + - master + - development + paths: + - 'GRDB/**' + - 'Tests/**' + - '.github/workflows/**' + - 'Package.swift' pull_request: - branches: [ master, development ] + paths: + - 'GRDB/**' + - 'Tests/**' + - '.github/workflows/**' + - 'Package.swift' +concurrency: + group: ${{ github.ref_name }} + cancel-in-progress: true jobs: - build: - - runs-on: macos-latest - + macOS: + name: macOS + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + - xcode: "Xcode_13.2.1.app" + runsOn: macOS-11 + name: "macOS 11, Xcode 13.2.1, Swift 5.5.2" + shell: "/bin/zsh {0}" + - xcode: "Xcode_13.1.app" + runsOn: macOS-11 + name: "macOS 11, Xcode 13.1, Swift 5.5.1" + shell: "/bin/zsh {0}" + - xcode: "Xcode_13.0.app" + runsOn: macOS-11 + name: "macOS 11, Xcode 13.0, Swift 5.5.0" + shell: "/bin/zsh {0}" + - xcode: "Xcode_12.5.1.app" + runsOn: macOS-11 + name: "macOS 11, Xcode 12.5.1, Swift 5.4" + shell: "/bin/zsh {0}" + - xcode: "Xcode_12.4.app" + runsOn: macOS-10.15 + name: "macOS 10.15, Xcode 12.4, Swift 5.3" + shell: "/bin/zsh {0}" steps: - - uses: actions/checkout@v2 - - name: Build - run: swift build -v - - name: Run tests - run: swift test -v + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_framework_GRDBOSX_maxSwift + iOS: + name: iOS + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + - xcode: "Xcode_12.4.app" + runsOn: macOS-10.15 + name: "macOS 10.15, Xcode 12.4, Swift 5.3" + shell: "/bin/zsh {0}" + steps: + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_framework_GRDBiOS_maxTarget_maxSwift + SPM: + name: SPM + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + steps: + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_SPM test_install_SPM + SQLCipher3: + name: SQLCipher3 + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + steps: + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_framework_SQLCipher3Encrypted + SQLCipher4: + name: SQLCipher4 + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 60 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + - xcode: "Xcode_12.4.app" + runsOn: macOS-10.15 + name: "macOS 10.15, Xcode 12.4, Swift 5.3" + shell: "/bin/zsh {0}" + steps: + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_framework_SQLCipher4Encrypted + CustomSQLite: + name: CustomSQLite + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + - xcode: "Xcode_12.4.app" + runsOn: macOS-10.15 + name: "macOS 10.15, Xcode 12.4, Swift 5.3" + shell: "/bin/zsh {0}" + steps: + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_framework_GRDBCustomSQLiteOSX + XCFramework: + name: XCFramework + runs-on: ${{ matrix.runsOn }} + timeout-minutes: 40 + strategy: + fail-fast: false + matrix: + include: + - xcode: "Xcode_13.3.1.app" + runsOn: macOS-12 + name: "macOS 12, Xcode 13.3.1, Swift 5.6" + shell: "/bin/zsh {0}" + steps: + - uses: actions/checkout@v2 + - name: ${{ matrix.name }} + run: make test_archive_GRDBOSX_xcframework + \ No newline at end of file diff --git a/Makefile b/Makefile index c6e89cadb..42bbc411a 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ # make distclean - Restore repository to a pristine state default: test -smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget test_framework_SQLCipher4 test_framework_GRDBCustomSQLiteiOS_maxTarget test_SPM +smokeTest: test_framework_GRDBiOS_maxTarget test_framework_GRDBiOS_minTarget test_framework_SQLCipher4Encrypted test_framework_GRDBCustomSQLiteiOS_maxTarget test_SPM # Requirements # ============ @@ -180,7 +180,7 @@ test_framework: test_framework_darwin test_framework_darwin: test_framework_GRDB test_framework_GRDBCustom test_framework_SQLCipher test_SPM test_framework_GRDB: test_framework_GRDBOSX test_framework_GRDBWatchOS test_framework_GRDBiOS test_framework_GRDBtvOS test_framework_GRDBCustom: test_framework_GRDBCustomSQLiteOSX test_framework_GRDBCustomSQLiteiOS -test_framework_SQLCipher: test_framework_SQLCipher3 test_framework_SQLCipher4 +test_framework_SQLCipher: test_framework_SQLCipher3 test_framework_SQLCipher3Encrypted test_framework_SQLCipher4 test_framework_SQLCipher4Encrypted test_archive: test_archive_GRDBOSX_xcframework test_install: test_install_manual test_install_SPM test_install_customSQLite test_install_GRDB_CocoaPods test_CocoaPodsLint test_CocoaPodsLint: test_CocoaPodsLint_GRDB @@ -348,6 +348,21 @@ else @exit 1 endif +test_framework_SQLCipher3Encrypted: +ifdef POD + cd Tests/CocoaPods/SQLCipher3 && \ + $(POD) install && \ + $(XCODEBUILD) \ + -workspace GRDBTests.xcworkspace \ + -scheme GRDBEncryptedTests \ + SWIFT_VERSION=$(MAX_SWIFT_VERSION) \ + build-for-testing test-without-building \ + $(XCPRETTY) +else + @echo CocoaPods must be installed for test_framework_SQLCipher3Encrypted + @exit 1 +endif + test_framework_SQLCipher4: ifdef POD cd Tests/CocoaPods/SQLCipher4 && \ @@ -363,6 +378,21 @@ else @exit 1 endif +test_framework_SQLCipher4Encrypted: +ifdef POD + cd Tests/CocoaPods/SQLCipher4 && \ + $(POD) install && \ + $(XCODEBUILD) \ + -workspace GRDBTests.xcworkspace \ + -scheme GRDBEncryptedTests \ + SWIFT_VERSION=$(MAX_SWIFT_VERSION) \ + build-for-testing test-without-building \ + $(XCPRETTY) +else + @echo CocoaPods must be installed for test_framework_SQLCipher4Encrypted + @exit 1 +endif + test_SPM: # Add sanitizers when available: https://twitter.com/simjp/status/929140877540278272 $(SWIFT) package clean diff --git a/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBEncryptedTests.xcscheme b/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBEncryptedTests.xcscheme new file mode 100644 index 000000000..baa3bab90 --- /dev/null +++ b/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBEncryptedTests.xcscheme @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme b/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme index 1efa20217..5485340bb 100644 --- a/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme +++ b/Tests/CocoaPods/SQLCipher3/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme @@ -20,20 +20,6 @@ ReferencedContainer = "container:GRDBTests.xcodeproj"> - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/CocoaPods/SQLCipher4/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme b/Tests/CocoaPods/SQLCipher4/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme index 1efa20217..5485340bb 100644 --- a/Tests/CocoaPods/SQLCipher4/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme +++ b/Tests/CocoaPods/SQLCipher4/GRDBTests.xcodeproj/xcshareddata/xcschemes/GRDBTests.xcscheme @@ -20,20 +20,6 @@ ReferencedContainer = "container:GRDBTests.xcodeproj"> - - - - - - - -