From e26b12bd0f91c50dbb0422b1cdb54c726cc27a6c Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 11 Feb 2024 12:04:22 +0100 Subject: [PATCH 1/6] ci/android: cache openssl build --- .github/workflows/android.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index fc73f06a5..b47f807a0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -9,7 +9,14 @@ jobs: steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + id: openssl + with: + path: openssl + key: ${{ runner.os }}-android-openssl-3.2.0 + - name: "build openssl" + if: steps.openssl.outputs.cache-hit != 'true' run: | wget -q https://www.openssl.org/source/openssl-3.2.0.tar.gz tar -xzf openssl-3.2.0.tar.gz From a14be203bd732fe5ceeeb03fe39cd91f61b50e0d Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 11 Feb 2024 12:05:59 +0100 Subject: [PATCH 2/6] bump openssl --- .github/workflows/android.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index b47f807a0..f325105e4 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -13,12 +13,12 @@ jobs: id: openssl with: path: openssl - key: ${{ runner.os }}-android-openssl-3.2.0 + key: ${{ runner.os }}-android-openssl-3.2.1 - name: "build openssl" if: steps.openssl.outputs.cache-hit != 'true' run: | - wget -q https://www.openssl.org/source/openssl-3.2.0.tar.gz + wget -q https://www.openssl.org/source/openssl-3.2.1.tar.gz tar -xzf openssl-3.2.0.tar.gz mv openssl-3.2.0 openssl cd openssl && ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME PATH=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH ./Configure android-arm64 no-shared no-tests -U__ANDROID_API__ -D__ANDROID_API__=21 && PATH=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH make build_libs && cd .. From d44fb4872d167548b12923e142f702c5ba73d236 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 11 Feb 2024 12:08:33 +0100 Subject: [PATCH 3/6] use env var --- .github/workflows/android.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index f325105e4..cdc8fb633 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -2,6 +2,9 @@ name: Android on: [push, pull_request] +env: + openssl: 3.2.1 + jobs: android: runs-on: ubuntu-latest @@ -13,14 +16,14 @@ jobs: id: openssl with: path: openssl - key: ${{ runner.os }}-android-openssl-3.2.1 + key: ${{ runner.os }}-android-openssl-$openssl - name: "build openssl" if: steps.openssl.outputs.cache-hit != 'true' run: | - wget -q https://www.openssl.org/source/openssl-3.2.1.tar.gz - tar -xzf openssl-3.2.0.tar.gz - mv openssl-3.2.0 openssl + wget -q https://www.openssl.org/source/openssl-$openssl.tar.gz + tar -xzf openssl-$openssl.tar.gz + mv openssl-$openssl openssl cd openssl && ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME PATH=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH ./Configure android-arm64 no-shared no-tests -U__ANDROID_API__ -D__ANDROID_API__=21 && PATH=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH make build_libs && cd .. - name: build From a6f516fffe4242f8c8e5ec912a972cb954992034 Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 11 Feb 2024 12:12:10 +0100 Subject: [PATCH 4/6] fix push/pull --- .github/workflows/android.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index cdc8fb633..19db74565 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -1,6 +1,12 @@ name: Android -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main env: openssl: 3.2.1 From a5c3512784bba6c886bfeb76da4d1057311974bf Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 11 Feb 2024 12:15:08 +0100 Subject: [PATCH 5/6] fix key --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 19db74565..c9d5e49a0 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -22,7 +22,7 @@ jobs: id: openssl with: path: openssl - key: ${{ runner.os }}-android-openssl-$openssl + key: ${{ runner.os }}-android-openssl-${{ openssl }} - name: "build openssl" if: steps.openssl.outputs.cache-hit != 'true' From 766310a17cd4955338ddaeb5cfaabcdcb39430af Mon Sep 17 00:00:00 2001 From: Sebastian Reimers Date: Sun, 11 Feb 2024 12:24:22 +0100 Subject: [PATCH 6/6] use env --- .github/workflows/android.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index c9d5e49a0..a1b2cb479 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -22,7 +22,7 @@ jobs: id: openssl with: path: openssl - key: ${{ runner.os }}-android-openssl-${{ openssl }} + key: ${{ runner.os }}-android-openssl-${{ env.openssl }} - name: "build openssl" if: steps.openssl.outputs.cache-hit != 'true'