From 61a9b5b9dd0af91e70170571eb4bd9ec113d0efc Mon Sep 17 00:00:00 2001 From: Curtis Date: Mon, 27 May 2024 14:06:30 +0100 Subject: [PATCH] fix: ci docker (#168) Co-authored-by: Ahmed Moussa Signed-off-by: Ahmed Moussa Signed-off-by: Curtis Harding Signed-off-by: Ahmed Moussa --- .github/workflows/pull-request.yml | 45 ++++++++++++++++++++- .github/workflows/release-documentation.yml | 42 ++++++++++++++++++- .github/workflows/release.yml | 39 ++++++++++++++++++ apollo/build.gradle.kts | 11 +++-- rust-ed25519-bip32 | 2 +- 5 files changed, 133 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 9aa723515..13ee11c9f 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -60,6 +60,49 @@ jobs: run: | brew install autoconf automake libtool + - name: "Install Mac ToolChain" + if: matrix.os-type == 'macos' + run: | + brew tap messense/macos-cross-toolchains + + - name: "Install Linux GNU for x86_64" + if: matrix.os-type == 'macos' + run: | + rm '/usr/local/bin/2to3' + rm '/usr/local/bin/2to3-3.11' + rm '/usr/local/bin/2to3-3.12' + rm '/usr/local/bin/python3' + rm '/usr/local/bin/python3.11' + rm '/usr/local/bin/python3.12' + rm '/usr/local/bin/idle3' + rm '/usr/local/bin/idle3.11' + rm '/usr/local/bin/idle3.12' + rm '/usr/local/bin/pydoc3' + rm '/usr/local/bin/pydoc3.11' + rm '/usr/local/bin/pydoc3.12' + rm '/usr/local/bin/python3-config' + rm '/usr/local/bin/python3.11-config' + rm '/usr/local/bin/python3.12-config' + rm -r '/usr/local/lib/node_modules' + brew install --overwrite x86_64-unknown-linux-gnu + + - name: "Install Linux GNU for aarch64" + if: matrix.os-type == 'macos' + run: | + brew install --overwrite aarch64-unknown-linux-gnu + + - name: "Install Rust Targets" + if: matrix.os-type == 'macos' + run: | + rustup target add armv7-linux-androideabi + rustup target add i686-linux-android + rustup target add aarch64-linux-android + rustup target add x86_64-linux-android + rustup target add aarch64-apple-darwin + rustup target add x86_64-apple-darwin + rustup target add aarch64-unknown-linux-gnu + rustup target add x86_64-unknown-linux-gnu + - uses: maxim-lobanov/setup-xcode@v1 if: matrix.os-type == 'macos' with: @@ -75,7 +118,7 @@ jobs: - name: "Install wasm-pack" run: cargo install wasm-pack - + - 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 4787c2567..4747d4a86 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- @@ -60,6 +60,46 @@ jobs: if: matrix.os-type == 'linux' run: sudo apt install rustc build-essential -y + - name: "Install Mac ToolChain" + run: | + brew tap messense/macos-cross-toolchains + + - name: "Install Linux GNU for x86_64" + run: | + rm '/usr/local/bin/2to3' + rm '/usr/local/bin/2to3-3.11' + rm '/usr/local/bin/2to3-3.12' + rm '/usr/local/bin/python3' + rm '/usr/local/bin/python3.11' + rm '/usr/local/bin/python3.12' + rm '/usr/local/bin/idle3' + rm '/usr/local/bin/idle3.11' + rm '/usr/local/bin/idle3.12' + rm '/usr/local/bin/pydoc3' + rm '/usr/local/bin/pydoc3.11' + rm '/usr/local/bin/pydoc3.12' + rm '/usr/local/bin/python3-config' + rm '/usr/local/bin/python3.11-config' + rm '/usr/local/bin/python3.12-config' + rm -r '/usr/local/lib/node_modules' + brew install --overwrite x86_64-unknown-linux-gnu + + - name: "Install Linux GNU for aarch64" + run: | + brew install --overwrite aarch64-unknown-linux-gnu + + - name: "Install Rust Targets" + run: | + rustup target add armv7-linux-androideabi + rustup target add i686-linux-android + rustup target add aarch64-linux-android + rustup target add x86_64-linux-android + rustup target add aarch64-apple-darwin + rustup target add x86_64-apple-darwin + rustup target add aarch64-unknown-linux-gnu + rustup target add x86_64-unknown-linux-gnu + + - name: "Install rust toolchain (Macos)" if: matrix.os-type == 'macos' run: brew install rustup diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b0538bf8..a9d4eca33 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -48,6 +48,45 @@ jobs: run: | brew install autoconf automake libtool + - name: "Install Mac ToolChain" + run: | + brew tap messense/macos-cross-toolchains + + - name: "Install Linux GNU for x86_64" + run: | + rm '/usr/local/bin/2to3' + rm '/usr/local/bin/2to3-3.11' + rm '/usr/local/bin/2to3-3.12' + rm '/usr/local/bin/python3' + rm '/usr/local/bin/python3.11' + rm '/usr/local/bin/python3.12' + rm '/usr/local/bin/idle3' + rm '/usr/local/bin/idle3.11' + rm '/usr/local/bin/idle3.12' + rm '/usr/local/bin/pydoc3' + rm '/usr/local/bin/pydoc3.11' + rm '/usr/local/bin/pydoc3.12' + rm '/usr/local/bin/python3-config' + rm '/usr/local/bin/python3.11-config' + rm '/usr/local/bin/python3.12-config' + rm -r '/usr/local/lib/node_modules' + brew install --overwrite x86_64-unknown-linux-gnu + + - name: "Install Linux GNU for aarch64" + run: | + brew install --overwrite aarch64-unknown-linux-gnu + + - name: "Install Rust Targets" + run: | + rustup target add armv7-linux-androideabi + rustup target add i686-linux-android + rustup target add aarch64-linux-android + rustup target add x86_64-linux-android + rustup target add aarch64-apple-darwin + rustup target add x86_64-apple-darwin + rustup target add aarch64-unknown-linux-gnu + rustup target add x86_64-unknown-linux-gnu + - uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: '15.0.1' diff --git a/apollo/build.gradle.kts b/apollo/build.gradle.kts index 3f3beaed8..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 { @@ -846,8 +847,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) diff --git a/rust-ed25519-bip32 b/rust-ed25519-bip32 index c7217751c..8f518942a 160000 --- a/rust-ed25519-bip32 +++ b/rust-ed25519-bip32 @@ -1 +1 @@ -Subproject commit c7217751c278c4ed0e6c26e3ef9d6d14195582b9 +Subproject commit 8f518942ae95dc6b96bed3a3732161b7980668b1