forked from aws/aws-encryption-sdk-c
-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.43 KB
/
osx.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
name: macOS build and test AWS Encryption SDK for C
on:
pull_request:
branches:
- master
jobs:
OSX:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-10.15, macos-latest]
openssl_version: [openssl@1.1]
steps:
- run: brew install ${{ matrix.openssl_version }}
- name: Checkout PR
uses: actions/checkout@v2
with:
submodules: recursive
- name: Checkout AWS C++ SDK
uses: actions/checkout@v2
with:
repository: "aws/aws-sdk-cpp"
ref: "1.8.32"
path: "aws-sdk-cpp"
- name: Install dependencies
run:
brew install json-c
# The hosted Actions runners include CMake v3.19.1 by default, which has
# a regression that causes aws-sdk-cpp and aws-encryption-sdk-c to fail
# to build on the runners.
# This appears to have been an issue in CMake that is fixed in 3.19.3.
# This workaround is required until the MacOS Action is updated to a
# a newer CMake, or the dependency adds a workaround for 3.19.1.
# See https://github.com/aws/aws-encryption-sdk-c/issues/650 and
# https://github.com/actions/virtual-environments/blob/main/images/macos/macos-10.15-Readme.md
- name: Install CMake v3.19.3
run: |
brew uninstall cmake
curl -L https://github.com/Kitware/CMake/releases/download/v3.19.3/cmake-3.19.3-macos-universal.tar.gz | tar xz
cd cmake-3.19.3-macos-universal/CMake.app/Contents/bin
./cmake-gui --install
- name: Build and install aws-sdk-cpp
run: |
mkdir -p build-aws-sdk-cpp || true
mkdir -p install || true
cd build-aws-sdk-cpp
cmake -G Xcode -DTARGET_ARCH="APPLE" -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON ../aws-sdk-cpp
xcodebuild -target ALL_BUILD
xcodebuild -target install
- name: Build C-ESDK
env:
OPENSSL_VERSION: ${{ matrix.openssl_version }}
# TODO-RS: Figure out how to safely add AWS credentials and add -DAWS_ENC_SDK_END_TO_END_TESTS=ON and -DAWS_ENC_SDK_KNOWN_GOOD_TESTS=ON
run: |
mkdir build-aws-encryption-sdk-c || true
cd build-aws-encryption-sdk-c
cmake -G Xcode -DBUILD_SHARED_LIBS=ON -DOPENSSL_ROOT_DIR="/usr/local/opt/${OPENSSL_VERSION}" ../
xcodebuild -target ALL_BUILD
xcodebuild -scheme RUN_TESTS