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

ci: add iOS platform #838

Merged
merged 1 commit into from
Jun 9, 2023
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
15 changes: 15 additions & 0 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: iOS

on: [push, pull_request]

jobs:
ios:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: build
run: |
cmake -B build -G Xcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_DISABLE_FIND_PACKAGE_OpenSSL=ON -DUSE_OPENSSL=OFF -DCMAKE_C_FLAGS="-DDARWIN -Werror"
cmake --build build -- CODE_SIGNING_ALLOWED=NO
4 changes: 4 additions & 0 deletions src/md5/wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include <stddef.h>
#include <openssl/evp.h>
#include <openssl/md5.h>
#elif defined (__APPLE__)
#include <CommonCrypto/CommonDigest.h>
#endif
#include <re_types.h>
#include <re_fmt.h>
Expand All @@ -31,6 +33,8 @@ void md5(const uint8_t *d, size_t n, uint8_t *md)
EVP_DigestUpdate(ctx, d, n);
EVP_DigestFinal_ex(ctx, md, NULL);
EVP_MD_CTX_free(ctx);
#elif defined (__APPLE__)
CC_MD5(d, (unsigned int)n, md);
#else
#error missing MD5 backend
#endif
Expand Down