2021-01-05 11:52:46 +01:00
---
# vi: ts=2 sw=2 et:
2021-10-01 12:10:22 +02:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2021-01-05 11:52:46 +01:00
#
name : Unit tests
on :
pull_request :
branches :
2021-01-21 13:52:18 +00:00
- main
2021-11-12 17:37:15 +01:00
- v[0-9]+-stable
2021-01-05 11:52:46 +01:00
2021-11-13 22:34:04 +00:00
permissions :
contents : read
2021-11-13 14:40:20 +00:00
2021-01-05 11:52:46 +01:00
jobs :
build :
2024-06-07 10:55:53 +02:00
runs-on : ubuntu-24.04
2021-11-10 16:45:12 +01:00
concurrency :
2021-12-03 17:07:34 +01:00
group : ${{ github.workflow }}-${{ matrix.run_phase }}-${{ matrix.cryptolib }}-${{ github.ref }}
2021-11-10 16:45:12 +01:00
cancel-in-progress : true
2021-01-05 11:52:46 +01:00
strategy :
fail-fast : false
matrix :
2022-06-03 18:16:57 +00:00
run_phase : [ GCC, GCC_ASAN_UBSAN, CLANG, CLANG_RELEASE, CLANG_ASAN_UBSAN, CLANG_ASAN_UBSAN_NO_DEPS]
2021-12-01 12:50:01 +01:00
cryptolib : [ auto]
include :
- run_phase : GCC
cryptolib : openssl
- run_phase : CLANG
cryptolib : gcrypt
2021-01-05 11:52:46 +01:00
steps :
- name : Repository checkout
2024-07-01 09:49:46 +00:00
uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
2021-01-05 11:52:46 +01:00
- name : Install build dependencies
2022-07-13 11:12:36 +02:00
run : |
# Drop XDG_* stuff from /etc/environment, so we don't get the user
# XDG_* variables when running under sudo
sudo sed -i '/^XDG_/d' /etc/environment
# Pass only specific env variables through sudo, to avoid having
# the already existing XDG_* stuff on the "other side"
sudo --preserve-env=CRYPTOLIB,GITHUB_ACTIONS,CI .github/workflows/unit_tests.sh SETUP
2023-08-30 19:58:14 +02:00
- name : Build & test
2022-07-13 11:12:36 +02:00
run : sudo --preserve-env=CRYPTOLIB,GITHUB_ACTIONS,CI .github/workflows/unit_tests.sh RUN_${{ matrix.run_phase }}
2021-12-01 12:50:01 +01:00
env :
CRYPTOLIB : ${{ matrix.cryptolib }}