@@ -12,15 +12,21 @@ jobs:
1212 strategy :
1313 matrix :
1414 # macos-latest-large is the latest intel based runner
15- os : [macos-13, macos-latest-large]
15+ os : [macos-13, macos-latest-large, ubuntu-22.04 ]
1616 openssl_version :
[[email protected] ] 1717
1818 permissions :
1919 id-token : write
2020 contents : read
2121
2222 steps :
23- - run : brew install ${{ matrix.openssl_version }}
23+ - name : Install OpenSSL
24+ if : matrix.os != 'ubuntu-22.04'
25+ run : brew install ${{ matrix.openssl_version }}
26+
27+ - name : Install LibCurl
28+ if : matrix.os == 'ubuntu-22.04'
29+ run : sudo apt-get install libcurl4-openssl-dev
2430
2531 - name : Checkout PR
2632 uses : actions/checkout@v4
@@ -43,10 +49,12 @@ jobs:
4349 submodules : recursive
4450
4551 - name : Install dependencies
52+ if : matrix.os != 'ubuntu-22.04'
4653 run :
4754 brew install json-c
4855
4956 - name : Build and install aws-sdk-cpp
57+ if : matrix.os != 'ubuntu-22.04'
5058 run : |
5159 # remove the following line once aws-sdk-cpp fixes linux-shared/SimpleUDP.cpp
5260 perl -i -p -e 's/"-Werror"//' aws-sdk-cpp/cmake/compiler_settings.cmake
5765 xcodebuild -target ALL_BUILD
5866 xcodebuild -target install
5967
68+ - name : Build and install aws-sdk-cpp
69+ if : matrix.os == 'ubuntu-22.04'
70+ run : |
71+ # remove the following line once aws-sdk-cpp fixes linux-shared/SimpleUDP.cpp
72+ perl -i -p -e 's/"-Werror"//' aws-sdk-cpp/cmake/compiler_settings.cmake
73+ mkdir -p build-aws-sdk-cpp || true
74+ mkdir -p install || true
75+ cd build-aws-sdk-cpp
76+ cmake -DBUILD_SHARED_LIBS=ON -DBUILD_ONLY="kms" -DENABLE_UNITY_BUILD=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/install ../aws-sdk-cpp
77+ make
78+ make install
79+
6080 - name : Configure AWS Credentials
6181 uses : aws-actions/configure-aws-credentials@v2
6282 with :
6585 role-session-name : CESDKTests
6686
6787 - name : Build C-ESDK
88+ if : matrix.os != 'ubuntu-22.04'
6889 env :
6990 OPENSSL_VERSION : ${{ matrix.openssl_version }}
7091 # 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
7596 xcodebuild -target ALL_BUILD
7697 xcodebuild -scheme RUN_TESTS
7798
99+ - name : Build C-ESDK
100+ if : matrix.os == 'ubuntu-22.04'
101+ env :
102+ OPENSSL_VERSION : ${{ matrix.openssl_version }}
103+ # 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
104+ run : |
105+ mkdir build-aws-encryption-sdk-c || true
106+ cd build-aws-encryption-sdk-c
107+ cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DCMAKE_PREFIX_PATH=${{github.workspace}}/install -DOPENSSL_ROOT_DIR="/usr/local/opt/${OPENSSL_VERSION}" ../
108+ make
109+ make test
110+ make install
111+
112+ - name : Run Interop Test Vectors
113+ if : matrix.os != 'ubuntu-22.04'
114+ run : |
115+ cd tests/TestVectors/
116+ make decrypt_dafny
117+ make encrypt
118+ make decrypt
119+
78120 - name : Run Interop Test Vectors
121+ if : matrix.os == 'ubuntu-22.04'
79122 run : |
80123 cd tests/TestVectors/
124+ make test_vectors_unix
81125 make decrypt_dafny
82126 make encrypt
83127 make decrypt
0 commit comments