Skip to content

Commit

Permalink
Run jni_artifacts workflow on macos-12
Browse files Browse the repository at this point in the history
  • Loading branch information
moiseev-signal committed Apr 26, 2024
1 parent 46780fb commit 4e44b83
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/jni_artifacts.yml
Expand Up @@ -21,11 +21,11 @@ jobs:

strategy:
matrix:
os: [windows-latest, macos-latest]
os: [windows-latest, macos-12]
include:
- os: windows-latest
library: signal_jni.dll
- os: macos-latest
- os: macos-12
library: libsignal_jni.dylib
additional-rust-target: aarch64-apple-darwin
# Ubuntu binaries are built using Docker, below
Expand All @@ -42,8 +42,8 @@ jobs:
const dryRun = ${{ inputs.dry_run }};
const refType = '${{ github.ref_type }}';
const refName = '${{ github.ref_name }}';
console.log(dryRun
? `Running in 'dry run' mode on '${refName}' ${refType}`
console.log(dryRun
? `Running in 'dry run' mode on '${refName}' ${refType}`
: `Running on '${refName}' ${refType}`);
if (refType !== 'tag' && !dryRun) {
core.setFailed("the action should either be launched on a tag or with a 'dry run' switch");
Expand All @@ -64,23 +64,23 @@ jobs:
if: matrix.os == 'windows-latest'

- run: brew install protobuf
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-12'

- name: Build for host (should be x86_64)
run: java/build_jni.sh desktop
shell: bash

- name: Build for alternate target (arm64)
run: java/build_jni.sh desktop
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-12'
env:
CARGO_BUILD_TARGET: ${{ matrix.additional-rust-target }}

- name: Merge library slices (for macOS)
# Using target/release/ for both the input and output wouldn't normally be ideal
# from a build system perspective, but we're going to immediately upload the merged library.
run: lipo -create target/release/${{ matrix.library }} target/${{ matrix.additional-rust-target }}/release/${{ matrix.library }} -output target/release/${{ matrix.library }}
if: matrix.os == 'macos-latest'
if: matrix.os == 'macos-12'

- name: Upload library
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
Expand Down

0 comments on commit 4e44b83

Please sign in to comment.