GHA/linux: merge AWS-LC workflow

Closes #15031
This commit is contained in:
Viktor Szakats 2024-09-24 15:01:26 +02:00
parent 820afa2b7c
commit 336b8ca54d
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
2 changed files with 42 additions and 156 deletions

View file

@ -1,156 +0,0 @@
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
#
# SPDX-License-Identifier: curl
name: Linux AWS-LC
'on':
push:
branches:
- master
- '*/ci'
paths-ignore:
- '**/*.md'
- '.circleci/**'
- 'appveyor.*'
- 'packages/**'
- 'plan9/**'
- 'projects/**'
- 'winbuild/**'
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '.circleci/**'
- 'appveyor.*'
- 'packages/**'
- 'plan9/**'
- 'projects/**'
- 'winbuild/**'
concurrency:
# Hardcoded workflow filename as workflow name above is just Linux again
group: awslc-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
permissions: {}
env:
MAKEFLAGS: -j 5
# renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com
awslc-version: 1.34.2
jobs:
autoconf:
name: awslc (autoconf)
runs-on: 'ubuntu-latest'
timeout-minutes: 30
steps:
- run: |
sudo apt-get install --yes libtool autoconf automake pkgconf stunnel4 libpsl-dev
# ensure we don't pick up openssl in this build
sudo apt remove --yes libssl-dev
sudo python3 -m pip install impacket
name: 'install prereqs and impacket'
- name: cache awslc
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
id: cache-awslc
env:
cache-name: cache-awslc
with:
path: /home/runner/awslc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.awslc-version }}
- name: build awslc
if: steps.cache-awslc.outputs.cache-hit != 'true'
run: |
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 \
https://github.com/awslabs/aws-lc/archive/refs/tags/v${{ env.awslc-version }}.tar.gz
tar xzf v${{ env.awslc-version }}.tar.gz
mkdir aws-lc-${{ env.awslc-version }}-build
cd aws-lc-${{ env.awslc-version }}-build
cmake -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
cmake --build . --parallel
cmake --install .
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: autoreconf -fi
name: 'autoreconf'
- run: |
mkdir build
cd build
../configure --disable-dependency-tracking --enable-warnings --enable-werror --with-openssl=$HOME/awslc
cd ..
name: 'configure out-of-tree'
- run: make -C build V=1
name: 'make'
- run: make -C build V=1 -C tests
name: 'make tests'
- run: make -C build V=1 test-ci
name: 'run tests'
timeout-minutes: 15
- run: make -C build V=1 examples
name: 'make examples'
cmake:
name: awslc (cmake)
runs-on: 'ubuntu-latest'
timeout-minutes: 15
steps:
- run: |
sudo apt-get install cmake ninja-build stunnel4 libpsl-dev
# ensure we don't pick up openssl in this build
sudo apt remove --yes libssl-dev
sudo python3 -m pip install impacket
name: 'install prereqs and impacket'
- name: cache awslc
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
id: cache-awslc
env:
cache-name: cache-awslc
with:
path: /home/runner/awslc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.awslc-version }}
- name: build awslc
if: steps.cache-awslc.outputs.cache-hit != 'true'
run: |
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 \
https://github.com/awslabs/aws-lc/archive/refs/tags/v${{ env.awslc-version }}.tar.gz
tar xzf v${{ env.awslc-version }}.tar.gz
mkdir aws-lc-${{ env.awslc-version }}-build
cd aws-lc-${{ env.awslc-version }}-build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
cmake --build . --parallel
cmake --install .
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- run: |
cmake -B build -G Ninja -DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
-DOPENSSL_ROOT_DIR=$HOME/awslc -DBUILD_SHARED_LIBS=ON
name: 'cmake generate out-of-tree'
- run: cmake --build build --parallel
name: 'cmake build'
- run: cmake --install build --prefix $HOME/curl --strip
name: 'cmake install'
- run: cmake --build build --parallel --target testdeps
name: 'cmake build tests'
- run: cmake --build build --parallel --target curl-examples
name: 'cmake build examples'

View file

@ -47,6 +47,8 @@ env:
mod_h2-version: 2.0.29
# renovate: datasource=github-tags depName=nibanks/msh3 versioning=semver registryUrl=https://github.com
msh3-version: 0.6.0
# renovate: datasource=github-tags depName=awslabs/aws-lc versioning=semver registryUrl=https://github.com
awslc-version: 1.34.2
# handled in renovate.json
openssl3-version: openssl-3.1.3
# unhandled
@ -124,6 +126,18 @@ jobs:
configure: LDFLAGS="-Wl,-rpath,$HOME/msh3/lib -Wl,-rpath,$HOME/quictls/lib" --with-msh3=$HOME/msh3 --with-openssl=$HOME/quictls --enable-debug
singleuse: --unit
- name: awslc
install_packages: zlib1g-dev
install_steps: awslc
configure: LDFLAGS="-Wl,-rpath,$HOME/awslc/lib" --with-openssl=$HOME/awslc
singleuse: --unit
- name: awslc
install_packages: zlib1g-dev
install_steps: awslc
generate: -DOPENSSL_ROOT_DIR=$HOME/awslc
singleuse: --unit
- name: openssl default
install_steps: pytest
configure: --with-openssl --enable-debug
@ -468,6 +482,28 @@ jobs:
cmake --build .
cmake --install .
- name: cache awslc
if: contains(matrix.build.install_steps, 'awslc')
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4
id: cache-awslc
env:
cache-name: cache-awslc
with:
path: /home/runner/awslc
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.awslc-version }}
- name: build awslc
if: contains(matrix.build.install_steps, 'awslc') && steps.cache-awslc.outputs.cache-hit != 'true'
run: |
curl -LOsSf --retry 6 --retry-connrefused --max-time 999 \
https://github.com/awslabs/aws-lc/archive/refs/tags/v${{ env.awslc-version }}.tar.gz
tar xzf v${{ env.awslc-version }}.tar.gz
mkdir aws-lc-${{ env.awslc-version }}-build
cd aws-lc-${{ env.awslc-version }}-build
cmake -G Ninja -DCMAKE_INSTALL_PREFIX=$HOME/awslc ../aws-lc-${{ env.awslc-version }}
cmake --build . --parallel
cmake --install .
- if: contains(matrix.build.install_steps, 'rust')
run: |
cd $HOME
@ -549,6 +585,7 @@ jobs:
name: 'autoreconf'
- run: |
[[ '${{ matrix.build.install_steps }}' = *'awslc'* ]] && sudo apt remove --yes libssl-dev
${{ matrix.build.configure-prefix }} \
./configure --disable-dependency-tracking --enable-unity --enable-test-bundles --enable-warnings --enable-werror \
${{ matrix.build.configure }}
@ -556,6 +593,7 @@ jobs:
name: 'configure (autotools)'
- run: |
[[ '${{ matrix.build.install_steps }}' = *'awslc'* ]] && sudo apt remove --yes libssl-dev
cmake . \
-DCMAKE_C_COMPILER_TARGET=$(uname -m)-pc-linux-gnu -DBUILD_STATIC_LIBS=ON \
-DCMAKE_UNITY_BUILD=ON -DCURL_TEST_BUNDLES=ON -DCURL_WERROR=ON \
@ -589,6 +627,10 @@ jobs:
- run: ./src/curl -V
name: 'check curl -V output'
- run: cmake --install . --prefix $HOME/curl --strip
if: ${{ matrix.build.generate }}
name: 'cmake install'
- run: make V=1 -C tests
if: ${{ matrix.build.configure && matrix.build.install_steps != 'skipall' }}
name: 'make tests (autotools)'