Skip to content

Commit f6a8368

Browse files
committed
Add AWS-LC to GitHub Actions
1 parent f92ec92 commit f6a8368

File tree

1 file changed

+27
-2
lines changed

1 file changed

+27
-2
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ jobs:
149149
- true
150150
- false
151151
library:
152+
- name: aws-lc
153+
version: v1.48.2
152154
- name: boringssl
153155
version: e23fe9b6eecc10e4f9ea1f0027fea5eaee7bd6b6
154156
- name: openssl
@@ -274,18 +276,25 @@ jobs:
274276
url="https://boringssl.googlesource.com/boringssl/+archive/${{ matrix.library.version }}.tar.gz"
275277
tar_flags=""
276278
;;
279+
"aws-lc")
280+
url="https://github.com/aws/aws-lc/archive/refs/tags/${{ matrix.library.version }}.tar.gz"
281+
tar_flags="--strip-components=1"
282+
;;
277283
esac
278284
279285
case "${{ matrix.target}}" in
280286
"x86_64-unknown-linux-gnu")
287+
CPU=x86_64
281288
OS_COMPILER=linux-x86_64
282289
OS_FLAGS=""
283290
;;
284291
"i686-unknown-linux-gnu")
292+
CPU=i686
285293
OS_COMPILER=linux-elf
286294
OS_FLAGS="-m32 -msse2"
287295
;;
288296
"arm-unknown-linux-gnueabihf")
297+
CPU=armv4
289298
OS_COMPILER=linux-armv4
290299
OS_FLAGS=""
291300
export AR=arm-linux-gnueabihf-ar
@@ -328,6 +337,22 @@ jobs:
328337
# Copy stuff around so it's all as the build system expects.
329338
cp -r ../rust/ "$OPENSSL_DIR/rust"
330339
cp -r ./ "$OPENSSL_DIR/build"
340+
;;
341+
"aws-lc")
342+
mkdir build
343+
cd build
344+
345+
echo "set(CMAKE_SYSTEM_NAME Linux)" > toolchain.cmake
346+
echo "set(CMAKE_SYSTEM_PROCESSOR $CPU)" >> toolchain.cmake
347+
echo "set(triple ${{ matrix.target }})" >> toolchain.cmake
348+
echo 'set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} '$OS_FLAGS '" CACHE STRING "c++ flags")' >> toolchain.cmake
349+
echo 'set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} '$OS_FLAGS '" CACHE STRING "c flags")' >> toolchain.cmake
350+
echo 'set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} '$OS_FLAGS '" CACHE STRING "asm flags")' >> toolchain.cmake
351+
352+
cmake .. -DCMAKE_INSTALL_PREFIX="${OPENSSL_DIR}" -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake
353+
make -j "$(nproc)"
354+
make install
355+
;;
331356
esac
332357
333358
if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit
@@ -361,7 +386,7 @@ jobs:
361386
features="$features --features bindgen"
362387
fi
363388
cargo run --manifest-path=systest/Cargo.toml --target ${{ matrix.target }} $features
364-
if: matrix.library.name != 'boringssl'
389+
if: ${{ !(matrix.library.name == 'boringssl' || matrix.library.name == 'aws-lc') }}
365390
- name: Test openssl
366391
run: |
367392
if [[ "${{ matrix.library.name }}" == "boringssl" && "${{ matrix.bindgen }}" != "true" ]]; then
@@ -384,4 +409,4 @@ jobs:
384409
features="$features --features openssl-sys/bindgen"
385410
fi
386411
cargo test --manifest-path=openssl-errors/Cargo.toml --target ${{ matrix.target }} $features
387-
if: matrix.library.name != 'boringssl'
412+
if: ${{ !(matrix.library.name == 'boringssl' || matrix.library.name == 'aws-lc') }}

0 commit comments

Comments
 (0)