forked from jasonacox/Build-OpenSSL-cURL
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
100 lines (91 loc) · 4.39 KB
/
.travis.yml
File metadata and controls
100 lines (91 loc) · 4.39 KB
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
enabled: false # Travis CI builds turned off
os: osx
osx_image: xcode12.3
language: objective-c
env:
global:
- OPENSSL="1.1.1i" # https://www.openssl.org/source/
- LIBCURL="7.74.0" # https://curl.haxx.se/download.html
- NGHTTP2="1.42.0" # https://nghttp2.org/
- EXAMPLE="example/iOS Test App"
- PATH=/Users/travis/Library/Python/3.9/bin:$PATH # for AWS
before_install:
# set up awscli packages
- python3 -m pip install pyopenssl
- python3 -m pip install --user awscli
- ls /Users/travis/Library/Python/
- ls /Users/travis/Library/Python/3.9/bin
- aws s3 ls jasonacox.com.travis-build-stage-storage
stages:
- nghttp2
- opensslphase1
- opensslphase2
- libcurl
- test
jobs:
include:
- stage: nghttp2
script:
- cd nghttp2;./nghttp2-build.sh -v "$NGHTTP2"
- cd ..
- tar -zcf "nghttp2.tgz" nghttp2/Catalyst nghttp2/iOS* nghttp2/tvOS* nghttp2/lib
- aws s3 cp "nghttp2.tgz" s3://jasonacox.com.travis-build-stage-storage/
- aws s3 ls jasonacox.com.travis-build-stage-storage
- stage: opensslphase1
script:
- cd openssl;./openssl-build-phase1.sh -v "$OPENSSL"
- cd ..
- cp /tmp/openssl-x86_64 openssl/Mac/openssl
- /tmp/openssl-x86_64 version
- tar -zcf "openssl-1.tgz" openssl/Mac openssl/Catalyst openssl/iOS* openssl/tvOS*
- aws s3 cp "openssl-1.tgz" s3://jasonacox.com.travis-build-stage-storage/
- aws s3 ls jasonacox.com.travis-build-stage-storage
- stage: opensslphase2
script:
- cd openssl;./openssl-build-phase2.sh -v "$OPENSSL"
- cd ..
- tar -zcf "openssl-2.tgz" openssl/Mac openssl/Catalyst openssl/iOS* openssl/tvOS*
- aws s3 cp "openssl-2.tgz" s3://jasonacox.com.travis-build-stage-storage/
- aws s3 ls jasonacox.com.travis-build-stage-storage
- stage: libcurl
script:
- echo "Fetching openssl and nghttp2 libraries..."
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/openssl-1.tgz .
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/openssl-2.tgz .
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/nghttp2.tgz .
- tar -zxf openssl-1.tgz
- tar -zxf openssl-2.tgz
- tar -zxf nghttp2.tgz
- cd curl;./libcurl-build.sh -v "$LIBCURL"
- cd ..
- cp /tmp/curl curl/lib
- /tmp/curl-x86_64 -V
- echo "Uploading libcurl libraries..."
- tar -zcf "curl.tgz" curl/lib curl/include
- aws s3 cp "curl.tgz" s3://jasonacox.com.travis-build-stage-storage/
- aws s3 ls jasonacox.com.travis-build-stage-storage
- stage: test
script:
- echo "Fetching libcurl, openssl and nghttp2 libraries..."
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/curl.tgz .
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/openssl-1.tgz .
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/openssl-2.tgz .
- aws s3 cp s3://jasonacox.com.travis-build-stage-storage/nghttp2.tgz .
- tar -zxf openssl-1.tgz
- tar -zxf openssl-2.tgz
- tar -zxf nghttp2.tgz
- tar -zxf curl.tgz
- echo "Fetching root certs..."
- curl -sL https://curl.haxx.se/ca/cacert.pem > "$EXAMPLE/cacert.pem"
- echo "Copying libraries to Test App ..."
- rm -fr "$EXAMPLE/libs/"
- mkdir -p "$EXAMPLE/libs/"
- echo "Making XCFrameworks..."
- xcodebuild -create-xcframework -library curl/lib/libcurl_iOS.a -library curl/lib/libcurl_iOS-simulator.a -output "$EXAMPLE/libs/libcurl.xcframework"
- xcodebuild -create-xcframework -library openssl/iOS/lib/libcrypto.a -library openssl/iOS-simulator/lib/libcrypto.a -output "$EXAMPLE/libs/libcrypto.xcframework"
- xcodebuild -create-xcframework -library openssl/iOS/lib/libssl.a -library openssl/iOS-simulator/lib/libssl.a -output "$EXAMPLE/libs/libssl.xcframework"
- xcodebuild -create-xcframework -library nghttp2/lib/libnghttp2_iOS.a -library nghttp2/lib/libnghttp2_iOS-simulator.a -output "$EXAMPLE/libs/libnghttp2.xcframework"
- cp curl/include/curl/* "$EXAMPLE/include/curl/"
- echo "Building iOS Test App for iPhoneSimulator..."
- xcodebuild clean -project "$EXAMPLE/iOS Test App.xcodeproj"
- xcodebuild build -project "$EXAMPLE/iOS Test App.xcodeproj" -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO -arch x86_64