Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move off macos-12 for builds #231

Merged
merged 6 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand All @@ -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
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/release-github.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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: |
Expand All @@ -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
Expand All @@ -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
Expand Down