2023-09-07 16:59:15 +08:00
|
|
|
# Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved.
|
2021-09-20 07:54:10 +08:00
|
|
|
#
|
|
|
|
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
|
|
|
# this file except in compliance with the License. You can obtain a copy
|
|
|
|
# in the file LICENSE in the source distribution or at
|
|
|
|
# https://www.openssl.org/source/license.html
|
|
|
|
|
2021-03-12 15:52:16 +08:00
|
|
|
name: Coverage
|
|
|
|
|
2023-02-27 08:05:48 +08:00
|
|
|
# Run once a day
|
2021-03-12 15:52:16 +08:00
|
|
|
on:
|
|
|
|
schedule:
|
2021-05-03 16:53:08 +08:00
|
|
|
- cron: '49 0 * * *'
|
2021-03-12 15:52:16 +08:00
|
|
|
|
2022-07-09 22:03:23 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2021-03-12 15:52:16 +08:00
|
|
|
jobs:
|
|
|
|
coverage:
|
2022-07-09 22:03:23 +08:00
|
|
|
permissions:
|
2023-02-27 08:05:48 +08:00
|
|
|
checks: write # for coverallsapp/github-action to create new checks
|
|
|
|
contents: read # for actions/checkout to fetch code
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
branches: [
|
|
|
|
{
|
|
|
|
branch: openssl-3.1,
|
2023-09-29 18:09:10 +08:00
|
|
|
extra_config: no-afalgeng enable-fips
|
2023-02-27 08:05:48 +08:00
|
|
|
}, {
|
|
|
|
branch: openssl-3.0,
|
2023-09-29 18:09:10 +08:00
|
|
|
extra_config: no-afalgeng enable-fips
|
2023-02-27 08:05:48 +08:00
|
|
|
}, {
|
|
|
|
branch: master,
|
2023-09-29 18:09:10 +08:00
|
|
|
extra_config: no-afalgeng enable-fips enable-tfo
|
2023-02-27 08:05:48 +08:00
|
|
|
}
|
|
|
|
]
|
2021-03-12 15:52:16 +08:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-05 15:56:28 +08:00
|
|
|
- uses: actions/checkout@v4
|
2022-06-20 13:52:24 +08:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-02-27 08:05:48 +08:00
|
|
|
ref: ${{ matrix.branches.branch }}
|
|
|
|
- name: cache commit id
|
|
|
|
run: |
|
|
|
|
echo "githubid=`/usr/bin/git log -1 --format='%H'`" >>$GITHUB_ENV
|
2021-03-12 15:52:16 +08:00
|
|
|
- name: package installs
|
|
|
|
run: |
|
2022-06-20 13:52:24 +08:00
|
|
|
sudo apt-get update
|
2021-03-12 15:52:16 +08:00
|
|
|
sudo apt-get -yq install lcov
|
2022-06-20 13:52:24 +08:00
|
|
|
sudo apt-get -yq install bison gettext keyutils ldap-utils libldap2-dev libkeyutils-dev python3 python3-paste python3-pyrad slapd tcsh python3-virtualenv virtualenv python3-kdcproxy
|
2023-02-27 08:05:48 +08:00
|
|
|
- name: install Test2::V0 for gost_engine testing
|
2022-06-20 13:52:24 +08:00
|
|
|
uses: perl-actions/install-with-cpanm@v1
|
|
|
|
with:
|
|
|
|
install: Test2::V0
|
|
|
|
- name: setup hostname workaround
|
|
|
|
run: sudo hostname localhost
|
2021-03-12 15:52:16 +08:00
|
|
|
- name: config
|
2023-09-29 18:09:10 +08:00
|
|
|
run: CC=gcc ./config --debug --coverage ${{ matrix.branches.extra_config }} no-asm enable-rc5 enable-md2 enable-ssl3 enable-nextprotoneg enable-ssl3-method enable-weak-ssl-ciphers enable-zlib enable-ec_nistp_64_gcc_128 enable-buildtest-c++ enable-ssl-trace enable-trace
|
2021-07-29 11:37:30 +08:00
|
|
|
- name: config dump
|
|
|
|
run: ./configdata.pm --dump
|
2021-03-12 15:52:16 +08:00
|
|
|
- name: make
|
|
|
|
run: make -s -j4
|
2023-09-28 16:50:55 +08:00
|
|
|
- name: get cpu info
|
|
|
|
run: |
|
|
|
|
cat /proc/cpuinfo
|
|
|
|
./util/opensslwrap.sh version -c
|
2021-03-12 15:52:16 +08:00
|
|
|
- name: make test
|
2022-06-20 13:52:24 +08:00
|
|
|
run: make test HARNESS_JOBS=${HARNESS_JOBS:-4} TESTS='-test_external_krb5'
|
2021-03-12 15:52:16 +08:00
|
|
|
- name: generate coverage info
|
2023-10-03 14:39:31 +08:00
|
|
|
run: lcov -d . -c
|
|
|
|
--exclude "${PWD}/test/*"
|
|
|
|
--exclude "${PWD}/test/helpers/*"
|
|
|
|
--exclude "${PWD}/test/testutil/*"
|
|
|
|
--exclude "${PWD}/fuzz/*"
|
|
|
|
--exclude "/usr/include/*"
|
2023-09-28 19:21:37 +08:00
|
|
|
-o ./lcov.info
|
2021-03-12 15:52:16 +08:00
|
|
|
- name: Coveralls upload
|
2023-09-08 16:14:37 +08:00
|
|
|
uses: coverallsapp/github-action@v2.2.3
|
2021-03-12 15:52:16 +08:00
|
|
|
with:
|
|
|
|
github-token: ${{ secrets.github_token }}
|
2023-02-27 08:05:48 +08:00
|
|
|
git-branch: ${{ matrix.branches.branch }}
|
|
|
|
git-commit: ${{ env.githubid }}
|
2021-03-12 15:52:16 +08:00
|
|
|
path-to-lcov: ./lcov.info
|