Skip to content
Open
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,25 @@ jobs:
aws s3 cp --debug s3://aws-crt-test-stuff/ci/${{ env.BUILDER_VERSION }}/linux-container-ci.sh ./linux-container-ci.sh && chmod a+x ./linux-container-ci.sh
./linux-container-ci.sh ${{ env.BUILDER_VERSION }} aws-crt-swift-5-${{ matrix.image }} build -p ${{ env.PACKAGE_NAME }}

linux-android:
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.CRT_CI_ROLE }}
aws-region: ${{ env.AWS_DEFAULT_REGION }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: "Test Swift Package on Android"
uses: skiptools/swift-android-action@v2
with:
# Ubuntu runners low on space causes the emulator to fail to install
free-disk-space: true
run-tests: false

macos:
runs-on: ${{ matrix.runner }}
env:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "aws-common-runtime/aws-c-mqtt"]
path = aws-common-runtime/aws-c-mqtt
url = https://github.com/awslabs/aws-c-mqtt.git
[submodule "aws-common-runtime/aws-lc"]
path = aws-common-runtime/aws-lc
url = https://github.com/aws/aws-lc
448 changes: 332 additions & 116 deletions Package.swift

Large diffs are not rendered by default.

7 changes: 0 additions & 7 deletions Source/LibCrypto/module.modulemap

This file was deleted.

17 changes: 0 additions & 17 deletions Source/LibCrypto/shim.h

This file was deleted.

2 changes: 1 addition & 1 deletion Test/AwsCommonRuntimeKitTests/XCBaseTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ extension XCTestCase {
}

func skipIfLinux() throws {
#if os(Linux)
#if os(Linux) || os(Android)
throw XCTSkip("Skipping test on linux")
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions Test/AwsCommonRuntimeKitTests/io/TLSContextTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TLSContextTests: XCBaseTestCase {
_ = TLSConnectionOptions(context: context)
}

#if os(macOS) || os(Linux)
#if os(macOS) || os(Linux) || os(Android)
func testCreateTlsContextWithFilePath() throws {

let certPath = try getEnvironmentVarOrSkipTest(
Expand All @@ -28,7 +28,7 @@ class TLSContextTests: XCBaseTestCase {
}
#endif

#if os(macOS) || os(Linux)
#if os(macOS) || os(Linux) || os(Android)
func testCreateTlsContextWithData() throws {

let certPath = try getEnvironmentVarOrSkipTest(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AwsCCal_Platform {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_aes.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_hmac.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_md5.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_platform_init.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_sha1.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_sha256.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/commoncrypto_sha512.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/shared/lccrypto_common.c"
#endif
3 changes: 3 additions & 0 deletions aws-common-runtime/aws-c-cal-platform/sources/openssl_aes.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/unix/openssl_aes.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/unix/openssl_platform_init.c"
#endif
3 changes: 3 additions & 0 deletions aws-common-runtime/aws-c-cal-platform/sources/openssl_rsa.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/unix/openssl_rsa.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/unix/opensslcrypto_ecc.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/unix/opensslcrypto_hash.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-cal/source/unix/opensslcrypto_hmac.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/securityframework_ecc.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-cal/source/darwin/securityframework_rsa.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AwsCCommon_Platform {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __ANDROID__
#include "../../aws-c-common/source/android/logging.c"
#endif
2 changes: 2 additions & 0 deletions aws-common-runtime/aws-c-io-platform/include/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AwsCIo_Platform {
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-io/source/darwin/darwin_pki_utils.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-io/source/darwin/dispatch_queue_event_loop.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __linux__
#include "../../aws-c-io/source/linux/epoll_event_loop.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-io/source/bsd/kqueue_event_loop.c"
#endif
3 changes: 3 additions & 0 deletions aws-common-runtime/aws-c-io-platform/sources/nw_socket.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-io/source/darwin/nw_socket.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#if defined(__linux__) || defined(__ANDROID__)
#include "../../aws-c-io/source/s2n/s2n_tls_channel_handler.c"
#endif
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#ifdef __APPLE__
#include "../../aws-c-io/source/darwin/secure_transport_tls_channel_handler.c"
#endif
1 change: 1 addition & 0 deletions aws-common-runtime/aws-lc
Submodule aws-lc added at 9124e2
8 changes: 6 additions & 2 deletions aws-common-runtime/config/aws/common/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* should be considered to be an implementation detail, and can change at any
* time.
*/
#ifdef __APPLE__
#if defined(__APPLE__) && !defined(__ANDROID__)
/* This is a trick to skip OpenSSL header on Apple platforms since Swift Package Manager is not smart enough to exclude
* some headers.
*/
Expand All @@ -21,6 +21,10 @@

#define AWS_UNSTABLE_TESTING_API 1
#define AWS_AFFINITY_METHOD 0
#define AWS_HAVE_EXECINFO 1

/* Android doesn't have execinfo.h (backtrace functions) */
#if !defined(__ANDROID__)
# define AWS_HAVE_EXECINFO 1
#endif

#endif