From 3a8e7224ce417d97cd2dd010ec319dbc841625cb Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 5 Mar 2024 17:20:58 +0300 Subject: [PATCH 01/16] IOS-6122: Fix spaces in workflow file Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 4eaad537cf5..9a165adb39e 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -45,12 +45,14 @@ jobs: ref: "refs/tags/${{ steps.version.outputs.tangem }}", sha: context.sha }) + - name: Setup Gradle uses: gradle/gradle-build-action@v2 - name: Install system dependencies run: | tools/install-sys-dependencies-mac + - name: Install Android Dependencies run: tools/install-android-dependencies @@ -59,6 +61,7 @@ jobs: with: workspaces: | rust + - name: Install Rust dependencies run: | tools/install-rust-dependencies From 7ca62f68d12d84e14dd698b70ee61df8c9b7ec64 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 5 Mar 2024 17:21:38 +0300 Subject: [PATCH 02/16] IOS-6122: Split tag creation and android/ios publishing into separate jobs Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 41 +++++++++++++++++++++------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 9a165adb39e..24a29ce2fca 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -10,19 +10,13 @@ env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }} jobs: - publish: - name: Create tag and publish + create_tag: + name: Create tag runs-on: macos-latest steps: - name: Checkout uses: actions/checkout@v2 - - name: set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'adopt' - java-version: '17' - - name: Read version.properties file uses: BrycensRanch/read-properties-action@v1 id: version @@ -45,6 +39,33 @@ jobs: ref: "refs/tags/${{ steps.version.outputs.tangem }}", sha: context.sha }) + outputs: + publish_version: ${{ steps.version.outputs.tangem }} + + publish_ios: + name: Publish iOS + runs-on: macos-latest + needs: create_tag + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Echo version.properties + run: echo ${{ needs.create_tag.outputs.publish_version }} + + publish_android: + name: Publish Android + runs-on: macos-latest + needs: create_tag + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: set up JDK 17 + uses: actions/setup-java@v3 + with: + distribution: 'adopt' + java-version: '17' - name: Setup Gradle uses: gradle/gradle-build-action@v2 @@ -80,11 +101,11 @@ jobs: - name: Generate files run: tools/generate-files android - - name: Build and publish + - name: Build and publish Android env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} run: | cd android/ echo sdk.dir = $ANDROID_HOME > local.properties - GITHUB_USER=${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ./gradlew build assembleRelease publish -Pversion=${{ steps.version.outputs.tangem }} + GITHUB_USER=${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ./gradlew build assembleRelease publish -Pversion=${{ needs.create_tag.outputs.publish_version }} From dde980c2b546807ce29e0fef68a8717190239ee1 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 5 Mar 2024 17:22:24 +0300 Subject: [PATCH 03/16] IOS-6122: Temporarily disable unneeded jobs and steps Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 24a29ce2fca..5d3eea127a9 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -3,7 +3,7 @@ name: Tangem - Publish on: push: branches: - - 'master' + - 'temp/IOS-6122_build_scripts' # temporary value workflow_dispatch: env: @@ -30,6 +30,7 @@ jobs: - name: Create tag uses: actions/github-script@v3 + if: False # temporarily disabled with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | @@ -57,6 +58,7 @@ jobs: name: Publish Android runs-on: macos-latest needs: create_tag + if: False # temporarily disabled steps: - name: Checkout uses: actions/checkout@v2 From 4e2cde2f13135321cd4e39d092c09dc20ed258a3 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 5 Mar 2024 17:25:52 +0300 Subject: [PATCH 04/16] IOS-6122: Bump `checkout` version Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 5d3eea127a9..abd3233ceeb 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -15,7 +15,7 @@ jobs: runs-on: macos-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Read version.properties file uses: BrycensRanch/read-properties-action@v1 @@ -49,7 +49,7 @@ jobs: needs: create_tag steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Echo version.properties run: echo ${{ needs.create_tag.outputs.publish_version }} @@ -61,7 +61,7 @@ jobs: if: False # temporarily disabled steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: set up JDK 17 uses: actions/setup-java@v3 From cd5a2d1d47c0398d0d51392bf720391528c46640 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Thu, 7 Mar 2024 11:41:18 +0300 Subject: [PATCH 05/16] IOS-6122: Update ios release scripts and helpers Signed-off-by: Andrey Fedorov --- tools/ios-xcframework-release | 50 +++++++++-------------------------- tools/library | 13 ++++++--- 2 files changed, 22 insertions(+), 41 deletions(-) diff --git a/tools/ios-xcframework-release b/tools/ios-xcframework-release index 0ce859a8cc1..8e5561e2d2d 100755 --- a/tools/ios-xcframework-release +++ b/tools/ios-xcframework-release @@ -10,6 +10,7 @@ source ${base_dir}/library # version to release version=$(wc_read_version $1) echo "release version ${version}" + release_url=$(wc_release_url ${version}) echo "release_url url is $release_url" @@ -33,6 +34,15 @@ zip -r ${protobuf_dsyms_filename} SwiftProtobuf.dSYMs zip -r ${protobuf_zip_filename} SwiftProtobuf.xcframework protobuf_hash=$(/usr/bin/shasum -a 256 ${protobuf_zip_filename} | awk '{printf $1}') +# create Hashsums.txt + +hashsums="Hashsums.txt" +cat > $hashsums < $package_swift < Date: Thu, 7 Mar 2024 11:42:31 +0300 Subject: [PATCH 06/16] IOS-6122: Update build pipeline Signed-off-by: Andrey Fedorov --- .../action.yml | 31 ++++++ .github/workflows/tangem-publish.yml | 97 +++++++++---------- 2 files changed, 79 insertions(+), 49 deletions(-) create mode 100644 .github/actions/install_dependencies_composite_action/action.yml diff --git a/.github/actions/install_dependencies_composite_action/action.yml b/.github/actions/install_dependencies_composite_action/action.yml new file mode 100644 index 00000000000..fd6c0862575 --- /dev/null +++ b/.github/actions/install_dependencies_composite_action/action.yml @@ -0,0 +1,31 @@ +name: 'Install dependencies' +runs: + using: "composite" + steps: + - name: Install system dependencies + shell: bash + run: | + tools/install-sys-dependencies-mac + + - name: Cache internal dependencies + id: internal_cache + uses: actions/cache@v3 + with: + path: build/local + key: ${{ runner.os }}-${{ runner.arch }}-internal-${{ hashFiles('tools/install-dependencies') }} + + - name: Install internal dependencies + shell: bash + run: | + tools/install-dependencies + + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 + with: + workspaces: | + rust + + - name: Install Rust dependencies + shell: bash + run: | + tools/install-rust-dependencies diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index abd3233ceeb..7bfd6f8ca9a 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -3,16 +3,20 @@ name: Tangem - Publish on: push: branches: - - 'temp/IOS-6122_build_scripts' # temporary value + - 'master' + - 'feature/IOS-6122_build_scripts' # temporary value workflow_dispatch: env: SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }} jobs: - create_tag: - name: Create tag - runs-on: macos-latest + create_tag_and_release: + name: Create tag and release + runs-on: macos-13 + concurrency: + group: ${{ github.ref }}_create_tag_and_release + cancel-in-progress: true steps: - name: Checkout uses: actions/checkout@v4 @@ -28,42 +32,61 @@ jobs: - name: Echo version.properties run: echo ${{ steps.version.outputs.tangem }} - - name: Create tag - uses: actions/github-script@v3 - if: False # temporarily disabled + - name: Create tag and release + uses: softprops/action-gh-release@v1 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - github.git.createRef({ - owner: context.repo.owner, - repo: context.repo.repo, - ref: "refs/tags/${{ steps.version.outputs.tangem }}", - sha: context.sha - }) + name: ${{ steps.version.outputs.tangem }} + tag_name: ${{ steps.version.outputs.tangem }} + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true + outputs: publish_version: ${{ steps.version.outputs.tangem }} publish_ios: name: Publish iOS - runs-on: macos-latest - needs: create_tag + runs-on: macos-13 + concurrency: + group: ${{ github.ref }}_publish_ios + cancel-in-progress: true + needs: create_tag_and_release steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-tags: true # Required otherwise git can't describe the repo; Doesn't actually work w/o 'fetch-depth', see https://github.com/actions/checkout/issues/1471 + fetch-depth: 0 - - name: Echo version.properties - run: echo ${{ needs.create_tag.outputs.publish_version }} + - name: Install dependencies + uses: ./.github/actions/install_dependencies_composite_action + + - name: Generate files + run: tools/generate-files ios + + - name: Build XCFramework + run: tools/ios-xcframework + + - name: Release XCFramework + env: + GITHUB_USER: ${{ secrets.GITHUB_ACTOR }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: tools/ios-xcframework-release publish_android: name: Publish Android - runs-on: macos-latest - needs: create_tag - if: False # temporarily disabled + runs-on: macos-13 + concurrency: + group: ${{ github.ref }}_publish_android + cancel-in-progress: true + needs: create_tag_and_release steps: - name: Checkout uses: actions/checkout@v4 - - name: set up JDK 17 + - name: Install dependencies + uses: ./.github/actions/install_dependencies_composite_action + + - name: Setup JDK 17 uses: actions/setup-java@v3 with: distribution: 'adopt' @@ -72,42 +95,18 @@ jobs: - name: Setup Gradle uses: gradle/gradle-build-action@v2 - - name: Install system dependencies - run: | - tools/install-sys-dependencies-mac - - name: Install Android Dependencies run: tools/install-android-dependencies - - name: Cache Rust - uses: Swatinem/rust-cache@v2 - with: - workspaces: | - rust - - - name: Install Rust dependencies - run: | - tools/install-rust-dependencies - - - name: Cache internal dependencies - id: internal_cache - uses: actions/cache@v3 - with: - path: build/local - key: ${{ runner.os }}-${{ runner.arch }}-internal-${{ hashFiles('tools/install-dependencies') }} - - - name: Install internal dependencies - run: tools/install-dependencies - if: steps.internal_cache.outputs.cache-hit != 'true' - - name: Generate files run: tools/generate-files android - name: Build and publish Android + if: false # temporarily disabled env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} run: | cd android/ echo sdk.dir = $ANDROID_HOME > local.properties - GITHUB_USER=${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ./gradlew build assembleRelease publish -Pversion=${{ needs.create_tag.outputs.publish_version }} + GITHUB_USER=${{ secrets.GITHUB_ACTOR }} GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} ./gradlew build assembleRelease publish -Pversion=${{ needs.create_tag_and_release.outputs.publish_version }} From 2ad5f6fb88b305b0d8bea0daad1e42a7257f6770 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Thu, 7 Mar 2024 11:44:07 +0300 Subject: [PATCH 07/16] IOS-6122: Bump version Signed-off-by: Andrey Fedorov --- version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.properties b/version.properties index 5aa54d5e02f..9d38ed9928c 100644 --- a/version.properties +++ b/version.properties @@ -1 +1 @@ -tangem=4.0.21-tangem3 +tangem=4.0.21-tangem4 From 1b52683272e38df8d559f105f67a2b170931a732 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Thu, 7 Mar 2024 11:46:31 +0300 Subject: [PATCH 08/16] IOS-6122: Update TODO Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 7bfd6f8ca9a..e79dafce37d 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -4,7 +4,7 @@ on: push: branches: - 'master' - - 'feature/IOS-6122_build_scripts' # temporary value + - 'feature/IOS-6122_build_scripts' # TODO: remove workflow_dispatch: env: From 014f6c2886cb63d9eecef546cbef0334399fc889 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 4 Jun 2024 12:47:15 +0200 Subject: [PATCH 09/16] Squashed commit of the following: commit e846300cc1b2587087de4bd3faee88c7b439d6e7 Author: Andrey Fedorov Date: Tue Jun 4 12:44:44 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 0e4d253a16706c0b1078e5cc84d32f8764906de0 Author: Andrey Fedorov Date: Tue Jun 4 12:42:54 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1bfc7681131bdbdd5bff8b93713d388f5c0e9f2c Author: Andrey Fedorov Date: Mon Jun 3 22:57:33 2024 +0200 Test 4 Signed-off-by: Andrey Fedorov commit 8926a2d59236dea179479bd09de6933f57b9f782 Author: Andrey Fedorov Date: Mon Jun 3 22:56:14 2024 +0200 Test 3 Signed-off-by: Andrey Fedorov commit db5e2715a806730a37467e310d25202635b9f17c Author: Andrey Fedorov Date: Mon Jun 3 22:54:24 2024 +0200 Test 2 Signed-off-by: Andrey Fedorov commit 3bec492c7902bab15943bed014f2e246d365a31b Author: Andrey Fedorov Date: Mon Jun 3 22:48:15 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 9c624d4f10273d2bee2d4cc17d8bdfdbfcbac035 Author: Andrey Fedorov Date: Mon Jun 3 22:46:43 2024 +0200 Test 1234 Signed-off-by: Andrey Fedorov commit 7dba7609139dbbfcc3fe394928ebe14f2f064db0 Author: Andrey Fedorov Date: Mon Jun 3 16:33:10 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 5c3e47e67d2b3e9a46e78b23b792374b62e90c18 Author: Andrey Fedorov Date: Mon Jun 3 16:26:49 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f0abda96194ca2eb75eb24f62b2103c595d7ac88 Author: Andrey Fedorov Date: Mon Jun 3 16:21:10 2024 +0200 Test release Signed-off-by: Andrey Fedorov commit c0d6346ce9a279ecadd4c80b2af01407bb2a879e Author: Andrey Fedorov Date: Mon Jun 3 13:33:19 2024 +0200 Enable some previously disabled jobs Signed-off-by: Andrey Fedorov commit 07bad1d3bdbbdaea9794454ad67a26a9993ee865 Author: Andrey Fedorov Date: Mon Jun 3 02:12:17 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8db1040b9e7c8bfa0825a9395b8ba0ed42eb012b Author: Andrey Fedorov Date: Mon Jun 3 01:40:21 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 9de486f4c5f1683c21609b3d7638442091ce8e04 Author: Andrey Fedorov Date: Mon Jun 3 01:11:22 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8d06583feb6f397cd7ef0e3bfcd1ee987ac629a7 Author: Andrey Fedorov Date: Mon Jun 3 01:09:40 2024 +0200 Test4 Signed-off-by: Andrey Fedorov commit 1782f901ea507aecef4be86948d912c0c1464279 Author: Andrey Fedorov Date: Mon Jun 3 01:07:58 2024 +0200 Test3 Signed-off-by: Andrey Fedorov commit eb889bca43bd2613252e6f890be09b545b2d740c Author: Andrey Fedorov Date: Mon Jun 3 01:04:10 2024 +0200 Test2 Signed-off-by: Andrey Fedorov commit 4fe89ef9e5eb483d1c4733327dced54eb1ac005d Author: Andrey Fedorov Date: Mon Jun 3 01:02:46 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 6b2d2d4bf4a9988d45ba5a2c08f8313f70d8b4b4 Author: Andrey Fedorov Date: Mon Jun 3 00:57:37 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 6ed2fe1eb331fea97353d7211b8763b4ddaf9d2b Author: Andrey Fedorov Date: Mon Jun 3 00:52:43 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 5d63630c331e7090622eb8f109557abb8b83f29c Author: Andrey Fedorov Date: Mon Jun 3 00:50:58 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8caa60662e41d990646c79876827acc45a50fe85 Author: Andrey Fedorov Date: Mon Jun 3 00:49:58 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 64ac445b414b762b9046705edf6d24a1b81c7eeb Author: Andrey Fedorov Date: Mon Jun 3 00:46:39 2024 +0200 test Signed-off-by: Andrey Fedorov commit 3fcb2421b3ea063e241134b32b4a27ba272560b2 Author: Andrey Fedorov Date: Mon Jun 3 00:44:50 2024 +0200 Test3 Signed-off-by: Andrey Fedorov commit 0582a4984a1a1b28465c6920d2f577d849e45004 Author: Andrey Fedorov Date: Mon Jun 3 00:40:55 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 7ecdc8d7c13d0b150729c5be192a19ba1a5145d9 Author: Andrey Fedorov Date: Mon Jun 3 00:38:59 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f33672e508427a4ce7426589f9eb8fd6148a0f2c Author: Andrey Fedorov Date: Mon Jun 3 00:34:03 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 116011084e1a1e2f96cc873981799b6567d5f5d5 Author: Andrey Fedorov Date: Mon Jun 3 00:32:36 2024 +0200 Fix Signed-off-by: Andrey Fedorov commit 1719475d9b543b7d68703d27c5e3c729a223f40d Author: Andrey Fedorov Date: Mon Jun 3 00:31:19 2024 +0200 Fix Signed-off-by: Andrey Fedorov commit fe23c27bac6a45b71cfec556f516ddc0fe1f0a90 Author: Andrey Fedorov Date: Mon Jun 3 00:30:36 2024 +0200 check_if_swift_protobuf_should_be_updated Signed-off-by: Andrey Fedorov commit 02b24bdc1db0f27d069d8fc43635a74d828587a1 Author: Andrey Fedorov Date: Mon Jun 3 00:15:32 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1b211a712043e0d89805d4b0d7db13bf7d119722 Author: Andrey Fedorov Date: Mon Jun 3 00:14:43 2024 +0200 Test Signed-off-by: Andrey Fedorov commit b3ec32d53ee6eaf1b2de4b2adc001df602fba21d Author: Andrey Fedorov Date: Sun Jun 2 23:51:20 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 14e78514b89bce2ac8f24376fd0b2bade90b5138 Author: Andrey Fedorov Date: Sun Jun 2 23:49:56 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8234b02d79499dbcd852fab996db3e86ba8bf4e2 Author: Andrey Fedorov Date: Sun Jun 2 23:47:14 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8c366457fb10a3554898b4c687aadb678f7e79d0 Author: Andrey Fedorov Date: Sun Jun 2 23:38:08 2024 +0200 Get rid of test step Signed-off-by: Andrey Fedorov commit 1df82cdb5abe503ed30e4b060d9ce0b997549619 Author: Andrey Fedorov Date: Sun Jun 2 23:37:00 2024 +0200 Extract swift-protobuf version into property file Signed-off-by: Andrey Fedorov commit 076717d1ef57854a62d7a926f9495857562d02bd Author: Andrey Fedorov Date: Sun Jun 2 14:48:57 2024 +0200 Add temp steps Signed-off-by: Andrey Fedorov commit 0223182242e8501f4cb6d9cb410bc718b6783298 Author: Andrey Fedorov Date: Sun Jun 2 14:45:11 2024 +0200 Select Xcode version Signed-off-by: Andrey Fedorov commit 1112a5b845c4654bc0bff1a67e6cd00fae832504 Author: Andrey Fedorov Date: Sun Jun 2 14:44:57 2024 +0200 Create tags in the destionation repos Signed-off-by: Andrey Fedorov commit 9b0d806721fdeaf51a9662258b81054b752d86e0 Author: Andrey Fedorov Date: Sun Jun 2 14:38:21 2024 +0200 Pin gh actions versions Signed-off-by: Andrey Fedorov commit 339009953eebeda2c9020625800ad771b86106b8 Author: Andrey Fedorov Date: Sun Jun 2 13:37:59 2024 +0200 Pin gh actions versions Signed-off-by: Andrey Fedorov commit 4e3bbdb92042ba2b84fb36c27752b7dedd45c608 Author: Andrey Fedorov Date: Wed May 29 03:39:06 2024 +0200 Test Signed-off-by: Andrey Fedorov commit dc0aab49ff3916a5f5121a97765c485cfbd6bb4d Author: Andrey Fedorov Date: Wed May 29 02:28:52 2024 +0200 Test Signed-off-by: Andrey Fedorov commit e6c474a5ca5f8ae55c5897b4dcc626018c47ac62 Author: Andrey Fedorov Date: Wed May 29 02:25:18 2024 +0200 Test Signed-off-by: Andrey Fedorov commit bc63c1e49ce30b92f05b6bf29678ff2d2a85ccb4 Author: Andrey Fedorov Date: Wed May 29 01:33:50 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 95bec5966c86234b05780cccd29eae5e49ce967f Author: Andrey Fedorov Date: Wed May 29 00:57:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit b094be7f51d277cdaf022e582b142a4c5b9248cc Author: Andrey Fedorov Date: Wed May 29 00:15:49 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 3c20205fcec8be6b875503903d016db9e5867c10 Author: Andrey Fedorov Date: Tue May 28 17:17:08 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1c4085c08a04f6f28d319e462dcc107b2c64b195 Author: Andrey Fedorov Date: Tue May 28 16:30:28 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 657ab5db91d5ab754e44faad89b7d9c5c53e11b2 Author: Andrey Fedorov Date: Tue May 28 16:25:07 2024 +0200 Update used macos and xcode versions Signed-off-by: Andrey Fedorov commit f824cea43c8b5f2b59243382754069930cdce429 Author: Andrey Fedorov Date: Tue May 28 13:52:02 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f4f82f27c75a4e659d6be95f2d8ba5c4048b2690 Author: Andrey Fedorov Date: Tue May 28 13:42:31 2024 +0200 Test Signed-off-by: Andrey Fedorov commit cd1f30ed9e12aa7a0c7c080c0ddd66c451fc4c82 Author: Andrey Fedorov Date: Tue May 28 12:39:11 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 30e1f78eec904b5743421929ec6ba1316d243fc4 Author: Andrey Fedorov Date: Tue May 28 11:14:27 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 4ab852583894e44c6edb4dd6dd38853b845a3ad7 Author: Andrey Fedorov Date: Tue May 28 11:10:33 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 5bc37249a22eef46897693dde1b5560e367d24e9 Author: Andrey Fedorov Date: Tue May 28 04:26:18 2024 +0200 Test Signed-off-by: Andrey Fedorov commit bd0cd14b6dce8eee331abd272908f09a6809816b Author: Andrey Fedorov Date: Tue May 28 04:21:34 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f3c15420658940cd78fce74c7d687846aed6f688 Author: Andrey Fedorov Date: Fri May 24 19:07:13 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 48623fc4ef3a1e10c224d39a1cf1582c12a89c3a Author: Andrey Fedorov Date: Fri May 24 19:04:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 2775f9f3a77547d60caa6a6efa79e21657468fb8 Author: Andrey Fedorov Date: Fri May 24 19:01:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit d606e0ba7a7691fdff741c62d277eda1d502fdf0 Author: Andrey Fedorov Date: Fri May 24 18:59:48 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1d7d1375045ff8e3d04dd2c348f76bd388e3ba8c Author: Andrey Fedorov Date: Fri May 24 18:45:33 2024 +0200 Test Signed-off-by: Andrey Fedorov commit ef40ac62bd47461ac311cf5283004699fa22856e Author: Andrey Fedorov Date: Tue May 21 01:21:53 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit 9ae10c7f9366469901156f82e68dbe521b15b82c Author: Andrey Fedorov Date: Tue May 21 01:15:10 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit aa28e768e252cdea1fcba9c0260cb8323028a216 Author: Andrey Fedorov Date: Tue May 21 01:13:51 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit c57400aeb3124423d66a10d7690b69c1508820ae Author: Andrey Fedorov Date: Mon May 20 23:47:00 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit 729e186fb4e0f29d4d76d3744d3b032469d4ff8f Author: Andrey Fedorov Date: Mon May 20 21:07:23 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit cb400a66ca8572991a07ddb48d197907afea4e3a Author: Andrey Fedorov Date: Mon May 20 16:48:22 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit 30735d8c81d0a4a4b61a849ad1782ea27bc93fc3 Author: Andrey Fedorov Date: Mon May 20 16:06:09 2024 +0200 Temp Signed-off-by: Andrey Fedorov Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-check-tag.yml | 4 +- .github/workflows/tangem-publish.yml | 145 ++++++++++++++++-- swift-protobuf-version.properties | 9 ++ swift/Podfile | 4 + .../check_if_swift_protobuf_should_be_updated | 10 ++ tools/dependencies-version | 11 +- 6 files changed, 165 insertions(+), 18 deletions(-) create mode 100644 swift-protobuf-version.properties create mode 100755 tools/check_if_swift_protobuf_should_be_updated diff --git a/.github/workflows/tangem-check-tag.yml b/.github/workflows/tangem-check-tag.yml index dbbd19e5c36..35e60658807 100644 --- a/.github/workflows/tangem-check-tag.yml +++ b/.github/workflows/tangem-check-tag.yml @@ -12,12 +12,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Read version.properties file - uses: BrycensRanch/read-properties-action@v1 + uses: BrycensRanch/read-properties-action@6b75d8ab70d5abeb5211f96b660c45c911732b6e # v1.0.4 id: version with: file: version.properties diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index e79dafce37d..a97de93e5e4 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -5,6 +5,7 @@ on: branches: - 'master' - 'feature/IOS-6122_build_scripts' # TODO: remove + - 'test/IOS-6122_build_scripts' # TODO: remove workflow_dispatch: env: @@ -13,7 +14,10 @@ env: jobs: create_tag_and_release: name: Create tag and release - runs-on: macos-13 + runs-on: macos-latest + outputs: + publish_version: ${{ steps.version.outputs.tangem }} + swift_protobuf_publish_version: ${{ steps.swift_protobuf_version.outputs.version_tag }}-${{ steps.swift_protobuf_version.outputs.tangem_suffix }} concurrency: group: ${{ github.ref }}_create_tag_and_release cancel-in-progress: true @@ -22,41 +26,68 @@ jobs: uses: actions/checkout@v4 - name: Read version.properties file - uses: BrycensRanch/read-properties-action@v1 + uses: BrycensRanch/read-properties-action@6b75d8ab70d5abeb5211f96b660c45c911732b6e # v1.0.4 id: version with: file: version.properties property: tangem default: 0.0.1-tangem1 - - name: Echo version.properties - run: echo ${{ steps.version.outputs.tangem }} + - name: Read swift-protobuf-version.properties file + uses: BrycensRanch/read-properties-action@6b75d8ab70d5abeb5211f96b660c45c911732b6e # v1.0.4 + id: swift_protobuf_version + with: + file: swift-protobuf-version.properties + all: true + + - name: Echo versions + run: | + echo 'Publishing WalletCore version ${{ steps.version.outputs.tangem }}' + echo 'Publishing SwiftProtobuf version ${{ steps.swift_protobuf_version.outputs.version_tag }}-${{ steps.swift_protobuf_version.outputs.tangem_suffix }}' - name: Create tag and release - uses: softprops/action-gh-release@v1 + if: false # temporarily disabled + uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 with: name: ${{ steps.version.outputs.tangem }} tag_name: ${{ steps.version.outputs.tangem }} token: ${{ secrets.GITHUB_TOKEN }} generate_release_notes: true - outputs: - publish_version: ${{ steps.version.outputs.tangem }} + # TODO: Remove + - name: Create tag and release test + uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 + with: + target_commitish: test/IOS-6122_build_scripts # TODO: remove since the default branch ('main') should be used as a target + tag_name: test_tag_1 + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true + repository: tangem/wallet-core-binaries-ios publish_ios: name: Publish iOS - runs-on: macos-13 + runs-on: macos-latest + outputs: + should_update_swift_protobuf: ${{ env.SHOULD_UPDATE_SWIFT_PROTOBUF }} concurrency: group: ${{ github.ref }}_publish_ios cancel-in-progress: true needs: create_tag_and_release steps: + - name: Select Xcode version + uses: maxim-lobanov/setup-xcode@60606e260d2fc5762a71e64e74b2174e8ea3c8bd # v1.6.0 + with: + xcode-version: '15.4' + - name: Checkout uses: actions/checkout@v4 with: fetch-tags: true # Required otherwise git can't describe the repo; Doesn't actually work w/o 'fetch-depth', see https://github.com/actions/checkout/issues/1471 fetch-depth: 0 + - name: Check if SwiftProtobuf binary must be updated + run: tools/check_if_swift_protobuf_should_be_updated "https://github.com/tangem/swift-protobuf-binaries.git" "${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }}" + - name: Install dependencies uses: ./.github/actions/install_dependencies_composite_action @@ -66,11 +97,101 @@ jobs: - name: Build XCFramework run: tools/ios-xcframework - - name: Release XCFramework + - name: Prepare artefacts + run: | + mkdir -p output/artefacts/wallet-core + mkdir -p output/artefacts/swift-protobuf + mv swift/build/WalletCore.xcframework output/artefacts/wallet-core/ + mv swift/build/SwiftProtobuf.xcframework output/artefacts/swift-protobuf/ + + - name: Upload WalletCore artefacts + uses: actions/upload-artifact@v4 + with: + name: wallet-core-binary-artefacts-${{ github.sha }} + path: output/artefacts/wallet-core/ + + - name: Upload SwiftProtobuf artefacts + uses: actions/upload-artifact@v4 + with: + name: swift-protobuf-binary-artefacts-${{ github.sha }} + path: output/artefacts/swift-protobuf/ + + # TODO: Upload dSYMs + + upload_wallet_core_binaries_ios: + name: Upload WalletCore binaries iOS + runs-on: ubuntu-latest + concurrency: + group: ${{ github.ref }}_upload_wallet_core_binaries_ios + cancel-in-progress: true + needs: + - publish_ios + - create_tag_and_release + steps: + - name: Download artefacts + uses: actions/download-artifact@v4 + with: + name: wallet-core-binary-artefacts-${{ github.sha }} + path: output + + - name: Update wallet-core-binaries-ios repo + uses: cpina/github-action-push-to-another-repository@07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900 # v.1.7.2 env: - GITHUB_USER: ${{ secrets.GITHUB_ACTOR }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: tools/ios-xcframework-release + SSH_DEPLOY_KEY: ${{ secrets.WALLET_CORE_BINARIES_IOS_SSH_DEPLOY_KEY }} + with: + source-directory: 'output/WalletCore.xcframework' + destination-github-username: 'tangem' + destination-repository-name: 'wallet-core-binaries-ios' + target-branch: 'test/IOS-6122_build_scripts' # TODO: change to 'main' + target-directory: 'WalletCore.xcframework' + + - name: Create tag and release + uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 + with: + tag_name: ${{ needs.create_tag_and_release.outputs.publish_version }} + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true + make_latest: true + repository: 'tangem/wallet-core-binaries-ios' + target_commitish: 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target + + upload_swift_protobuf_binaries_ios: + name: Upload SwiftProtobuf binaries iOS + if: needs.publish_ios.outputs.should_update_swift_protobuf == 1 + runs-on: ubuntu-latest + concurrency: + group: ${{ github.ref }}_upload_swift_protobuf_binaries_ios + cancel-in-progress: true + needs: + - publish_ios + - create_tag_and_release + steps: + - name: Download artefacts + uses: actions/download-artifact@v4 + with: + name: swift-protobuf-binary-artefacts-${{ github.sha }} + path: output + + - name: Update swift-protobuf-binaries repo + uses: cpina/github-action-push-to-another-repository@07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900 # v.1.7.2 + env: + SSH_DEPLOY_KEY: ${{ secrets.SWIFT_PROTOBUF_BINARIES_SSH_DEPLOY_KEY }} + with: + source-directory: 'output/SwiftProtobuf.xcframework' + destination-github-username: 'tangem' + destination-repository-name: 'swift-protobuf-binaries' + target-branch: 'test/IOS-6122_build_scripts' # TODO: change to 'main' + target-directory: 'SwiftProtobuf.xcframework' + + - name: Create tag and release + uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 + with: + tag_name: ${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }} + token: ${{ secrets.GITHUB_TOKEN }} + generate_release_notes: true + make_latest: true + repository: 'tangem/swift-protobuf-binaries' + target_commitish: 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target publish_android: name: Publish Android diff --git a/swift-protobuf-version.properties b/swift-protobuf-version.properties new file mode 100644 index 00000000000..bf94f892213 --- /dev/null +++ b/swift-protobuf-version.properties @@ -0,0 +1,9 @@ +# Version tag from https://github.com/apple/swift-protobuf/releases +# +# 1. The SwiftProtobuf library version must match the version specified in the `swift/Podfile` file. +# 2. Before upgrading, make sure that the new version of the SwiftProtobuf library is compatible with other consumers +# of the binary artifact (`grpc-swift`, `hedera-sdk-swift`, `SwiftBinanceChain`, `blockchain-sdk-swift` and so on). +version_tag=1.25.2 + +# Additional suffix for Tangem-specifc intermediate builds +tangem_suffix=tangem2 diff --git a/swift/Podfile b/swift/Podfile index 1301f1c2e93..a35beddff4c 100644 --- a/swift/Podfile +++ b/swift/Podfile @@ -9,6 +9,10 @@ project 'TrustWalletCore.xcodeproj' target 'WalletCore' do use_frameworks! + # 1. The SwiftProtobuf library version must match the version specified in the `swift-protobuf-version.properties` file + # (`version_tag` property in this file). + # 2. Before upgrading, make sure that the new version of the SwiftProtobuf library is compatible with other consumers + # of the binary artifact (`grpc-swift`, `hedera-sdk-swift`, `SwiftBinanceChain`, `blockchain-sdk-swift` and so on). pod 'SwiftProtobuf', '=1.25.2' target 'WalletCoreTests' diff --git a/tools/check_if_swift_protobuf_should_be_updated b/tools/check_if_swift_protobuf_should_be_updated new file mode 100755 index 00000000000..2155834fb84 --- /dev/null +++ b/tools/check_if_swift_protobuf_should_be_updated @@ -0,0 +1,10 @@ +#!/bin/bash + +repo_url=$1 +repo_tag=$2 + +if git ls-remote --tags $repo_url | grep -q "refs/tags/$repo_tag"; then + echo "SHOULD_UPDATE_SWIFT_PROTOBUF=0" >> $GITHUB_ENV +else + echo "SHOULD_UPDATE_SWIFT_PROTOBUF=1" >> $GITHUB_ENV +fi diff --git a/tools/dependencies-version b/tools/dependencies-version index 8fcbb974ab0..b33dff237d4 100755 --- a/tools/dependencies-version +++ b/tools/dependencies-version @@ -1,10 +1,13 @@ #!/bin/bash +get_property() { + local property_file=$1 + local property_key=$2 + grep "^$property_key=" "$property_file" | cut -d'=' -f2 +} + export GTEST_VERSION=1.11.0 export CHECK_VERSION=0.15.2 export JSON_VERSION=3.10.2 export PROTOBUF_VERSION=3.19.2 - -# Before upgrading, make sure that the new version of the SwiftProtobuf library is compatible with other consumers -# of the binary artifact (grpc-swift, hedera-sdk-swift, SwiftBinanceChain, blockchain-sdk-swift and so on) -export SWIFT_PROTOBUF_VERSION=1.25.2 +export SWIFT_PROTOBUF_VERSION=$(get_property "swift-protobuf-version.properties" "version_tag") From 25b1ff94882c8fa520a82509ebc787d96811587f Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 11 Jun 2024 03:27:02 +0200 Subject: [PATCH 10/16] Squashed commit of the following: commit 75eb17ad0aba2f443a024f02eef3228ca647b34f Author: Andrey Fedorov Date: Tue Jun 11 03:22:16 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8f963b8d2ef367a5963f2538ab96f7bce0a05bd7 Author: Andrey Fedorov Date: Tue Jun 11 03:18:10 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 761506a9130a19dcd517c18f5fd00bbed9cf5965 Author: Andrey Fedorov Date: Tue Jun 11 03:16:09 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 2585a9b74fdefb4ac7e954b5e1261674c5dce692 Author: Andrey Fedorov Date: Tue Jun 11 00:46:03 2024 +0200 Test Signed-off-by: Andrey Fedorov commit c1dceec07662971d72780aea99071b9375574d26 Author: Andrey Fedorov Date: Mon Jun 10 23:56:04 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 6ad9401aac0f0909aa659464650dc5c2e3ed110e Author: Andrey Fedorov Date: Mon Jun 10 23:55:10 2024 +0200 Test Signed-off-by: Andrey Fedorov commit aa2e33b994a1a00fcbda4289f730ad7894629406 Author: Andrey Fedorov Date: Mon Jun 10 23:00:08 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 9ec02e361f5805f74316e7deba25980c7dba3742 Author: Andrey Fedorov Date: Mon Jun 10 22:44:21 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 41f097d4a7c5d2719616e1687d51aa0994fc49a9 Author: Andrey Fedorov Date: Mon Jun 10 22:28:49 2024 +0200 Test Signed-off-by: Andrey Fedorov commit aa27be1fe80d639bfc3b3b5d1aca997a98016fc6 Author: Andrey Fedorov Date: Mon Jun 10 22:22:37 2024 +0200 Test Signed-off-by: Andrey Fedorov commit af28819c75e2f4091b19b58d7aedee928a06a95e Author: Andrey Fedorov Date: Mon Jun 10 22:08:42 2024 +0200 Test Signed-off-by: Andrey Fedorov commit e8f7b047e6e134e73448289980d5134ffb972bf1 Author: Andrey Fedorov Date: Mon Jun 10 21:50:47 2024 +0200 Test Signed-off-by: Andrey Fedorov commit c3c59f3a7c732c6627b36deaad287a20247ab126 Author: Andrey Fedorov Date: Mon Jun 10 21:45:45 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 470d491c7b553e13cb5918ccbe2eb4621c637e17 Author: Andrey Fedorov Date: Mon Jun 10 21:44:15 2024 +0200 test Signed-off-by: Andrey Fedorov commit 5bbd8a4206780e46895f08e983ab0a54ff02bc0f Author: Andrey Fedorov Date: Mon Jun 10 21:02:34 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 87f110f87a96ae37dfe0d6e928a296ab28a15f12 Author: Andrey Fedorov Date: Mon Jun 10 02:34:32 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 6038982bfae92d405ace039dc2d6600838a12691 Author: Andrey Fedorov Date: Mon Jun 10 01:37:52 2024 +0200 Test Signed-off-by: Andrey Fedorov commit a3757111a01b3d701e9eb4da3cc14c0d8c7be504 Author: Andrey Fedorov Date: Mon Jun 10 01:30:56 2024 +0200 Test Signed-off-by: Andrey Fedorov commit a7ff7437ff78113302ab44175901eed26ff921be Author: Andrey Fedorov Date: Mon Jun 10 01:29:21 2024 +0200 Test Signed-off-by: Andrey Fedorov commit af4b1ba95adc2b5c7824dd4ffa440ffd0f2c4df1 Author: Andrey Fedorov Date: Mon Jun 10 01:27:56 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 2acef4f66b0bdb6eaf4ef168cf885a43195bf808 Author: Andrey Fedorov Date: Mon Jun 10 01:25:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit d1cca9fc575a9dd50aa25a4ab9678eb95799fe57 Author: Andrey Fedorov Date: Mon Jun 10 01:24:19 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 651538902360d562e8ffd54e0099df78c77e377d Author: Andrey Fedorov Date: Mon Jun 10 01:23:15 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 7c5622bff3572ff32b8c94565a8310d7c41350a3 Author: Andrey Fedorov Date: Mon Jun 10 01:20:16 2024 +0200 Test Signed-off-by: Andrey Fedorov commit bc4d65240a279b04175c429be32d0f77306314cb Author: Andrey Fedorov Date: Mon Jun 10 01:18:50 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 292804ef6b9aa20c338e0c6b00e220ba39a45250 Author: Andrey Fedorov Date: Mon Jun 10 01:17:22 2024 +0200 Test Signed-off-by: Andrey Fedorov commit ca99dd3660522708f58f65b93df48729ccd4c889 Author: Andrey Fedorov Date: Mon Jun 10 01:15:56 2024 +0200 Test Signed-off-by: Andrey Fedorov commit a147fdead1757fb942b532c83cef6972f613e624 Author: Andrey Fedorov Date: Mon Jun 10 01:13:24 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 700cc54aa2cd3110ab7cd88c44fdd11c842822a1 Author: Andrey Fedorov Date: Mon Jun 10 00:47:11 2024 +0200 Test Signed-off-by: Andrey Fedorov commit b478eb8ac8624c51d909e31e52f14006522385fa Author: Andrey Fedorov Date: Mon Jun 10 00:45:00 2024 +0200 Test 22 Signed-off-by: Andrey Fedorov commit 7c01bc0c0285b96e2a74a1fbba04dbff13cc5798 Author: Andrey Fedorov Date: Fri Jun 7 12:24:59 2024 +0200 Test 21 Signed-off-by: Andrey Fedorov commit eede5e9146203f5d286aca7245e888ef7cba8046 Author: Andrey Fedorov Date: Fri Jun 7 10:28:30 2024 +0200 Test 20 Signed-off-by: Andrey Fedorov commit 170f2f54bbf8ae4f53396eba5414950c61c57361 Author: Andrey Fedorov Date: Thu Jun 6 04:11:40 2024 +0200 Test 19 Signed-off-by: Andrey Fedorov commit 528806f6553cf78706870bcb592dfce8ad662fff Author: Andrey Fedorov Date: Wed Jun 5 16:24:44 2024 +0200 Test 18 Signed-off-by: Andrey Fedorov commit f1f10a88f4b9da68d9506a7a79c8277cc7b1574f Author: Andrey Fedorov Date: Wed Jun 5 16:01:11 2024 +0200 Test 17 Signed-off-by: Andrey Fedorov commit da06c7a27114575042b32547133a3a88c69eeb70 Author: Andrey Fedorov Date: Wed Jun 5 14:36:46 2024 +0200 Test 16 Signed-off-by: Andrey Fedorov commit 91664142bd7b990bf810cf3e3dd0f203996a13f5 Author: Andrey Fedorov Date: Wed Jun 5 14:30:05 2024 +0200 Test 15 Signed-off-by: Andrey Fedorov commit e1b512b62aa3cfefa689608510e2aea130de8424 Author: Andrey Fedorov Date: Wed Jun 5 13:54:30 2024 +0200 Test 14 Signed-off-by: Andrey Fedorov commit 1af6b4c3fa9a1dfacda5ac80e2f0996ac478a3c5 Author: Andrey Fedorov Date: Wed Jun 5 13:53:12 2024 +0200 Test 13 Signed-off-by: Andrey Fedorov commit f55ed154bef1e15214a92b49c04be2d20eeeb9ea Author: Andrey Fedorov Date: Wed Jun 5 13:41:02 2024 +0200 Test 12 Signed-off-by: Andrey Fedorov commit 5e0e5fd960d51c6b41c840ded9172da3261a8d9c Author: Andrey Fedorov Date: Wed Jun 5 13:35:27 2024 +0200 Test 11 Signed-off-by: Andrey Fedorov commit 5c73b04d8acf904916fcbb8a4b127bfc310775db Author: Andrey Fedorov Date: Wed Jun 5 13:33:59 2024 +0200 Test 10 Signed-off-by: Andrey Fedorov commit 2424af65877ef43eac51dde79384fcddb12d1d44 Author: Andrey Fedorov Date: Tue Jun 4 21:37:53 2024 +0200 Test 9 Signed-off-by: Andrey Fedorov commit 5d568cc8702d8370c4a510084c420379c668352c Author: Andrey Fedorov Date: Tue Jun 4 21:36:15 2024 +0200 Test 8 Signed-off-by: Andrey Fedorov commit 8a5a24459ecf52306f06b7f0e21fc3f4c2e63b96 Author: Andrey Fedorov Date: Tue Jun 4 21:24:20 2024 +0200 Test 7 Signed-off-by: Andrey Fedorov commit d0db4320bad858d488fa9f212cde53a09977630f Author: Andrey Fedorov Date: Tue Jun 4 21:20:43 2024 +0200 Test 6 Signed-off-by: Andrey Fedorov commit 6e0582e5ab334d02971f2482f733fff6433b9b48 Author: Andrey Fedorov Date: Tue Jun 4 21:13:20 2024 +0200 Test 5 Signed-off-by: Andrey Fedorov commit c0217fc0e735d6aef2b421dea4b6a6c45f46462a Author: Andrey Fedorov Date: Tue Jun 4 21:11:09 2024 +0200 Use PAT Signed-off-by: Andrey Fedorov commit e846300cc1b2587087de4bd3faee88c7b439d6e7 Author: Andrey Fedorov Date: Tue Jun 4 12:44:44 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 0e4d253a16706c0b1078e5cc84d32f8764906de0 Author: Andrey Fedorov Date: Tue Jun 4 12:42:54 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1bfc7681131bdbdd5bff8b93713d388f5c0e9f2c Author: Andrey Fedorov Date: Mon Jun 3 22:57:33 2024 +0200 Test 4 Signed-off-by: Andrey Fedorov commit 8926a2d59236dea179479bd09de6933f57b9f782 Author: Andrey Fedorov Date: Mon Jun 3 22:56:14 2024 +0200 Test 3 Signed-off-by: Andrey Fedorov commit db5e2715a806730a37467e310d25202635b9f17c Author: Andrey Fedorov Date: Mon Jun 3 22:54:24 2024 +0200 Test 2 Signed-off-by: Andrey Fedorov commit 3bec492c7902bab15943bed014f2e246d365a31b Author: Andrey Fedorov Date: Mon Jun 3 22:48:15 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 9c624d4f10273d2bee2d4cc17d8bdfdbfcbac035 Author: Andrey Fedorov Date: Mon Jun 3 22:46:43 2024 +0200 Test 1234 Signed-off-by: Andrey Fedorov commit 7dba7609139dbbfcc3fe394928ebe14f2f064db0 Author: Andrey Fedorov Date: Mon Jun 3 16:33:10 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 5c3e47e67d2b3e9a46e78b23b792374b62e90c18 Author: Andrey Fedorov Date: Mon Jun 3 16:26:49 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f0abda96194ca2eb75eb24f62b2103c595d7ac88 Author: Andrey Fedorov Date: Mon Jun 3 16:21:10 2024 +0200 Test release Signed-off-by: Andrey Fedorov commit c0d6346ce9a279ecadd4c80b2af01407bb2a879e Author: Andrey Fedorov Date: Mon Jun 3 13:33:19 2024 +0200 Enable some previously disabled jobs Signed-off-by: Andrey Fedorov commit 07bad1d3bdbbdaea9794454ad67a26a9993ee865 Author: Andrey Fedorov Date: Mon Jun 3 02:12:17 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8db1040b9e7c8bfa0825a9395b8ba0ed42eb012b Author: Andrey Fedorov Date: Mon Jun 3 01:40:21 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 9de486f4c5f1683c21609b3d7638442091ce8e04 Author: Andrey Fedorov Date: Mon Jun 3 01:11:22 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8d06583feb6f397cd7ef0e3bfcd1ee987ac629a7 Author: Andrey Fedorov Date: Mon Jun 3 01:09:40 2024 +0200 Test4 Signed-off-by: Andrey Fedorov commit 1782f901ea507aecef4be86948d912c0c1464279 Author: Andrey Fedorov Date: Mon Jun 3 01:07:58 2024 +0200 Test3 Signed-off-by: Andrey Fedorov commit eb889bca43bd2613252e6f890be09b545b2d740c Author: Andrey Fedorov Date: Mon Jun 3 01:04:10 2024 +0200 Test2 Signed-off-by: Andrey Fedorov commit 4fe89ef9e5eb483d1c4733327dced54eb1ac005d Author: Andrey Fedorov Date: Mon Jun 3 01:02:46 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 6b2d2d4bf4a9988d45ba5a2c08f8313f70d8b4b4 Author: Andrey Fedorov Date: Mon Jun 3 00:57:37 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 6ed2fe1eb331fea97353d7211b8763b4ddaf9d2b Author: Andrey Fedorov Date: Mon Jun 3 00:52:43 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 5d63630c331e7090622eb8f109557abb8b83f29c Author: Andrey Fedorov Date: Mon Jun 3 00:50:58 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8caa60662e41d990646c79876827acc45a50fe85 Author: Andrey Fedorov Date: Mon Jun 3 00:49:58 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 64ac445b414b762b9046705edf6d24a1b81c7eeb Author: Andrey Fedorov Date: Mon Jun 3 00:46:39 2024 +0200 test Signed-off-by: Andrey Fedorov commit 3fcb2421b3ea063e241134b32b4a27ba272560b2 Author: Andrey Fedorov Date: Mon Jun 3 00:44:50 2024 +0200 Test3 Signed-off-by: Andrey Fedorov commit 0582a4984a1a1b28465c6920d2f577d849e45004 Author: Andrey Fedorov Date: Mon Jun 3 00:40:55 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 7ecdc8d7c13d0b150729c5be192a19ba1a5145d9 Author: Andrey Fedorov Date: Mon Jun 3 00:38:59 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f33672e508427a4ce7426589f9eb8fd6148a0f2c Author: Andrey Fedorov Date: Mon Jun 3 00:34:03 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 116011084e1a1e2f96cc873981799b6567d5f5d5 Author: Andrey Fedorov Date: Mon Jun 3 00:32:36 2024 +0200 Fix Signed-off-by: Andrey Fedorov commit 1719475d9b543b7d68703d27c5e3c729a223f40d Author: Andrey Fedorov Date: Mon Jun 3 00:31:19 2024 +0200 Fix Signed-off-by: Andrey Fedorov commit fe23c27bac6a45b71cfec556f516ddc0fe1f0a90 Author: Andrey Fedorov Date: Mon Jun 3 00:30:36 2024 +0200 check_if_swift_protobuf_should_be_updated Signed-off-by: Andrey Fedorov commit 02b24bdc1db0f27d069d8fc43635a74d828587a1 Author: Andrey Fedorov Date: Mon Jun 3 00:15:32 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1b211a712043e0d89805d4b0d7db13bf7d119722 Author: Andrey Fedorov Date: Mon Jun 3 00:14:43 2024 +0200 Test Signed-off-by: Andrey Fedorov commit b3ec32d53ee6eaf1b2de4b2adc001df602fba21d Author: Andrey Fedorov Date: Sun Jun 2 23:51:20 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 14e78514b89bce2ac8f24376fd0b2bade90b5138 Author: Andrey Fedorov Date: Sun Jun 2 23:49:56 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8234b02d79499dbcd852fab996db3e86ba8bf4e2 Author: Andrey Fedorov Date: Sun Jun 2 23:47:14 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 8c366457fb10a3554898b4c687aadb678f7e79d0 Author: Andrey Fedorov Date: Sun Jun 2 23:38:08 2024 +0200 Get rid of test step Signed-off-by: Andrey Fedorov commit 1df82cdb5abe503ed30e4b060d9ce0b997549619 Author: Andrey Fedorov Date: Sun Jun 2 23:37:00 2024 +0200 Extract swift-protobuf version into property file Signed-off-by: Andrey Fedorov commit 076717d1ef57854a62d7a926f9495857562d02bd Author: Andrey Fedorov Date: Sun Jun 2 14:48:57 2024 +0200 Add temp steps Signed-off-by: Andrey Fedorov commit 0223182242e8501f4cb6d9cb410bc718b6783298 Author: Andrey Fedorov Date: Sun Jun 2 14:45:11 2024 +0200 Select Xcode version Signed-off-by: Andrey Fedorov commit 1112a5b845c4654bc0bff1a67e6cd00fae832504 Author: Andrey Fedorov Date: Sun Jun 2 14:44:57 2024 +0200 Create tags in the destionation repos Signed-off-by: Andrey Fedorov commit 9b0d806721fdeaf51a9662258b81054b752d86e0 Author: Andrey Fedorov Date: Sun Jun 2 14:38:21 2024 +0200 Pin gh actions versions Signed-off-by: Andrey Fedorov commit 339009953eebeda2c9020625800ad771b86106b8 Author: Andrey Fedorov Date: Sun Jun 2 13:37:59 2024 +0200 Pin gh actions versions Signed-off-by: Andrey Fedorov commit 4e3bbdb92042ba2b84fb36c27752b7dedd45c608 Author: Andrey Fedorov Date: Wed May 29 03:39:06 2024 +0200 Test Signed-off-by: Andrey Fedorov commit dc0aab49ff3916a5f5121a97765c485cfbd6bb4d Author: Andrey Fedorov Date: Wed May 29 02:28:52 2024 +0200 Test Signed-off-by: Andrey Fedorov commit e6c474a5ca5f8ae55c5897b4dcc626018c47ac62 Author: Andrey Fedorov Date: Wed May 29 02:25:18 2024 +0200 Test Signed-off-by: Andrey Fedorov commit bc63c1e49ce30b92f05b6bf29678ff2d2a85ccb4 Author: Andrey Fedorov Date: Wed May 29 01:33:50 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 95bec5966c86234b05780cccd29eae5e49ce967f Author: Andrey Fedorov Date: Wed May 29 00:57:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit b094be7f51d277cdaf022e582b142a4c5b9248cc Author: Andrey Fedorov Date: Wed May 29 00:15:49 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 3c20205fcec8be6b875503903d016db9e5867c10 Author: Andrey Fedorov Date: Tue May 28 17:17:08 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1c4085c08a04f6f28d319e462dcc107b2c64b195 Author: Andrey Fedorov Date: Tue May 28 16:30:28 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 657ab5db91d5ab754e44faad89b7d9c5c53e11b2 Author: Andrey Fedorov Date: Tue May 28 16:25:07 2024 +0200 Update used macos and xcode versions Signed-off-by: Andrey Fedorov commit f824cea43c8b5f2b59243382754069930cdce429 Author: Andrey Fedorov Date: Tue May 28 13:52:02 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f4f82f27c75a4e659d6be95f2d8ba5c4048b2690 Author: Andrey Fedorov Date: Tue May 28 13:42:31 2024 +0200 Test Signed-off-by: Andrey Fedorov commit cd1f30ed9e12aa7a0c7c080c0ddd66c451fc4c82 Author: Andrey Fedorov Date: Tue May 28 12:39:11 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 30e1f78eec904b5743421929ec6ba1316d243fc4 Author: Andrey Fedorov Date: Tue May 28 11:14:27 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 4ab852583894e44c6edb4dd6dd38853b845a3ad7 Author: Andrey Fedorov Date: Tue May 28 11:10:33 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 5bc37249a22eef46897693dde1b5560e367d24e9 Author: Andrey Fedorov Date: Tue May 28 04:26:18 2024 +0200 Test Signed-off-by: Andrey Fedorov commit bd0cd14b6dce8eee331abd272908f09a6809816b Author: Andrey Fedorov Date: Tue May 28 04:21:34 2024 +0200 Test Signed-off-by: Andrey Fedorov commit f3c15420658940cd78fce74c7d687846aed6f688 Author: Andrey Fedorov Date: Fri May 24 19:07:13 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 48623fc4ef3a1e10c224d39a1cf1582c12a89c3a Author: Andrey Fedorov Date: Fri May 24 19:04:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 2775f9f3a77547d60caa6a6efa79e21657468fb8 Author: Andrey Fedorov Date: Fri May 24 19:01:39 2024 +0200 Test Signed-off-by: Andrey Fedorov commit d606e0ba7a7691fdff741c62d277eda1d502fdf0 Author: Andrey Fedorov Date: Fri May 24 18:59:48 2024 +0200 Test Signed-off-by: Andrey Fedorov commit 1d7d1375045ff8e3d04dd2c348f76bd388e3ba8c Author: Andrey Fedorov Date: Fri May 24 18:45:33 2024 +0200 Test Signed-off-by: Andrey Fedorov commit ef40ac62bd47461ac311cf5283004699fa22856e Author: Andrey Fedorov Date: Tue May 21 01:21:53 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit 9ae10c7f9366469901156f82e68dbe521b15b82c Author: Andrey Fedorov Date: Tue May 21 01:15:10 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit aa28e768e252cdea1fcba9c0260cb8323028a216 Author: Andrey Fedorov Date: Tue May 21 01:13:51 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit c57400aeb3124423d66a10d7690b69c1508820ae Author: Andrey Fedorov Date: Mon May 20 23:47:00 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit 729e186fb4e0f29d4d76d3744d3b032469d4ff8f Author: Andrey Fedorov Date: Mon May 20 21:07:23 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit cb400a66ca8572991a07ddb48d197907afea4e3a Author: Andrey Fedorov Date: Mon May 20 16:48:22 2024 +0200 Temp Signed-off-by: Andrey Fedorov commit 30735d8c81d0a4a4b61a849ad1782ea27bc93fc3 Author: Andrey Fedorov Date: Mon May 20 16:06:09 2024 +0200 Temp Signed-off-by: Andrey Fedorov Signed-off-by: Andrey Fedorov --- .../action.yml | 2 +- .github/workflows/tangem-publish.yml | 49 +++++++------------ include/TrustWalletCore/TWAnySignerTangem.h | 2 +- src/interface/TWAnySigner.cpp | 7 ++- .../check_if_swift_protobuf_should_be_updated | 2 + version.properties | 2 +- 6 files changed, 28 insertions(+), 36 deletions(-) diff --git a/.github/actions/install_dependencies_composite_action/action.yml b/.github/actions/install_dependencies_composite_action/action.yml index fd6c0862575..9fead257771 100644 --- a/.github/actions/install_dependencies_composite_action/action.yml +++ b/.github/actions/install_dependencies_composite_action/action.yml @@ -20,7 +20,7 @@ runs: tools/install-dependencies - name: Cache Rust dependencies - uses: Swatinem/rust-cache@v2 + uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3 with: workspaces: | rust diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index a97de93e5e4..88344a51e0e 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -1,5 +1,5 @@ name: Tangem - Publish - +run-name: Publish new release with changes from commit '${{ github.event.head_commit.message }}' (${{ github.sha }}) on: push: branches: @@ -54,16 +54,6 @@ jobs: token: ${{ secrets.GITHUB_TOKEN }} generate_release_notes: true - # TODO: Remove - - name: Create tag and release test - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 - with: - target_commitish: test/IOS-6122_build_scripts # TODO: remove since the default branch ('main') should be used as a target - tag_name: test_tag_1 - token: ${{ secrets.GITHUB_TOKEN }} - generate_release_notes: true - repository: tangem/wallet-core-binaries-ios - publish_ios: name: Publish iOS runs-on: macos-latest @@ -94,6 +84,11 @@ jobs: - name: Generate files run: tools/generate-files ios + - name: Remove unused files + run: | + # This header is not used on iOS and causes a compilation error + rm -rf include/TrustWalletCore/TWAnySignerTangem.h + - name: Build XCFramework run: tools/ios-xcframework @@ -116,7 +111,15 @@ jobs: name: swift-protobuf-binary-artefacts-${{ github.sha }} path: output/artefacts/swift-protobuf/ - # TODO: Upload dSYMs + - name: Upload DSYMs + env: + FB_IOS_APP_ID: ${{ secrets.FB_IOS_APP_ID_PROD }} + run: | + # We don't want to have Firebase as a dependency, so we download and use the `upload-symbols` script manually + curl -fsSL https://raw.githubusercontent.com/firebase/firebase-ios-sdk/main/Crashlytics/upload-symbols -o upload-symbols + chmod +x upload-symbols + # The `upload-symbols` script indeed accepts a list of paths to upload, but using it in the foreach loop like this is just a dead-simple approach + find swift/build -type d -name "*.dSYM" -exec ./upload-symbols --platform ios --app-id $FB_IOS_APP_ID {} \; upload_wallet_core_binaries_ios: name: Upload WalletCore binaries iOS @@ -144,16 +147,7 @@ jobs: destination-repository-name: 'wallet-core-binaries-ios' target-branch: 'test/IOS-6122_build_scripts' # TODO: change to 'main' target-directory: 'WalletCore.xcframework' - - - name: Create tag and release - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 - with: - tag_name: ${{ needs.create_tag_and_release.outputs.publish_version }} - token: ${{ secrets.GITHUB_TOKEN }} - generate_release_notes: true - make_latest: true - repository: 'tangem/wallet-core-binaries-ios' - target_commitish: 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target + commit-message: 'Update from ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} (${{ needs.create_tag_and_release.outputs.publish_version }})' upload_swift_protobuf_binaries_ios: name: Upload SwiftProtobuf binaries iOS @@ -182,16 +176,7 @@ jobs: destination-repository-name: 'swift-protobuf-binaries' target-branch: 'test/IOS-6122_build_scripts' # TODO: change to 'main' target-directory: 'SwiftProtobuf.xcframework' - - - name: Create tag and release - uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 - with: - tag_name: ${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }} - token: ${{ secrets.GITHUB_TOKEN }} - generate_release_notes: true - make_latest: true - repository: 'tangem/swift-protobuf-binaries' - target_commitish: 'test/IOS-6122_build_scripts' # TODO: remove since the default branch ('main') should be used as a target + commit-message: 'Update from ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} (${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }})' publish_android: name: Publish Android diff --git a/include/TrustWalletCore/TWAnySignerTangem.h b/include/TrustWalletCore/TWAnySignerTangem.h index 078e58aa601..f85a43ee139 100644 --- a/include/TrustWalletCore/TWAnySignerTangem.h +++ b/include/TrustWalletCore/TWAnySignerTangem.h @@ -7,4 +7,4 @@ #include "TWString.h" // TANGEM -extern TWData *_Nonnull TWAnySignerSignExternally(TWData* _Nonnull data, enum TWCoinType coin, TWData *_Nonnull publicKey, std::function externalSigner); +extern TWData *_Nonnull TWAnySignerSignExternally(TWData* _Nonnull data, enum TWCoinType coin, TWData *_Nonnull publicKey, std::function externalSigner); // Not used on iOS diff --git a/src/interface/TWAnySigner.cpp b/src/interface/TWAnySigner.cpp index 8730214548e..c5d74a5c030 100644 --- a/src/interface/TWAnySigner.cpp +++ b/src/interface/TWAnySigner.cpp @@ -3,7 +3,12 @@ // Copyright © 2017 Trust Wallet. #include -#include + +#if (defined(TARGET_OS_SIMULATOR) || defined(TARGET_OS_IPHONE)) +#include +#else +#include // Not used on iOS +#endif // (defined(TARGET_OS_SIMULATOR) || defined(TARGET_OS_IPHONE)) #include "Coin.h" diff --git a/tools/check_if_swift_protobuf_should_be_updated b/tools/check_if_swift_protobuf_should_be_updated index 2155834fb84..bcbebbf54cc 100755 --- a/tools/check_if_swift_protobuf_should_be_updated +++ b/tools/check_if_swift_protobuf_should_be_updated @@ -4,7 +4,9 @@ repo_url=$1 repo_tag=$2 if git ls-remote --tags $repo_url | grep -q "refs/tags/$repo_tag"; then + echo "Should update SwiftProtobuf: false" echo "SHOULD_UPDATE_SWIFT_PROTOBUF=0" >> $GITHUB_ENV else + echo "Should update SwiftProtobuf: true" echo "SHOULD_UPDATE_SWIFT_PROTOBUF=1" >> $GITHUB_ENV fi diff --git a/version.properties b/version.properties index ad047c90cb3..a57af75bc99 100644 --- a/version.properties +++ b/version.properties @@ -1 +1 @@ -tangem=4.0.21-tangem6 +tangem=4.0.21-tangem7 From 221b795d3c209c0a6c41525ce52ef50608577ab8 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Tue, 11 Jun 2024 10:52:19 +0200 Subject: [PATCH 11/16] IOS-6122: Fix conditions Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 88344a51e0e..0659653cf7a 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -75,6 +75,10 @@ jobs: fetch-tags: true # Required otherwise git can't describe the repo; Doesn't actually work w/o 'fetch-depth', see https://github.com/actions/checkout/issues/1471 fetch-depth: 0 + # This header is not used on iOS and causes a compilation error + - name: Remove unused files + run: rm -rf include/TrustWalletCore/TWAnySignerTangem.h + - name: Check if SwiftProtobuf binary must be updated run: tools/check_if_swift_protobuf_should_be_updated "https://github.com/tangem/swift-protobuf-binaries.git" "${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }}" @@ -84,11 +88,6 @@ jobs: - name: Generate files run: tools/generate-files ios - - name: Remove unused files - run: | - # This header is not used on iOS and causes a compilation error - rm -rf include/TrustWalletCore/TWAnySignerTangem.h - - name: Build XCFramework run: tools/ios-xcframework From 9be3e5e617c97487072e35b0649a5b5a1c5230d2 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Wed, 12 Jun 2024 03:34:21 +0200 Subject: [PATCH 12/16] IOS-6122: Trying different compilation condition Signed-off-by: Andrey Fedorov --- src/interface/TWAnySigner.cpp | 4 ++-- swift/common-xcframework.yml | 2 +- swift/project.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interface/TWAnySigner.cpp b/src/interface/TWAnySigner.cpp index c5d74a5c030..2924c724d45 100644 --- a/src/interface/TWAnySigner.cpp +++ b/src/interface/TWAnySigner.cpp @@ -4,11 +4,11 @@ #include -#if (defined(TARGET_OS_SIMULATOR) || defined(TARGET_OS_IPHONE)) +#if defined(IS_IOS) #include #else #include // Not used on iOS -#endif // (defined(TARGET_OS_SIMULATOR) || defined(TARGET_OS_IPHONE)) +#endif // defined(IS_IOS) #include "Coin.h" diff --git a/swift/common-xcframework.yml b/swift/common-xcframework.yml index dae0d4b55c7..26a392f4e2d 100644 --- a/swift/common-xcframework.yml +++ b/swift/common-xcframework.yml @@ -49,7 +49,7 @@ targets: INFOPLIST_FILE: 'Info.plist' CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION: YES_ERROR CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: $(inherited) false - OTHER_CFLAGS: $(inherited) -Wno-comma + OTHER_CFLAGS: $(inherited) -Wno-comma -DIS_IOS trezor-crypto: type: library.static diff --git a/swift/project.yml b/swift/project.yml index 6cbf9827aa0..69fd7c566de 100644 --- a/swift/project.yml +++ b/swift/project.yml @@ -54,7 +54,7 @@ targets: INFOPLIST_FILE: 'Info.plist' CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION: YES_ERROR CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: $(inherited) false - OTHER_CFLAGS: $(inherited) -Wno-comma -DNDEBUG + OTHER_CFLAGS: $(inherited) -Wno-comma -DNDEBUG -DIS_IOS postCompileScripts: - script: | export PATH=/opt/homebrew/bin:$PATH; From 5d316cb0bcde63840ceff9bec1334582358c9545 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Wed, 12 Jun 2024 04:22:26 +0200 Subject: [PATCH 13/16] IOS-6122: Improve compilation condition naming, fix comments Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 3 +-- src/interface/TWAnySigner.cpp | 6 +++--- swift/common-xcframework.yml | 2 +- swift/project.yml | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 0659653cf7a..31cb61f4039 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -75,9 +75,8 @@ jobs: fetch-tags: true # Required otherwise git can't describe the repo; Doesn't actually work w/o 'fetch-depth', see https://github.com/actions/checkout/issues/1471 fetch-depth: 0 - # This header is not used on iOS and causes a compilation error - name: Remove unused files - run: rm -rf include/TrustWalletCore/TWAnySignerTangem.h + run: rm -rf include/TrustWalletCore/TWAnySignerTangem.h # This header is not used on iOS and causes a compilation error - name: Check if SwiftProtobuf binary must be updated run: tools/check_if_swift_protobuf_should_be_updated "https://github.com/tangem/swift-protobuf-binaries.git" "${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }}" diff --git a/src/interface/TWAnySigner.cpp b/src/interface/TWAnySigner.cpp index 2924c724d45..241c9fae950 100644 --- a/src/interface/TWAnySigner.cpp +++ b/src/interface/TWAnySigner.cpp @@ -4,11 +4,11 @@ #include -#if defined(IS_IOS) +#if defined(IS_IOS_BINARIES) #include #else -#include // Not used on iOS -#endif // defined(IS_IOS) +#include // This header file is not used on iOS +#endif // defined(IS_IOS_BINARIES) #include "Coin.h" diff --git a/swift/common-xcframework.yml b/swift/common-xcframework.yml index 26a392f4e2d..4d2eac91a37 100644 --- a/swift/common-xcframework.yml +++ b/swift/common-xcframework.yml @@ -49,7 +49,7 @@ targets: INFOPLIST_FILE: 'Info.plist' CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION: YES_ERROR CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: $(inherited) false - OTHER_CFLAGS: $(inherited) -Wno-comma -DIS_IOS + OTHER_CFLAGS: $(inherited) -Wno-comma -DIS_IOS_BINARIES trezor-crypto: type: library.static diff --git a/swift/project.yml b/swift/project.yml index 69fd7c566de..df6cf7af2d0 100644 --- a/swift/project.yml +++ b/swift/project.yml @@ -54,7 +54,7 @@ targets: INFOPLIST_FILE: 'Info.plist' CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION: YES_ERROR CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER: $(inherited) false - OTHER_CFLAGS: $(inherited) -Wno-comma -DNDEBUG -DIS_IOS + OTHER_CFLAGS: $(inherited) -Wno-comma -DNDEBUG -DIS_IOS_BINARIES postCompileScripts: - script: | export PATH=/opt/homebrew/bin:$PATH; From fddef76d4a36264d50d65625b1a678814436e2cf Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 14 Jun 2024 10:42:11 +0200 Subject: [PATCH 14/16] IOS-6122: Update readme with tangem-specific contribution notes Signed-off-by: Andrey Fedorov --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 78085a5c69e..bb21f5faf77 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,14 @@ If you want to add support for a new blockchain also see [Adding Support for a N Thanks to all the people who contribute. +# Contributing (Tangem specific) + +- Before opening a pull-request, bump **WalletCore** library version in the `./version.properties` file +- [Optional] To update **SwiftProtobuf** library (only if necessary): + * Make sure that the new version of the **SwiftProtobuf** library is compatible with other consumers of a binary artifact (`grpc-swift`, `hedera-sdk-swift`, `SwiftBinanceChain`, `blockchain-sdk-swift`, and so on) + * Set a new version in the `./swift-protobuf-version.properties` file + * Set a new version in the `./swift/Podfile` file + # Disclaimer The Wallet Core project is led and managed by Trust Wallet with a large contributor community and actively used in several projects. Our goal at Wallet Core is to give other wallets an easy way to add chain support. From 2cc306faec24ec3c3cb3a7a88ba3ea7106ab3ed9 Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 14 Jun 2024 10:43:51 +0200 Subject: [PATCH 15/16] IOS-6122: Remove all TODOs and temp code Signed-off-by: Andrey Fedorov --- .github/workflows/tangem-publish.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tangem-publish.yml b/.github/workflows/tangem-publish.yml index 31cb61f4039..dc5c70741f2 100644 --- a/.github/workflows/tangem-publish.yml +++ b/.github/workflows/tangem-publish.yml @@ -4,8 +4,6 @@ on: push: branches: - 'master' - - 'feature/IOS-6122_build_scripts' # TODO: remove - - 'test/IOS-6122_build_scripts' # TODO: remove workflow_dispatch: env: @@ -46,7 +44,6 @@ jobs: echo 'Publishing SwiftProtobuf version ${{ steps.swift_protobuf_version.outputs.version_tag }}-${{ steps.swift_protobuf_version.outputs.tangem_suffix }}' - name: Create tag and release - if: false # temporarily disabled uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # v2.0.5 with: name: ${{ steps.version.outputs.tangem }} @@ -143,7 +140,7 @@ jobs: source-directory: 'output/WalletCore.xcframework' destination-github-username: 'tangem' destination-repository-name: 'wallet-core-binaries-ios' - target-branch: 'test/IOS-6122_build_scripts' # TODO: change to 'main' + target-branch: 'main' target-directory: 'WalletCore.xcframework' commit-message: 'Update from ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} (${{ needs.create_tag_and_release.outputs.publish_version }})' @@ -172,7 +169,7 @@ jobs: source-directory: 'output/SwiftProtobuf.xcframework' destination-github-username: 'tangem' destination-repository-name: 'swift-protobuf-binaries' - target-branch: 'test/IOS-6122_build_scripts' # TODO: change to 'main' + target-branch: 'main' target-directory: 'SwiftProtobuf.xcframework' commit-message: 'Update from ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }} (${{ needs.create_tag_and_release.outputs.swift_protobuf_publish_version }})' @@ -206,7 +203,6 @@ jobs: run: tools/generate-files android - name: Build and publish Android - if: false # temporarily disabled env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} From 80ec45de2ddb3329d361960cd9eef47a05ed17ce Mon Sep 17 00:00:00 2001 From: Andrey Fedorov Date: Fri, 14 Jun 2024 11:33:10 +0200 Subject: [PATCH 16/16] IOS-6122: Downgrade version properties since we don't want to release new binaries right now Signed-off-by: Andrey Fedorov --- swift-protobuf-version.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift-protobuf-version.properties b/swift-protobuf-version.properties index bf94f892213..9e1551c114e 100644 --- a/swift-protobuf-version.properties +++ b/swift-protobuf-version.properties @@ -6,4 +6,4 @@ version_tag=1.25.2 # Additional suffix for Tangem-specifc intermediate builds -tangem_suffix=tangem2 +tangem_suffix=tangem1