Skip to content

Commit

Permalink
Sign and notarise
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelpowell committed Dec 13, 2024
1 parent b59dfd9 commit 2184c31
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 2 deletions.
34 changes: 33 additions & 1 deletion .github/workflows/build_mex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
with:
release: R2022a

- uses: apple-actions/import-codesign-certs@v3
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'
with:
p12-file-base64: ${{ secrets.APPLE_CERTIFICATES_P12 }}
p12-password: ${{ secrets.APPLE_CERTIFICATES_P12_PASSWORD }}

# Build the MEX
- name: Build
shell: bash
Expand All @@ -43,10 +49,36 @@ jobs:
cmake ../
cmake --build . --target install --config Release
# Code sign and archive on MacOS
- name: Code sign, archive and notarize
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'
env:
APPLE_CODESIGN_IDENTITY: ${{ secrets.APPLE_CODESIGN_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
RUNNER_OS: ${{ runner.os }}
RUNNER_ARCH: ${{ runner.arch }}
run: |
codesign --deep --force --verify --verbose --timestamp --sign ${APPLE_CODESIGN_IDENTITY} --options runtime dist/matlab/toast/*.mex*
cd dist/matlab
zip -r toastmm-matlab-${RUNNER_OS}-${$RUNNER_ARCH}.zip *
xcrun notarytool submit --wait --apple-id ${APPLE_ID} --team-id ${APPLE_TEAM_ID} --password ${APPLE_ID_PASSWORD} toastmm-matlab-${RUNNER_OS}-${$UNNER_ARCH}.zip
xcrun stapler staple -v toastmm-matlab-${RUNNER_OS}-${$RUNNER_ARCH}.zip
- uses: actions/upload-artifact@v3
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'
with:
name: toastmm-matlab-${{ runner.os }}-${{ runner.arch }}
path: |
dist/matlab/toastmm-matlab-${{ runner.os }}-${{ runner.arch }}.zip
- uses: actions/upload-artifact@v3
if: matrix.os != 'macos-14' && matrix.os != 'macos-13'
with:
name: toastmm-matlab-${{ runner.os }}-${{ runner.arch }}
path: |
dist/matlab
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@ python -m pip wheel .

The result will be a wheel file called `toastmm-<ver>-cp36-abi3-<platform>.whl` in the root directory. The additional files included with the CI build distribution are located in `script/python`.

## Acknowledgements

Code signing and notarisation kindly supported by [Gowerlabs](https://www.gowerlabs.co.uk).



Expand Down
2 changes: 1 addition & 1 deletion include/toastdef.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//
#define TOASTMM_VER_MAJOR 0
#define TOASTMM_VER_MINOR 9
#define TOASTMM_VER_PATCH 0
#define TOASTMM_VER_PATCH 1
#define TOASTMM_VER_SUFFIX "-dev"
#define TOASTMM_VER_STRING "0.9.1-dev"

Expand Down

0 comments on commit 2184c31

Please sign in to comment.