diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index 6cac438d5c..ccb11123a7 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -20,7 +20,9 @@ jobs: # Concurrency group not needed as this workflow only runs on develop which we always want to test. steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + submodules: 'true' # Common cache # Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job @@ -49,8 +51,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Main step - name: Build iOS simulator diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index f78a5aba9c..e71d7b99bf 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -25,7 +25,9 @@ jobs: cancel-in-progress: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + submodules: 'true' # Common cache # Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job @@ -54,8 +56,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Main step - name: Unit tests diff --git a/.github/workflows/ci-ui-tests.yml b/.github/workflows/ci-ui-tests.yml index b13272947f..322323739e 100644 --- a/.github/workflows/ci-ui-tests.yml +++ b/.github/workflows/ci-ui-tests.yml @@ -20,7 +20,9 @@ jobs: cancel-in-progress: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + submodules: 'true' # Common cache # Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job @@ -49,8 +51,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Main step - name: UI tests diff --git a/.github/workflows/release-alpha.yml b/.github/workflows/release-alpha.yml index e610628b45..aa90ef5bab 100644 --- a/.github/workflows/release-alpha.yml +++ b/.github/workflows/release-alpha.yml @@ -25,7 +25,9 @@ jobs: cancel-in-progress: true steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + with: + submodules: 'true' # Common cache # Note: GH actions do not support yaml anchor yet. We need to duplicate this for every job @@ -57,8 +59,6 @@ jobs: run: | bundle config path vendor/bundle bundle install --jobs 4 --retry 3 - - name: Use right MatrixSDK versions - run: bundle exec fastlane point_dependencies_to_related_branches # Import alpha release private signing certificate - name: Import signing certificate diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000000..90f7f83cb4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "matrix-ios-sdk"] + path = matrix-ios-sdk + url = git@github.com:matrix-org/matrix-ios-sdk.git diff --git a/Gemfile.lock b/Gemfile.lock index 519e1f087e..bacf716b3e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GEM base64 nkf rexml - activesupport (7.1.3.2) + activesupport (7.1.3.4) base64 bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) @@ -29,24 +29,24 @@ GEM artifactory (3.0.17) atomos (0.1.3) aws-eventstream (1.3.0) - aws-partitions (1.899.0) - aws-sdk-core (3.191.4) + aws-partitions (1.941.0) + aws-sdk-core (3.197.0) aws-eventstream (~> 1, >= 1.3.0) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.8) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.78.0) - aws-sdk-core (~> 3, >= 3.191.0) + aws-sdk-kms (1.83.0) + aws-sdk-core (~> 3, >= 3.197.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.146.0) - aws-sdk-core (~> 3, >= 3.191.0) + aws-sdk-s3 (1.152.0) + aws-sdk-core (~> 3, >= 3.197.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.8) aws-sigv4 (1.8.0) aws-eventstream (~> 1, >= 1.0.2) babosa (1.0.4) base64 (0.2.0) - bigdecimal (3.1.7) + bigdecimal (3.1.8) claide (1.1.0) clamp (1.3.2) cocoapods (1.14.3) @@ -90,7 +90,7 @@ GEM colored2 (3.1.2) commander (4.6.0) highline (~> 2.0.0) - concurrent-ruby (1.2.3) + concurrent-ruby (1.3.3) connection_pool (2.4.1) declarative (0.0.20) digest-crc (0.6.5) @@ -131,15 +131,15 @@ GEM faraday-retry (1.0.3) faraday_middleware (1.2.0) faraday (~> 1.0) - fastimage (2.3.0) - fastlane (2.219.0) + fastimage (2.3.1) + fastlane (2.220.0) CFPropertyList (>= 2.3, < 4.0.0) addressable (>= 2.8, < 3.0.0) artifactory (~> 3.0) aws-sdk-s3 (~> 1.0) babosa (>= 1.0.3, < 2.0.0) bundler (>= 1.12.0, < 3.0.0) - colored + colored (~> 1.2) commander (~> 4.6) dotenv (>= 2.1.1, < 3.0.0) emoji_regex (>= 0.1, < 4.0) @@ -160,10 +160,10 @@ GEM mini_magick (>= 4.9.4, < 5.0.0) multipart-post (>= 2.0.0, < 3.0.0) naturally (~> 2.2) - optparse (>= 0.1.1) + optparse (>= 0.1.1, < 1.0.0) plist (>= 3.1.0, < 4.0.0) rubyzip (>= 2.0.0, < 3.0.0) - security (= 0.1.3) + security (= 0.1.5) simctl (~> 1.6.3) terminal-notifier (>= 2.0.0, < 3.0.0) terminal-table (~> 3) @@ -172,14 +172,14 @@ GEM word_wrap (~> 1.0.0) xcodeproj (>= 1.13.0, < 2.0.0) xcpretty (~> 0.3.0) - xcpretty-travis-formatter (>= 0.0.3) + xcpretty-travis-formatter (>= 0.0.3, < 2.0.0) fastlane-plugin-brew (0.1.1) - fastlane-plugin-sentry (1.20.0) + fastlane-plugin-sentry (1.23.0) os (~> 1.1, >= 1.1.4) fastlane-plugin-versioning (0.5.2) fastlane-plugin-xcodegen (1.1.0) fastlane-plugin-brew (~> 0.1.1) - ffi (1.16.3) + ffi (1.17.0) fourflusher (2.3.1) fuzzy_match (2.0.4) gh_inspector (1.1.3) @@ -220,22 +220,22 @@ GEM os (>= 0.9, < 2.0) signet (>= 0.16, < 2.a) highline (2.0.3) - http-cookie (1.0.5) + http-cookie (1.0.6) domain_name (~> 0.5) httpclient (2.8.3) - i18n (1.14.4) + i18n (1.14.5) concurrent-ruby (~> 1.0) jmespath (1.6.2) - json (2.7.1) + json (2.7.2) jwt (2.8.1) base64 mini_magick (4.12.0) mini_mime (1.1.5) - mini_portile2 (2.8.5) - minitest (5.22.3) + mini_portile2 (2.8.7) + minitest (5.23.1) molinillo (0.8.0) multi_json (1.15.0) - multipart-post (2.4.0) + multipart-post (2.4.1) mutex_m (0.2.0) nanaimo (0.3.0) nap (1.1.0) @@ -245,23 +245,24 @@ GEM nokogiri (1.15.6) mini_portile2 (~> 2.8.2) racc (~> 1.4) - optparse (0.4.0) + optparse (0.5.0) os (1.1.4) plist (3.7.1) public_suffix (4.0.7) - racc (1.7.3) - rake (13.1.0) + racc (1.8.0) + rake (13.2.1) representable (3.2.0) declarative (< 0.1.0) trailblazer-option (>= 0.1.1, < 0.2.0) uber (< 0.2.0) retriable (3.1.2) - rexml (3.2.6) + rexml (3.2.9) + strscan rouge (2.0.7) ruby-macho (2.5.1) ruby2_keywords (0.0.5) rubyzip (2.3.2) - security (0.1.3) + security (0.1.5) signet (0.19.0) addressable (~> 2.8) faraday (>= 0.17.5, < 3.a) @@ -276,6 +277,7 @@ GEM clamp (~> 1.3) nokogiri (>= 1.14.3) xcodeproj (~> 1.21) + strscan (3.1.0) terminal-notifier (2.0.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) diff --git a/Podfile b/Podfile index 3fb43f4179..f6f26f61c8 100644 --- a/Podfile +++ b/Podfile @@ -9,44 +9,10 @@ inhibit_all_warnings! # Use frameworks to allow usage of pods written in Swift use_frameworks! -# Different flavours of pods to MatrixSDK. Can be one of: -# - a String indicating an official MatrixSDK released version number -# - `:local` (to use Development Pods) -# - `{ :branch => 'sdk branch name'}` to depend on specific branch of MatrixSDK repo -# - `{ :specHash => {sdk spec hash}` to depend on specific pod options (:git => …, :podspec => …) for MatrixSDK repo. Used by Fastfile during CI -# -# Warning: our internal tooling depends on the name of this variable name, so be sure not to change it -$matrixSDKVersion = '= 0.27.8' -# $matrixSDKVersion = :local -# $matrixSDKVersion = { :branch => 'develop'} -# $matrixSDKVersion = { :specHash => { git: 'https://git.io/fork123', branch: 'fix' } } - -######################################## - -case $matrixSDKVersion -when :local -$matrixSDKVersionSpec = { :path => '../matrix-ios-sdk/MatrixSDK.podspec' } -when Hash -spec_mode, sdk_spec = $matrixSDKVersion.first # extract first and only key/value pair; key is spec_mode, value is sdk_spec - - case spec_mode - when :branch - # :branch => sdk branch name - sdk_spec = { :git => 'https://github.com/matrix-org/matrix-ios-sdk.git', :branch => sdk_spec.to_s } unless sdk_spec.is_a?(Hash) - when :specHash - # :specHash => {sdk spec Hash} - sdk_spec = sdk_spec - end - -$matrixSDKVersionSpec = sdk_spec -when String # specific MatrixSDK released version -$matrixSDKVersionSpec = $matrixSDKVersion -end - # Method to import the MatrixSDK def import_MatrixSDK - pod 'MatrixSDK', $matrixSDKVersionSpec, :inhibit_warnings => false - pod 'MatrixSDK/JingleCallStack', $matrixSDKVersionSpec, :inhibit_warnings => false + pod 'MatrixSDK', :path => 'matrix-ios-sdk/MatrixSDK.podspec', :inhibit_warnings => false + pod 'MatrixSDK/JingleCallStack', :path => 'matrix-ios-sdk/MatrixSDK.podspec', :inhibit_warnings => false end ######################################## diff --git a/Podfile.lock b/Podfile.lock index b830adadb2..673d4ecc0d 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -101,8 +101,8 @@ DEPENDENCIES: - KeychainAccess (~> 4.2.2) - KTCenterFlowLayout (~> 1.3.1) - libPhoneNumber-iOS (~> 0.9.13) - - MatrixSDK (= 0.27.8) - - MatrixSDK/JingleCallStack (= 0.27.8) + - MatrixSDK (from `matrix-ios-sdk/MatrixSDK.podspec`) + - MatrixSDK/JingleCallStack (from `matrix-ios-sdk/MatrixSDK.podspec`) - OLMKit - ReadMoreTextView (~> 3.0.1) - Reusable (~> 4.1) @@ -142,7 +142,6 @@ SPEC REPOS: - libPhoneNumber-iOS - LoggerAPI - Logging - - MatrixSDK - MatrixSDKCrypto - OLMKit - ReadMoreTextView @@ -162,6 +161,10 @@ SPEC REPOS: - zxcvbn-ios - ZXingObjC +EXTERNAL SOURCES: + MatrixSDK: + :path: matrix-ios-sdk/MatrixSDK.podspec + SPEC CHECKSUMS: AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58 BlueCryptor: b0aee3d9b8f367b49b30de11cda90e1735571c24 @@ -204,6 +207,6 @@ SPEC CHECKSUMS: zxcvbn-ios: fef98b7c80f1512ff0eec47ac1fa399fc00f7e3c ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5 -PODFILE CHECKSUM: 3bbda8faf037705f421dad839d6f5b1aef399f99 +PODFILE CHECKSUM: b622ffadc1a0fe5442787bd9023ca3d110384814 COCOAPODS: 1.15.2 diff --git a/fastlane/Fastfile b/fastlane/Fastfile index 51e23fe9dc..a2a2dc1c65 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -103,27 +103,6 @@ platform :ios do end - desc "Point MatrixSDK to the related branches if such ones exist" - lane :point_dependencies_to_related_branches do - current_branch = mx_git_branch - UI.message("Current branch: #{current_branch}") - if current_branch.start_with?("release/") - point_dependencies_to_pending_releases - else - point_dependencies_to_same_feature - end - end - - desc "Point MatrixSDK to release/*/release branch if it exists, master otherwise" - lane :point_dependencies_to_pending_releases do - edit_podfile(branch_pattern: "release/*/release", default_branch: "master") - end - - desc "Point MatrixSDK to the branch with the same name as the current branch if such one exist, develop otherwise" - lane :point_dependencies_to_same_feature do - edit_podfile(branch_pattern: mx_git_branch) unless mx_git_branch.to_s.empty? - end - desc "Use an app variant. An app variant overwrite default project configuration or ressource files with custom values" lane :setup_app_variant do |options| appVariantScript = "../Variants/setup_app_variant.sh" @@ -473,25 +452,6 @@ platform :ios do preprocessor_definitions end - desc "Edit the Podfile in order to point MatrixSDK to the appropriate branches." - private_lane :edit_podfile do |options| - require 'net/http' - - branch_pattern = options[:branch_pattern] - sdk_slug = "matrix-org/matrix-ios-sdk" - - default_branch = options[:default_branch] || 'develop' - sdk_branch = find_branch(sdk_slug, branch_pattern) || default_branch - - sdk_spec = { git: 'https://github.com/matrix-org/matrix-ios-sdk.git', branch: sdk_branch } - - UI.message "✏️ Modify Podfile to point `MatrixSDK/*` to \`#{sdk_branch}\` branch..." - podfile_content = File.read('../Podfile') # current dir is 'fastlane/' hence the '../' - podfile_content.gsub!(%r{^\$matrixSDKVersion\s*=\s*.*$}, "$matrixSDKVersion = { :specHash => #{sdk_spec} }") - File.write('../Podfile', podfile_content) - UI.command_output("Content of modified Podfile:\n" + podfile_content) - end - desc "Upload dsym files to Sentry to symbolicate crashes" private_lane :upload_dsyms_to_sentry do UI.user_error!("'SENTRY_AUTH_TOKEN' environment variable should be set to use this lane") unless !ENV["SENTRY_AUTH_TOKEN"].to_s.empty? diff --git a/matrix-ios-sdk b/matrix-ios-sdk new file mode 160000 index 0000000000..f03778fddb --- /dev/null +++ b/matrix-ios-sdk @@ -0,0 +1 @@ +Subproject commit f03778fddbaf682173706649ee1412b0143f0449