From 3b91d365839ede9319d76f0c1dcd10e45672d9e5 Mon Sep 17 00:00:00 2001 From: Bob Wall Date: Tue, 26 Nov 2024 10:54:07 -0700 Subject: [PATCH] Move off macos-12 for builds (#231) --- .github/workflows/ci.yaml | 18 +++++++++++------ .github/workflows/release-github.yaml | 28 +++++++++++++-------------- 2 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7d1cb1..28a98cb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,7 +18,7 @@ jobs: java-test: strategy: matrix: - runs-on: ["ubuntu-22.04", "macos-12"] + runs-on: ["ubuntu-22.04", "macos-13"] runs-on: ${{ matrix.runs-on }} steps: - uses: actions/checkout@v4 @@ -39,7 +39,7 @@ jobs: working-directory: java/tests android-build: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest strategy: matrix: arch: [i686-linux-android, x86_64-linux-android, aarch64-linux-android] @@ -81,8 +81,7 @@ jobs: # - api-level 30 is stabilized, as that allows x86_64 to run arm64-v8a android-test: needs: android-build - # reactivecircus/android-emulator-runner@v2 only works on Mac. - runs-on: macos-12 + runs-on: ubuntu-latest strategy: matrix: api-level: [24, 29] @@ -96,17 +95,24 @@ jobs: name: ${{ matrix.arch }} - name: Unzip Android build run: unzip -o android_build.zip -d android/ironoxide-android/src/main + # Taken from https://github.com/ReactiveCircus/android-emulator-runner/blob/main/README.md + - name: Enable KVM + run: | + echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules + sudo udevadm control --reload-rules + sudo udevadm trigger --name-match=kvm - name: Run tests uses: reactivecircus/android-emulator-runner@v2 with: working-directory: ./android arch: ${{ matrix.arch }} api-level: ${{ matrix.api-level }} + ndk: "26.3.11579264" # matches android/ironoxide-android/build.gradle script: ./gradlew connectedAndroidTest # This tests that gradle can build ironoxide-android so we can catch issues before release. android-release-test: - runs-on: ubuntu-22.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Run build script @@ -119,7 +125,7 @@ jobs: working-directory: android cpp-build: - runs-on: macos-12 + runs-on: macos-13 steps: - uses: actions/checkout@v4 - uses: IronCoreLabs/rust-toolchain@v1 diff --git a/.github/workflows/release-github.yaml b/.github/workflows/release-github.yaml index f7725cb..54220a6 100644 --- a/.github/workflows/release-github.yaml +++ b/.github/workflows/release-github.yaml @@ -74,22 +74,22 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Download java release artifacts from macos-12 + - name: Download java release artifacts from macos-13 uses: actions/download-artifact@v4 with: - name: release-macos-12 - path: release/macos-12 + name: release-macos-13 + path: release/macos-13 - name: Delete artifact uses: geekyeggo/delete-artifact@v2 with: - name: release-macos-12 + name: release-macos-13 failOnError: false - - name: Sign java artifact for macos-12 + - name: Sign java artifact for macos-13 run: | - gpg --batch --detach-sign -a release/macos-12/libironoxide_java.dylib - gpg --batch --verify release/macos-12/libironoxide_java.dylib.asc release/macos-12/libironoxide_java.dylib - - name: Upload java lib for macos-12 - run: gh release upload ${{ steps.version.outputs.tag }} release/macos-12/libironoxide_java.dylib release/macos-12/libironoxide_java.dylib.asc --clobber + gpg --batch --detach-sign -a release/macos-13/libironoxide_java.dylib + gpg --batch --verify release/macos-13/libironoxide_java.dylib.asc release/macos-13/libironoxide_java.dylib + - name: Upload java lib for macos-13 + run: gh release upload ${{ steps.version.outputs.tag }} release/macos-13/libironoxide_java.dylib release/macos-13/libironoxide_java.dylib.asc --clobber env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -101,7 +101,7 @@ jobs: # - name: Delete artifact # uses: geekyeggo/delete-artifact@v1 # with: - # name: release-macos-12 + # name: release-macos-13 # failOnError: false # - name: Sign iOS artifact # run: | @@ -123,7 +123,7 @@ jobs: if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-') strategy: matrix: - os: [ubuntu-22.04, macos-12] + os: [ubuntu-22.04, macos-13] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -145,16 +145,16 @@ jobs: with: name: release-ubuntu-22.04 path: target/release/libironoxide_java.so - - name: Upload artifacts for macos-12 + - name: Upload artifacts for macos-13 if: startsWith(matrix.os, 'macos') uses: actions/upload-artifact@v4 with: - name: release-macos-12 + name: release-macos-13 path: target/release/libironoxide_java.dylib # See https://github.com/IronCoreLabs/ironoxide-swig-bindings/issues/222 # build-cpp: # if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-') -# runs-on: macos-12 +# runs-on: macos-13 # steps: # - uses: actions/checkout@v4 # - uses: IronCoreLabs/rust-toolchain@v1