diff options
author | Russ Allbery <eagle@eyrie.org> | 2020-05-17 17:17:24 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2020-05-17 17:17:24 -0700 |
commit | 27662bbd5b1381e0e2b00e060bdb1c873cb22141 (patch) | |
tree | 3c0d1512e1c77fee62a904b2986bd20f9227e291 /ci | |
parent | c138111a3c27863308b6552a5527a9e821a3dc11 (diff) |
Switch to GitHub Actions for CI
Regenerate the documentation with patched DocKnot 3.04 to pick up
the new status badge, which fixes a few other issues with
documentation generation.
Diffstat (limited to 'ci')
-rw-r--r-- | ci/README | 2 | ||||
-rwxr-xr-x | ci/install | 39 | ||||
-rwxr-xr-x | ci/test | 29 |
3 files changed, 70 insertions, 0 deletions
diff --git a/ci/README b/ci/README new file mode 100644 index 0000000..8b2dde6 --- /dev/null +++ b/ci/README @@ -0,0 +1,2 @@ +The files in this directory are used for CI testing. ci/install installs +the prerequisite packages, and ci/test runs the tests. diff --git a/ci/install b/ci/install new file mode 100755 index 0000000..93fba76 --- /dev/null +++ b/ci/install @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Install packages for integration tests. +# +# This script is normally run via sudo in a test container or VM, such as via +# GitHub Actions. +# +# Perl::Tidy, Perl::Critic, and Test::Perl::Critic are installed separately to +# get the latest version, since they sometimes change formatting and style +# rules compared to the version in Ubuntu. Test::MinimumVersion has to be +# included since it installs Perl::Critic. +# +# Allow the installation of Perl::Critic and Test::Perl::Critic to fail, since +# sometimes the versions on CPAN won't install. (We'll just skip the test if +# it won't install.) +# +# Copyright 2015-2020 Russ Allbery <eagle@eyrie.org> +# +# SPDX-License-Identifier: MIT + +set -eux + +# Install packages. +apt-get update -qq +apt-get install aspell cpanminus cppcheck heimdal-multidev \ + libauthen-sasl-perl libcrypt-generatepassword-perl \ + libdatetime-perl libdatetime-format-sqlite-perl \ + libdbd-sqlite3-perl libdbi-perl libdbix-class-perl \ + libheimdal-kadm5-perl libjson-perl libkrb5-dev libnet-dns-perl \ + libnet-ldap-perl libnet-remctl-perl libperl6-slurp-perl \ + libremctl-dev libsql-translator-perl libtest-pod-perl \ + libtest-spelling-perl libtest-strict-perl libtimedate-perl \ + libwebauth-perl perl sqlite3 valgrind + +# Dependencies for Perl tests. +cpanm Perl::Tidy +cpanm Perl::Critic || true +cpanm Test::MinimumVersion || true +cpanm Test::Perl::Critic || true @@ -0,0 +1,29 @@ +#!/bin/sh +# +# Run tests for continuous integration. +# +# This script is normally run in a test container or VM, such as via GitHub +# Actions. +# +# Copyright 2015-2020 Russ Allbery <eagle@eyrie.org> +# +# SPDX-License-Identifier: MIT + +set -eux + +# Normally, COMPILER and KERBEROS are set based on the CI matrix, but provide +# a default in case someone runs this test by hand. +COMPILER="${COMPILER:-gcc}" +KERBEROS="${KERBEROS:-mit}" + +# Build everything. +./bootstrap +if [ "$KERBEROS" = 'heimdal' ]; then + ./configure CC="$COMPILER" PATH_KRB5_CONFIG=/usr/bin/krb5-config.heimdal +else + ./configure CC="$COMPILER" +fi +make warnings + +# Run the tests. +make check |