Skip to content

Commit a00d937

Browse files
authored
Add cpp back as dynamic and static libs signed and added to release (#259)
* Initial draft of pulling unmanaged through * Try some CI tests of the new functionality. * Fix tests, add some more C++ ones * Add cpp back as dynamic and static libs signed and added to release * Mac ARM instead of Intel since that's been the standard for a handful of years now * Replace the prefix placeholder in the pkg-config file
1 parent b366b85 commit a00d937

3 files changed

Lines changed: 85 additions & 74 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
java-test:
1919
strategy:
2020
matrix:
21-
runs-on: ["ubuntu-latest", "macos-15-intel"]
21+
runs-on: ["ubuntu-latest", "macos-15"]
2222
runs-on: ${{ matrix.runs-on }}
2323
steps:
2424
- uses: actions/checkout@v6
@@ -123,21 +123,6 @@ jobs:
123123
run: ./gradlew build
124124
working-directory: android
125125

126-
# Disabled due to an issue with `cargo lipo` and `aws-lc-rs`
127-
# cpp-build:
128-
# runs-on: macos-15-intel
129-
# steps:
130-
# - uses: actions/checkout@v6
131-
# - uses: IronCoreLabs/rust-toolchain@v1
132-
# with:
133-
# toolchain: stable
134-
# - name: Setup iOS build
135-
# run: |
136-
# rustup target add x86_64-apple-ios aarch64-apple-ios
137-
# cargo install cargo-lipo
138-
# - name: Build for iOS
139-
# run: cargo lipo -p ironoxide-cpp
140-
141126
cpp-test:
142127
# Cmake on macos fails to find TargetConditionals.h
143128
# See https://github.com/IronCoreLabs/ironoxide-swig-bindings/issues/222

.github/workflows/release-github.yaml

Lines changed: 83 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
needs:
1616
- build-java
17-
# CPP is current disabled because of an issue with Cmake https://github.com/IronCoreLabs/ironoxide-swig-bindings/issues/222
18-
# - build-cpp
17+
- build-cpp
1918
steps:
2019
- uses: actions/checkout@v6
2120
with:
@@ -74,43 +73,62 @@ jobs:
7473
env:
7574
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7675

77-
- name: Download java release artifacts from macos-15-intel
76+
- name: Download java release artifacts from macos-15
7877
uses: actions/download-artifact@v6
7978
with:
80-
name: release-macos-15-intel
81-
path: release/macos-15-intel
79+
name: release-macos-15
80+
path: release/macos-15
8281
- name: Delete artifact
8382
uses: geekyeggo/delete-artifact@v5
8483
with:
85-
name: release-macos-15-intel
84+
name: release-macos-15
8685
failOnError: false
87-
- name: Sign java artifact for macos-15-intel
86+
- name: Sign java artifact for macos-15
8887
run: |
89-
gpg --batch --detach-sign -a release/macos-15-intel/libironoxide_java.dylib
90-
gpg --batch --verify release/macos-15-intel/libironoxide_java.dylib.asc release/macos-15-intel/libironoxide_java.dylib
91-
- name: Upload java lib for macos-15-intel
92-
run: gh release upload ${{ steps.version.outputs.tag }} release/macos-15-intel/libironoxide_java.dylib release/macos-15-intel/libironoxide_java.dylib.asc --clobber
88+
gpg --batch --detach-sign -a release/macos-15/libironoxide_java.dylib
89+
gpg --batch --verify release/macos-15/libironoxide_java.dylib.asc release/macos-15/libironoxide_java.dylib
90+
- name: Upload java lib for macos-15
91+
run: gh release upload ${{ steps.version.outputs.tag }} release/macos-15/libironoxide_java.dylib release/macos-15/libironoxide_java.dylib.asc --clobber
9392
env:
9493
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9594

96-
# - name: Download iOS release artifacts from build-cpp
97-
# uses: actions/download-artifact@v4
98-
# with:
99-
# name: release-iOS
100-
# path: release/release-iOS
101-
# - name: Delete artifact
102-
# uses: geekyeggo/delete-artifact@v1
103-
# with:
104-
# name: release-macos-15-intel
105-
# failOnError: false
106-
# - name: Sign iOS artifact
107-
# run: |
108-
# gpg --batch --detach-sign -a release/release-iOS/ironoxide-homebrew.tar.gz
109-
# gpg --batch --verify release/release-iOS/ironoxide-homebrew.tar.gz.asc release/release-iOS/ironoxide-homebrew.tar.gz
110-
# - name: Upload tar for release-iOS
111-
# run: gh release upload ${{ steps.version.outputs.tag }} release/release-iOS/ironoxide-homebrew.tar.gz release/release-iOS/ironoxide-homebrew.tar.gz.asc --clobber
112-
# env:
113-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
- name: Download C++ release artifacts from ubuntu-latest
96+
uses: actions/download-artifact@v6
97+
with:
98+
name: release-cpp-ubuntu-latest
99+
path: release/cpp-ubuntu-latest
100+
- name: Delete artifact
101+
uses: geekyeggo/delete-artifact@v5
102+
with:
103+
name: release-cpp-ubuntu-latest
104+
failOnError: false
105+
- name: Sign C++ artifact for ubuntu-latest
106+
run: |
107+
gpg --batch --detach-sign -a release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz
108+
gpg --batch --verify release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz.asc release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz
109+
- name: Upload C++ lib for ubuntu-latest
110+
run: gh release upload ${{ steps.version.outputs.tag }} release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz release/cpp-ubuntu-latest/ironoxide-cpp-linux-x86_64.tar.gz.asc --clobber
111+
env:
112+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113+
114+
- name: Download C++ release artifacts from macos-15
115+
uses: actions/download-artifact@v6
116+
with:
117+
name: release-cpp-macos-15
118+
path: release/cpp-macos-15
119+
- name: Delete artifact
120+
uses: geekyeggo/delete-artifact@v5
121+
with:
122+
name: release-cpp-macos-15
123+
failOnError: false
124+
- name: Sign C++ artifact for macos-15
125+
run: |
126+
gpg --batch --detach-sign -a release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz
127+
gpg --batch --verify release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz.asc release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz
128+
- name: Upload C++ lib for macos-15
129+
run: gh release upload ${{ steps.version.outputs.tag }} release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz release/cpp-macos-15/ironoxide-cpp-macos-aarch64.tar.gz.asc --clobber
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
114132

115133
- name: Increment to next -SNAPSHOT version for Java.
116134
run: |
@@ -123,7 +141,7 @@ jobs:
123141
if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-')
124142
strategy:
125143
matrix:
126-
os: [ubuntu-latest, macos-15-intel]
144+
os: [ubuntu-latest, macos-15]
127145
runs-on: ${{ matrix.os }}
128146
steps:
129147
- uses: actions/checkout@v6
@@ -146,34 +164,42 @@ jobs:
146164
with:
147165
name: release-ubuntu-latest
148166
path: target/release/libironoxide_java.so
149-
- name: Upload artifacts for macos-15-intel
167+
- name: Upload artifacts for macos-15
150168
if: startsWith(matrix.os, 'macos')
151169
uses: actions/upload-artifact@v6
152170
with:
153-
name: release-macos-15-intel
171+
name: release-macos-15
154172
path: target/release/libironoxide_java.dylib
155-
# See https://github.com/IronCoreLabs/ironoxide-swig-bindings/issues/222
156-
# build-cpp:
157-
# if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-')
158-
# runs-on: macos-15-intel
159-
# steps:
160-
# - uses: actions/checkout@v6
161-
# - uses: IronCoreLabs/rust-toolchain@v1
162-
# - name: Setup iOS build
163-
# run: |
164-
# rustup target add x86_64-apple-ios aarch64-apple-ios
165-
# cargo install cargo-lipo
166-
# - name: Build for iOS
167-
# run: cargo lipo --release -p ironoxide-cpp
168-
# - name: Build iOS tar
169-
# run: |
170-
# ( cd cpp/generated && mv sdk headers )
171-
# tar -c -f ironoxide-homebrew.tar -C cpp/generated headers
172-
# tar -r -f ironoxide-homebrew.tar -C cpp ironoxide.pc.in
173-
# tar -r -f ironoxide-homebrew.tar -C target/universal/release libironoxide.a
174-
# gzip ironoxide-homebrew.tar
175-
# - name: Upload iOS artifact
176-
# uses: actions/upload-artifact@v4
177-
# with:
178-
# name: release-iOS
179-
# path: ironoxide-homebrew.tar.gz
173+
build-cpp:
174+
if: github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release-')
175+
strategy:
176+
matrix:
177+
include:
178+
- os: ubuntu-latest
179+
shared-lib: libironoxide.so
180+
static-lib: libironoxide.a
181+
artifact-name: release-cpp-ubuntu-latest
182+
tar-name: ironoxide-cpp-linux-x86_64.tar.gz
183+
- os: macos-15
184+
shared-lib: libironoxide.dylib
185+
static-lib: libironoxide.a
186+
artifact-name: release-cpp-macos-15
187+
tar-name: ironoxide-cpp-macos-aarch64.tar.gz
188+
runs-on: ${{ matrix.os }}
189+
steps:
190+
- uses: actions/checkout@v6
191+
- uses: IronCoreLabs/rust-toolchain@v1
192+
- name: Build C++ release
193+
run: cargo build --release -p ironoxide-cpp
194+
- name: Package C++ release
195+
run: |
196+
mkdir -p pkg/include/ironoxide pkg/lib/pkgconfig
197+
cp cpp/generated/sdk/*.hpp cpp/generated/sdk/*.h pkg/include/ironoxide/
198+
cp target/release/${{ matrix.shared-lib }} pkg/lib/
199+
cp target/release/${{ matrix.static-lib }} pkg/lib/
200+
sed 's|%PREFIX%|/usr/local|g' cpp/ironoxide.pc.in > pkg/lib/pkgconfig/ironoxide.pc
201+
tar -czf ${{ matrix.tar-name }} -C pkg .
202+
- uses: actions/upload-artifact@v6
203+
with:
204+
name: ${{ matrix.artifact-name }}
205+
path: ${{ matrix.tar-name }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ This library is a thin Rust shim that wraps the [IronOxide Rust SDK](https://git
44

55
# License
66

7-
Copyright (c) 2021 IronCore Labs, Inc.
7+
Copyright (c) 2026 IronCore Labs, Inc.
88
All rights reserved.

0 commit comments

Comments
 (0)