From b8cc2c253168b47853464a3e9e03c0917f1e7e55 Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 15:49:38 +0300 Subject: [PATCH 1/9] fix: task dependency Signed-off-by: Ahmed Moussa --- apollo/build.gradle.kts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apollo/build.gradle.kts b/apollo/build.gradle.kts index 3f3beaed8..84f391df1 100644 --- a/apollo/build.gradle.kts +++ b/apollo/build.gradle.kts @@ -846,8 +846,12 @@ afterEvaluate { tasks.withType { // dependsOn(buildEd25519Bip32Task) } - tasks.getByName("androidDebugSourcesJar").dependsOn(copyEd25519Bip32GeneratedTask) - tasks.getByName("androidReleaseSourcesJar").dependsOn(copyEd25519Bip32GeneratedTask) + tasks.withType { + dependsOn(copyEd25519Bip32GeneratedTask) + } + + tasks.getByName("androidDebugSourcesJar").dependsOn(copyToAndroidSrc) + tasks.getByName("androidReleaseSourcesJar").dependsOn(copyToAndroidSrc) tasks.getByName("mergeDebugJniLibFolders").dependsOn(buildEd25519Bip32Task) tasks.getByName("mergeReleaseJniLibFolders").dependsOn(buildEd25519Bip32Task) From 50ec4b381b0e0f2ca8f671a84fc56e16ecc41f49 Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 16:04:14 +0300 Subject: [PATCH 2/9] fix: update submodule Signed-off-by: Ahmed Moussa --- rust-ed25519-bip32 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust-ed25519-bip32 b/rust-ed25519-bip32 index c7217751c..8d741197e 160000 --- a/rust-ed25519-bip32 +++ b/rust-ed25519-bip32 @@ -1 +1 @@ -Subproject commit c7217751c278c4ed0e6c26e3ef9d6d14195582b9 +Subproject commit 8d741197efa342f4da43c1cb8f5be179be051e20 From b6d8da6efd5b7232b5b495a10f7dfd3a7a2f64db Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 16:28:23 +0300 Subject: [PATCH 3/9] fix: runner `macos-13 ` doesn't have docker and we need it as we are using `cross` to build `rust` binaries Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 13 +++++++++++++ .github/workflows/release-documentation.yml | 15 ++++++++++++++- .github/workflows/release.yml | 13 +++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9aa723515..1ad793c12 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -55,6 +55,19 @@ jobs: run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + - name: "Install Docker" + if: matrix.os-type == 'macos' + run: | + brew install --cask docker + + - name: "Start Docker (if needed)" + if: matrix.os-type == 'macos' + run: open --background -a Docker + + - name: "Check Docker Version" + if: matrix.os-type == 'macos' + run: docker --version + - name: "Install autoconf, automake, libtool" if: matrix.os-type == 'macos' run: | diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml index 4787c2567..e907da517 100644 --- a/.github/workflows/release-documentation.yml +++ b/.github/workflows/release-documentation.yml @@ -38,7 +38,7 @@ jobs: ~/.gradle/caches ~/.gradle/wrapper ~/.konan - key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} + key: "${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}" restore-keys: | ${{ runner.os }}-gradle- @@ -52,6 +52,19 @@ jobs: run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + - name: "Install Docker" + if: matrix.os-type == 'macos' + run: | + brew install --cask docker + + - name: "Start Docker (if needed)" + if: matrix.os-type == 'macos' + run: open --background -a Docker + + - name: "Check Docker Version" + if: matrix.os-type == 'macos' + run: docker --version + - name: "Install autoconf, automake, libtool" run: | brew install autoconf automake libtool diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b0538bf8..5931e7c07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,6 +44,19 @@ jobs: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + - name: "Install Docker" + if: matrix.os-type == 'macos' + run: | + brew install --cask docker + + - name: "Start Docker (if needed)" + if: matrix.os-type == 'macos' + run: open --background -a Docker + + - name: "Check Docker Version" + if: matrix.os-type == 'macos' + run: docker --version + - name: "Install autoconf, automake, libtool" run: | brew install autoconf automake libtool From 8b723d927e11eea0121c615e1af9380b2303a37a Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 16:55:28 +0300 Subject: [PATCH 4/9] chore: remove no longer needed part of the CI & CD Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 4 ---- .github/workflows/release-documentation.yml | 4 ---- .github/workflows/release.yml | 4 ---- 3 files changed, 12 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 1ad793c12..ad0e2871b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -60,10 +60,6 @@ jobs: run: | brew install --cask docker - - name: "Start Docker (if needed)" - if: matrix.os-type == 'macos' - run: open --background -a Docker - - name: "Check Docker Version" if: matrix.os-type == 'macos' run: docker --version diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml index e907da517..5f87cd276 100644 --- a/.github/workflows/release-documentation.yml +++ b/.github/workflows/release-documentation.yml @@ -57,10 +57,6 @@ jobs: run: | brew install --cask docker - - name: "Start Docker (if needed)" - if: matrix.os-type == 'macos' - run: open --background -a Docker - - name: "Check Docker Version" if: matrix.os-type == 'macos' run: docker --version diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5931e7c07..71e4d2721 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -49,10 +49,6 @@ jobs: run: | brew install --cask docker - - name: "Start Docker (if needed)" - if: matrix.os-type == 'macos' - run: open --background -a Docker - - name: "Check Docker Version" if: matrix.os-type == 'macos' run: docker --version From a262191e6545084f67033daf164aed7ccb0a3e11 Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 19:18:50 +0300 Subject: [PATCH 5/9] chore: just more CI printing Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index ad0e2871b..21d642a1e 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -64,6 +64,16 @@ jobs: if: matrix.os-type == 'macos' run: docker --version + - name: Double check installation + if: matrix.os-type == 'macos' + run: | + brew list --cask + + - name: Check installation Path + if: matrix.os-type == 'macos' + run: | + find /Applications -name Docker.app + - name: "Install autoconf, automake, libtool" if: matrix.os-type == 'macos' run: | From d2adeeab277169a333b33af100a649969029417f Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 19:26:31 +0300 Subject: [PATCH 6/9] chore: opening docker in the background Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 21d642a1e..2fb0f1761 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -59,20 +59,11 @@ jobs: if: matrix.os-type == 'macos' run: | brew install --cask docker - - - name: "Check Docker Version" - if: matrix.os-type == 'macos' - run: docker --version - - - name: Double check installation - if: matrix.os-type == 'macos' - run: | - brew list --cask - - - name: Check installation Path + + - name: Open Docker if: matrix.os-type == 'macos' run: | - find /Applications -name Docker.app + open --background /Applications/Docker.app - name: "Install autoconf, automake, libtool" if: matrix.os-type == 'macos' From 673ed8265b230a9699c418b60f805c41f802aeff Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 20:11:21 +0300 Subject: [PATCH 7/9] ci: having docker running the background for `cross` Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 13 ++++++++----- .github/workflows/release-documentation.yml | 9 --------- .github/workflows/release.yml | 9 --------- apollo/build.gradle.kts | 3 ++- 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 2fb0f1761..401566f85 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -55,12 +55,10 @@ jobs: run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - name: "Install Docker" - if: matrix.os-type == 'macos' - run: | - brew install --cask docker + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - - name: Open Docker + - name: "Open Docker" if: matrix.os-type == 'macos' run: | open --background /Applications/Docker.app @@ -85,6 +83,11 @@ jobs: - name: "Install wasm-pack" run: cargo install wasm-pack + + - name: "Install Cross" + if: matrix.os-type == 'macos' + run: | + cargo install cross --git https://github.com/cross-rs/cross - name: "Test Kotlin code is properly formatted" run: ./gradlew ktlintCheck diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml index 5f87cd276..55c7e8f56 100644 --- a/.github/workflows/release-documentation.yml +++ b/.github/workflows/release-documentation.yml @@ -52,15 +52,6 @@ jobs: run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - name: "Install Docker" - if: matrix.os-type == 'macos' - run: | - brew install --cask docker - - - name: "Check Docker Version" - if: matrix.os-type == 'macos' - run: docker --version - - name: "Install autoconf, automake, libtool" run: | brew install autoconf automake libtool diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 71e4d2721..4b0538bf8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,15 +44,6 @@ jobs: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - name: "Install Docker" - if: matrix.os-type == 'macos' - run: | - brew install --cask docker - - - name: "Check Docker Version" - if: matrix.os-type == 'macos' - run: docker --version - - name: "Install autoconf, automake, libtool" run: | brew install autoconf automake libtool diff --git a/apollo/build.gradle.kts b/apollo/build.gradle.kts index 84f391df1..4e908ac43 100644 --- a/apollo/build.gradle.kts +++ b/apollo/build.gradle.kts @@ -533,7 +533,7 @@ kotlin { implementation("org.kotlincrypto.macs:hmac-sha2:0.3.0") implementation("org.kotlincrypto.hash:sha2:0.4.0") implementation("com.squareup.okio:okio:3.7.0") - implementation("org.jetbrains.kotlinx:atomicfu:0.23.1") + implementation("org.jetbrains.kotlinx:atomicfu:0.23.2") } } val commonTest by getting { @@ -646,6 +646,7 @@ kotlin { .resolve("kotlin") ) } + applyDefaultHierarchyTemplate() all { languageSettings { From c9de0be408274888f679169dda5381e11b1c7c23 Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 20:16:12 +0300 Subject: [PATCH 8/9] ci: having docker running the background for `cross` Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 401566f85..21cd21eb2 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -55,13 +55,21 @@ jobs: run: | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + - name: "Install Docker" + if: matrix.os-type == 'macos' + run: | + brew install --cask docker - name: "Open Docker" if: matrix.os-type == 'macos' run: | - open --background /Applications/Docker.app + open --background /Applications/Docker.app --args --unattended & + + - name: Wait for Docker + run: sleep 10 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 - name: "Install autoconf, automake, libtool" if: matrix.os-type == 'macos' From 3355e8b6db49b0267acab337360e830de90df255 Mon Sep 17 00:00:00 2001 From: Ahmed Moussa Date: Thu, 23 May 2024 20:28:10 +0300 Subject: [PATCH 9/9] ci: having docker running the background for `cross` Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 21cd21eb2..ecf864258 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -68,8 +68,8 @@ jobs: - name: Wait for Docker run: sleep 10 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 - name: "Install autoconf, automake, libtool" if: matrix.os-type == 'macos'