diff --git a/.github/workflows/uitests.yml b/.github/workflows/uitests.yml index a72db1d7c..225efb743 100644 --- a/.github/workflows/uitests.yml +++ b/.github/workflows/uitests.yml @@ -26,7 +26,7 @@ permissions: jobs: build-and-test: name: Build and Test - runs-on: macOS-latest + runs-on: macos-latest if: github.event.pull_request.draft == false strategy: @@ -55,33 +55,66 @@ jobs: restore-keys: | ${{ runner.os }}-pods- - - uses: actions/cache@v3 + - name: Set up php 8.2 + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + if: matrix.test-branches != 'stable23' with: - path: SourcePackages - key: ${{ runner.os }}-spm-${{ hashFiles('NextcloudTalk.xcworkspace/xcshareddata/swiftpm/Package.resolved') }} - restore-keys: | - ${{ runner.os }}-spm- - - - name: Install docker - run: | - brew install docker - colima start + php-version: 8.2 + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql + coverage: none + ini-file: development + # Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on + ini-values: apc.enable_cli=on, disable_functions= + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up php 8.0 + uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + if: matrix.test-branches == 'stable23' + with: + php-version: 8.0 + # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation + extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql + coverage: none + ini-file: development + # Temporary workaround for missing pcntl_* in PHP 8.3: ini-values: apc.enable_cli=on + ini-values: apc.enable_cli=on, disable_functions= + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout server + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + submodules: true + repository: nextcloud/server + path: server + ref: ${{ matrix.test-branches }} - - name: Create docker test server - run: | - source ./ci-create-docker-server.sh + - name: Checkout Talk + uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + with: + repository: nextcloud/spreed + path: server/apps/spreed + ref: ${{ matrix.test-branches }} - - name: Set up dependencies talk-ios - run: | - pod install + - name: Set up production dependencies + working-directory: server/apps/spreed + run: composer i --no-dev - - name: Wait for server + - name: Set up Nextcloud run: | - source ./ci-wait-for-server.sh + mkdir server/data + ./server/occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin + ./server/occ config:system:set hashing_default_password --value=true --type=boolean + ./server/occ config:system:set memcache.local --value="\\OC\\Memcache\\APCu" + ./server/occ config:system:set memcache.distributed --value="\\OC\\Memcache\\APCu" + ./server/occ app:enable --force spreed + PHP_CLI_SERVER_WORKERS=3 php -S localhost:8080 -t server/ & - - name: Install talk + - name: Set up dependencies talk-ios run: | - source ./ci-install-talk.sh + pod install - name: Build & Test NextcloudTalk iOS run: | @@ -91,7 +124,6 @@ jobs: -test-iterations 3 \ -retry-tests-on-failure \ -resultBundlePath "testResult.xcresult" \ - -clonedSourcePackagesDirPath SourcePackages \ | xcpretty - name: Upload test results diff --git a/.gitignore b/.gitignore index 12e23ee35..b41a28233 100644 --- a/.gitignore +++ b/.gitignore @@ -3,15 +3,7 @@ Podfile.lock NextcloudTalk.xcodeproj/xcuserdata NextcloudTalk.xcodeproj/xcshareddata NextcloudTalk.xcworkspace/xcuserdata +NextcloudTalk.xcworkspace/xcshareddata ThirdParty/WebRTC.xcframework .DS_Store testResult.xcresult - -# Include the resolved spm configuration, so "Package.resolved" can be used for caching -NextcloudTalk.xcworkspace/** -!NextcloudTalk.xcworkspace/xcshareddata/ -!NextcloudTalk.xcworkspace/xcshareddata/swiftpm -!NextcloudTalk.xcworkspace/xcshareddata/swiftpm/** - -# Exclude SPM cache on CI -SourcePackages diff --git a/.swiftlint.yml b/.swiftlint.yml index b6891824b..faa6e1e5a 100644 --- a/.swiftlint.yml +++ b/.swiftlint.yml @@ -21,7 +21,6 @@ identifier_name: excluded: - Pods - ThirdParty - - SourcePackages - NextcloudTalk/RLMSupport.swift reporter: "xcode" diff --git a/NextcloudTalk.xcworkspace/xcshareddata/swiftpm/Package.resolved b/NextcloudTalk.xcworkspace/xcshareddata/swiftpm/Package.resolved deleted file mode 100644 index 920bf1a13..000000000 --- a/NextcloudTalk.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ /dev/null @@ -1,164 +0,0 @@ -{ - "pins" : [ - { - "identity" : "alamofire", - "kind" : "remoteSourceControl", - "location" : "https://github.com/Alamofire/Alamofire", - "state" : { - "revision" : "b2fa556e4e48cbf06cf8c63def138c98f4b811fa", - "version" : "5.8.0" - } - }, - { - "identity" : "cdmarkdownkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/nextcloud-deps/CDMarkdownKit.git", - "state" : { - "revision" : "a425cc36263996ce4d992178f9847760a166fe8e" - } - }, - { - "identity" : "cocoalumberjack", - "kind" : "remoteSourceControl", - "location" : "https://github.com/CocoaLumberjack/CocoaLumberjack.git", - "state" : { - "revision" : "67ec5818a757aba4d7c534e21a905d878d128dbf", - "version" : "3.8.1" - } - }, - { - "identity" : "dynamic", - "kind" : "remoteSourceControl", - "location" : "https://github.com/mhdhejazi/Dynamic.git", - "state" : { - "revision" : "ab9a2570862d54aed2663691bb767f881226a12f", - "version" : "1.2.0" - } - }, - { - "identity" : "nextcloudkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/nextcloud/NextcloudKit", - "state" : { - "revision" : "0d694aa234210f7c85ab41b05d1429ad0eb50266", - "version" : "1.6.0" - } - }, - { - "identity" : "openssl", - "kind" : "remoteSourceControl", - "location" : "https://github.com/krzyzanowskim/OpenSSL", - "state" : { - "revision" : "9429bf89fe0df2d2f25f3a9a51cbf7092e69640f", - "version" : "1.1.1700" - } - }, - { - "identity" : "qrcodereader.swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/yannickl/QRCodeReader.swift", - "state" : { - "revision" : "5020b5a47199d8ba80c83a4b4fafd70e9dc9dc7f", - "version" : "10.1.1" - } - }, - { - "identity" : "realm-core", - "kind" : "remoteSourceControl", - "location" : "https://github.com/realm/realm-core.git", - "state" : { - "revision" : "f1e962cd447f8b69f8f7cf46a188b1c6246923c5", - "version" : "13.17.0" - } - }, - { - "identity" : "realm-swift", - "kind" : "remoteSourceControl", - "location" : "https://github.com/realm/realm-swift.git", - "state" : { - "revision" : "0155caac1a0830a9fbaaffe5866b909fad3a6fc4", - "version" : "10.41.1" - } - }, - { - "identity" : "sdwebimage", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SDWebImage/SDWebImage.git", - "state" : { - "revision" : "3289629ef6cbf1ad8c3d1dccf0cf09ac97547cd6", - "version" : "5.15.7" - } - }, - { - "identity" : "sdwebimagesvgkitplugin", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SDWebImage/SDWebImageSVGKitPlugin.git", - "state" : { - "revision" : "fb16805b772d9a1dfa31a7665f64a557f3b52781", - "version" : "1.4.0" - } - }, - { - "identity" : "svgkit", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SVGKit/SVGKit.git", - "state" : { - "revision" : "58152b9f7c85eab239160b36ffdfd364aa43d666", - "version" : "3.0.0" - } - }, - { - "identity" : "swift-log", - "kind" : "remoteSourceControl", - "location" : "https://github.com/apple/swift-log.git", - "state" : { - "revision" : "532d8b529501fb73a2455b179e0bbb6d49b652ed", - "version" : "1.5.3" - } - }, - { - "identity" : "swiftyattributes", - "kind" : "remoteSourceControl", - "location" : "https://github.com/eddiekaiger/SwiftyAttributes.git", - "state" : { - "revision" : "1ae513a1617309455a115c3fc2d558f744b43788" - } - }, - { - "identity" : "swiftyjson", - "kind" : "remoteSourceControl", - "location" : "https://github.com/SwiftyJSON/SwiftyJSON", - "state" : { - "revision" : "b3dcd7dbd0d488e1a7077cb33b00f2083e382f07", - "version" : "5.0.1" - } - }, - { - "identity" : "swiftyxmlparser", - "kind" : "remoteSourceControl", - "location" : "https://github.com/yahoojapan/SwiftyXMLParser", - "state" : { - "revision" : "d7a1d23f04c86c1cd2e8f19247dd15d74e0ea8be", - "version" : "5.6.0" - } - }, - { - "identity" : "talk-clients-webrtc", - "kind" : "remoteSourceControl", - "location" : "https://github.com/nextcloud-releases/talk-clients-webrtc", - "state" : { - "revision" : "fd8f88a4243f31760617524b8ca86d71e9c903a7" - } - }, - { - "identity" : "tocropviewcontroller", - "kind" : "remoteSourceControl", - "location" : "https://github.com/TimOliver/TOCropViewController", - "state" : { - "revision" : "d0470491f56e734731bbf77991944c0dfdee3e0e", - "version" : "2.6.1" - } - } - ], - "version" : 2 -}