Skip to content

Commit

Permalink
ci: add iOS platform
Browse files Browse the repository at this point in the history
  • Loading branch information
alfredh authored and sreimers committed Jun 9, 2023
1 parent e83debd commit 8efe053
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
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

0 comments on commit 8efe053

Please sign in to comment.