summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2020-10-20 14:12:31 +0100
committerColin Watson <cjwatson@debian.org>2020-10-20 14:12:31 +0100
commite371906fbbbbc11b0dced8fd4e0d258eb489d7c1 (patch)
tree4d0d8d2afd52572deb7910e29ff5a334b2bcf702 /.github
parente429009cde648a41479cd1b60ce972760a2bdabc (diff)
parent3728919292c05983372954d27426f7d966813139 (diff)
New upstream release (8.4p1)
Diffstat (limited to '.github')
-rwxr-xr-x.github/run_test.sh34
-rwxr-xr-x.github/setup_ci.sh51
-rw-r--r--.github/workflows/c-cpp.yml39
3 files changed, 124 insertions, 0 deletions
diff --git a/.github/run_test.sh b/.github/run_test.sh
new file mode 100755
index 000000000..93c3a5e9e
--- /dev/null
+++ b/.github/run_test.sh
@@ -0,0 +1,34 @@
1#!/usr/bin/env bash
2
3TARGETS=$@
4
5TEST_TARGET="tests"
6LTESTS="" # all tests by default
7
8set -ex
9
10for TARGET in $TARGETS; do
11 case $TARGET in
12 --without-openssl)
13 # When built without OpenSSL we can't do the file-based RSA key tests.
14 TEST_TARGET=t-exec
15 ;;
16 esac
17done
18
19if [ -z "$LTESTS" ]; then
20 make $TEST_TARGET
21 result=$?
22else
23 make $TEST_TARGET LTESTS="$LTESTS"
24 result=$?
25fi
26
27if [ "$result" -ne "0" ]; then
28 for i in regress/failed*; do
29 echo -------------------------------------------------------------------------
30 echo LOGFILE $i
31 cat $i
32 echo -------------------------------------------------------------------------
33 done
34fi
diff --git a/.github/setup_ci.sh b/.github/setup_ci.sh
new file mode 100755
index 000000000..e2474ccd7
--- /dev/null
+++ b/.github/setup_ci.sh
@@ -0,0 +1,51 @@
1#!/usr/bin/env bash
2
3TARGETS=$@
4
5PACKAGES=""
6INSTALL_FIDO_PPA="no"
7
8#echo "Setting up for '$TARGETS'"
9
10set -ex
11
12lsb_release -a
13
14for TARGET in $TARGETS; do
15 case $TARGET in
16 ""|--without-openssl|--without-zlib)
17 # nothing to do
18 ;;
19 "--with-kerberos5")
20 PACKAGES="$PACKAGES heimdal-dev"
21 #PACKAGES="$PACKAGES libkrb5-dev"
22 ;;
23 "--with-libedit")
24 PACKAGES="$PACKAGES libedit-dev"
25 ;;
26 "--with-pam")
27 PACKAGES="$PACKAGES libpam0g-dev"
28 ;;
29 "--with-security-key-builtin")
30 INSTALL_FIDO_PPA="yes"
31 PACKAGES="$PACKAGES libfido2-dev libu2f-host-dev"
32 ;;
33 "--with-selinux")
34 PACKAGES="$PACKAGES libselinux1-dev selinux-policy-dev"
35 ;;
36 *) echo "Invalid option"
37 exit 1
38 ;;
39 esac
40done
41
42if [ "yes" == "$INSTALL_FIDO_PPA" ]; then
43 sudo apt update -qq
44 sudo apt install software-properties-common
45 sudo apt-add-repository ppa:yubico/stable
46fi
47
48if [ "x" != "x$PACKAGES" ]; then
49 sudo apt update -qq
50 sudo apt install -qy $PACKAGES
51fi
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml
new file mode 100644
index 000000000..2189756bb
--- /dev/null
+++ b/.github/workflows/c-cpp.yml
@@ -0,0 +1,39 @@
1name: C/C++ CI
2
3on:
4 push:
5 branches: [ master, ci ]
6 pull_request:
7 branches: [ master ]
8
9jobs:
10 build:
11
12 runs-on: ubuntu-latest
13
14 strategy:
15 matrix:
16 configs:
17 - ""
18 - "--with-kerberos5"
19 - "--with-libedit"
20 - "--with-pam"
21 - "--with-security-key-builtin"
22 - "--with-selinux"
23 - "--with-kerberos5 --with-libedit --with-pam --with-security-key-builtin --with-selinux"
24 - "--without-openssl --without-zlib"
25
26 steps:
27 - uses: actions/checkout@v2
28 - name: setup CI system
29 run: ./.github/setup_ci.sh ${{ matrix.configs }}
30 - name: autoreconf
31 run: autoreconf
32 - name: configure
33 run: ./configure ${{ matrix.configs }}
34 - name: make
35 run: make
36 - name: make tests
37 run: ./.github/run_test.sh ${{ matrix.configs }}
38 env:
39 TEST_SSH_UNSAFE_PERMISSIONS: 1