Files
openssh-portable/.github/workflows/c-cpp.yml
T
Darren Tucker 9775473d84 Rename "os" in matrix to "target".
This is in preparation to distinguish this from the host that the runner
runs on in case where they are separate (eg VMs).
2022-11-27 11:20:35 +11:00

124 lines
5.6 KiB
YAML

name: C/C++ CI
on:
push:
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]
pull_request:
paths: [ '**.c', '**.h', '**.m4', '**.sh', '.github/**', '**/Makefile.in', 'configure.ac' ]
jobs:
ci:
if: github.repository != 'openssh/openssh-portable-selfhosted'
strategy:
fail-fast: false
matrix:
# First we test all OSes in the default configuration.
target: [ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022]
configs: [default]
# Then we include any extra configs we want to test for specific VMs.
# Valgrind slows things down quite a bit, so start them first.
include:
- { target: windows-2019, configs: cygwin-release }
- { target: windows-2022, configs: cygwin-release }
- { target: ubuntu-20.04, configs: valgrind-1 }
- { target: ubuntu-20.04, configs: valgrind-2 }
- { target: ubuntu-20.04, configs: valgrind-3 }
- { target: ubuntu-20.04, configs: valgrind-4 }
- { target: ubuntu-20.04, configs: valgrind-5 }
- { target: ubuntu-20.04, configs: valgrind-unit }
- { target: ubuntu-20.04, configs: c89 }
- { target: ubuntu-20.04, configs: clang-6.0 }
- { target: ubuntu-20.04, configs: clang-8 }
- { target: ubuntu-20.04, configs: clang-9 }
- { target: ubuntu-20.04, configs: clang-10 }
- { target: ubuntu-20.04, configs: clang-11 }
- { target: ubuntu-20.04, configs: clang-12-Werror }
- { target: ubuntu-20.04, configs: clang-sanitize-address }
- { target: ubuntu-20.04, configs: clang-sanitize-undefined }
- { target: ubuntu-20.04, configs: gcc-sanitize-address }
- { target: ubuntu-20.04, configs: gcc-sanitize-undefined }
- { target: ubuntu-20.04, configs: gcc-7 }
- { target: ubuntu-20.04, configs: gcc-8 }
- { target: ubuntu-20.04, configs: gcc-10 }
- { target: ubuntu-20.04, configs: gcc-11-Werror }
- { target: ubuntu-20.04, configs: pam }
- { target: ubuntu-20.04, configs: kitchensink }
- { target: ubuntu-20.04, configs: hardenedmalloc }
- { target: ubuntu-20.04, configs: tcmalloc }
- { target: ubuntu-20.04, configs: musl }
- { target: ubuntu-latest, configs: libressl-master }
- { target: ubuntu-latest, configs: libressl-2.2.9 }
- { target: ubuntu-latest, configs: libressl-2.8.3 }
- { target: ubuntu-latest, configs: libressl-3.0.2 }
- { target: ubuntu-latest, configs: libressl-3.2.6 }
- { target: ubuntu-latest, configs: libressl-3.3.6 }
- { target: ubuntu-latest, configs: libressl-3.4.3 }
- { target: ubuntu-latest, configs: libressl-3.5.3 }
- { target: ubuntu-latest, configs: libressl-3.6.1 }
- { target: ubuntu-latest, configs: openssl-master }
- { target: ubuntu-latest, configs: openssl-noec }
- { target: ubuntu-latest, configs: openssl-1.0.1 }
- { target: ubuntu-latest, configs: openssl-1.0.1u }
- { target: ubuntu-latest, configs: openssl-1.0.2u }
- { target: ubuntu-latest, configs: openssl-1.1.0h }
- { target: ubuntu-latest, configs: openssl-1.1.1 }
- { target: ubuntu-latest, configs: openssl-1.1.1k }
- { target: ubuntu-latest, configs: openssl-1.1.1n }
- { target: ubuntu-latest, configs: openssl-1.1.1q }
- { target: ubuntu-latest, configs: openssl-3.0.0 }
- { target: ubuntu-latest, configs: openssl-3.0.5 }
- { target: ubuntu-latest, configs: openssl-3.0.7 }
- { target: ubuntu-latest, configs: openssl-1.1.1_stable }
- { target: ubuntu-latest, configs: openssl-3.0 } # stable branch
- { target: ubuntu-22.04, configs: pam }
- { target: ubuntu-22.04, configs: krb5 }
- { target: ubuntu-22.04, configs: heimdal }
- { target: ubuntu-22.04, configs: libedit }
- { target: ubuntu-22.04, configs: sk }
- { target: ubuntu-22.04, configs: selinux }
- { target: ubuntu-22.04, configs: kitchensink }
- { target: ubuntu-22.04, configs: without-openssl }
- { target: macos-11, configs: pam }
- { target: macos-12, configs: pam }
runs-on: ${{ matrix.target }}
steps:
- name: set cygwin git params
if: ${{ startsWith(matrix.target, 'windows') }}
run: git config --global core.autocrlf input
- name: install cygwin
if: ${{ startsWith(matrix.target, 'windows') }}
uses: cygwin/cygwin-install-action@master
- uses: actions/checkout@main
- name: setup CI system
run: sh ./.github/setup_ci.sh ${{ matrix.configs }}
- name: autoreconf
run: sh -c autoreconf
- name: configure
run: sh ./.github/configure.sh ${{ matrix.configs }}
- name: save config
uses: actions/upload-artifact@main
with:
name: ${{ matrix.target }}-${{ matrix.configs }}-config
path: config.h
- name: make clean
run: make clean
- name: make
run: make -j2
- name: make tests
run: sh ./.github/run_test.sh ${{ matrix.configs }}
env:
TEST_SSH_UNSAFE_PERMISSIONS: 1
TEST_SSH_HOSTBASED_AUTH: yes
- name: save logs
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ matrix.target }}-${{ matrix.configs }}-logs
path: |
config.h
config.log
regress/*.log
regress/valgrind-out/
regress/asan.log.*
regress/msan.log.*