2020-08-05 17:00:52 +00:00
|
|
|
name: C/C++ CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master, ci ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
jobs:
|
2021-02-17 09:21:29 +00:00
|
|
|
ci:
|
Add self-hosted runners for VMs of other platforms.
Github only hosts a limited number of platforms, and the runner code
is only supported on slightly wider range of platforms. To increase
our test coverage beyond that, we run the runner natively on a VM host,
where it runs a jobs that boot VMs of other platforms, waits for them
to come up then runs the build and test by ssh'ing into the guest.
This means that the minimum dependencies for the guests are quite low
(basically just sshd, a compiler and make).
The interface to the VM host is fairly simple (basically 3 scripts:
vmstartup, vmrun and vmshutdown), but those are specific to the VM host
so are not in the public repo. We also mount the working directory on the
host via sshfs, so things like artifact upload by the runner also work.
As part of this we are moving the per-test-target configs into a single
place (.github/configs) where there will be referenced by a single short
"config" key. I plan to make the github-hosted runners use this too.
The self-hosted runners are run off a private repo on github since that
prevents third parties from accessing them[0], and since runner quota is
limited on private repos, we avoid running the tests we run on the public
repo.
[0] https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners#self-hosted-runner-security-with-public-repositories
2021-01-15 03:11:43 +00:00
|
|
|
if: github.repository != 'openssh/openssh-portable-selfhosted'
|
2021-01-08 03:26:32 +00:00
|
|
|
strategy:
|
2021-02-17 07:41:30 +00:00
|
|
|
fail-fast: false
|
2021-01-08 03:26:32 +00:00
|
|
|
matrix:
|
2021-02-21 21:09:27 +00:00
|
|
|
# First we test all OSes in the default configuration.
|
2021-02-25 14:15:10 +00:00
|
|
|
os: [ubuntu-20.04, ubuntu-18.04, ubuntu-16.04, macos-10.15]
|
2021-02-21 21:09:27 +00:00
|
|
|
configs: [default]
|
2021-02-17 07:41:30 +00:00
|
|
|
# Then we include any extra configs we want to test for specific VMs.
|
2021-02-21 21:09:27 +00:00
|
|
|
# Valgrind slows things down quite a bit, so start them first.
|
2021-02-17 07:41:30 +00:00
|
|
|
include:
|
2021-02-21 21:09:27 +00:00
|
|
|
- { os: ubuntu-20.04, configs: valgrind-1 }
|
|
|
|
- { os: ubuntu-20.04, configs: valgrind-2 }
|
|
|
|
- { os: ubuntu-20.04, configs: pam }
|
2021-02-17 07:41:30 +00:00
|
|
|
- { os: ubuntu-20.04, configs: kitchensink }
|
|
|
|
- { os: ubuntu-20.04, configs: hardenedmalloc }
|
|
|
|
- { os: ubuntu-20.04, configs: libressl-head }
|
|
|
|
- { os: ubuntu-20.04, configs: openssl-head }
|
2021-02-21 21:09:27 +00:00
|
|
|
- { os: ubuntu-18.04, configs: pam }
|
2021-02-17 07:41:30 +00:00
|
|
|
- { os: ubuntu-18.04, configs: kerberos5 }
|
|
|
|
- { os: ubuntu-18.04, configs: libedit }
|
|
|
|
- { os: ubuntu-18.04, configs: sk }
|
|
|
|
- { os: ubuntu-18.04, configs: selinux }
|
|
|
|
- { os: ubuntu-18.04, configs: kitchensink }
|
|
|
|
- { os: ubuntu-18.04, configs: without-openssl }
|
2021-02-21 21:09:27 +00:00
|
|
|
- { os: ubuntu-16.04, configs: pam }
|
2021-02-17 22:51:18 +00:00
|
|
|
- { os: ubuntu-16.04, configs: kitchensink }
|
2021-02-21 21:09:27 +00:00
|
|
|
- { os: macos-10.15, configs: pam }
|
2021-02-17 07:41:30 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
2021-01-08 03:26:32 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: setup CI system
|
|
|
|
run: ./.github/setup_ci.sh ${{ matrix.configs }}
|
|
|
|
- name: autoreconf
|
|
|
|
run: autoreconf
|
|
|
|
- name: configure
|
2021-02-17 07:41:30 +00:00
|
|
|
run: ./.github/configure.sh ${{ matrix.configs }}
|
2021-01-08 03:26:32 +00:00
|
|
|
- name: make
|
2021-01-28 09:55:16 +00:00
|
|
|
run: make -j2
|
2021-01-08 03:26:32 +00:00
|
|
|
- name: make tests
|
|
|
|
run: ./.github/run_test.sh ${{ matrix.configs }}
|
|
|
|
env:
|
2021-01-08 04:50:41 +00:00
|
|
|
SUDO: sudo
|
2021-01-08 03:26:32 +00:00
|
|
|
TEST_SSH_UNSAFE_PERMISSIONS: 1
|
2021-02-19 11:15:22 +00:00
|
|
|
- name: save regress logs
|
|
|
|
if: failure()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.os }}-${{ matrix.configs }}-regress-logs
|
2021-02-20 02:06:25 +00:00
|
|
|
path: |
|
|
|
|
regress/*.log
|
|
|
|
regress/valgrind-out/
|