]> eyrie.org Git - kerberos/pam-krb5.git/commitdiff
Fix selection of Kerberos for CI
authorRuss Allbery <eagle@eyrie.org>
Mon, 2 Mar 2020 05:33:21 +0000 (21:33 -0800)
committerRuss Allbery <eagle@eyrie.org>
Mon, 2 Mar 2020 05:34:15 +0000 (21:34 -0800)
Looks like sudo on GitHub Actions doesn't pass environment
variables, so use the KERBEROS environment variable for
ci/test instead.

.github/workflows/build.yaml
ci/install
ci/test

index c953d61a4914d0b829ed076188df9a7c249fb039..21244370a868394b979722abf1cc19bdbaaa14b0 100644 (file)
@@ -32,9 +32,8 @@ jobs:
       - uses: actions/checkout@v2
       - name: install
         run: sudo ci/install
-        env:
-          KERBEROS: ${{ matrix.kerberos }}
       - name: test
         run: ci/test
         env:
           COMPILER: ${{ matrix.compiler }}
+          KERBEROS: ${{ matrix.kerberos }}
index 3c3d04aea14a23ab80771c64c813121baf481072..2d776f86acaa74e9dbea6b9669d9c7e8f4e98d4a 100755 (executable)
@@ -13,12 +13,6 @@ set -eux
 
 # Install packages.
 apt-get update -qq
-apt-get install aspell autoconf automake cppcheck krb5-config \
-        libtest-pod-perl libtest-spelling-perl perl valgrind
-
-# Install the appropriate Kerberos library development package.
-if [ "$KERBEROS" = 'heimdal' ]; then
-    apt-get install heimdal-dev
-else
-    apt-get install libkrb5-dev
-fi
+apt-get install aspell autoconf automake cppcheck heimdal-multidev          \
+        krb5-config libkrb5-dev libtest-pod-perl libtest-spelling-perl perl \
+        valgrind
diff --git a/ci/test b/ci/test
index d8a135dd9c08970a32afe08cbdd8fddfff7069bc..16da68f15d99403ad94068db4cfbf2d9ef28fec2 100755 (executable)
--- a/ci/test
+++ b/ci/test
 
 set -eux
 
-# Normally, COMPILER is set based on the CI matrix, but provide a default in
-# case someone runs this test by hand.
+# 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.  Only use warnings when not building with C++, since the
 # probe for warning flags currently doesn't work properly for g++.
 ./bootstrap
-./configure CC="$COMPILER"
+if [ "$KERBEROS" = 'heimdal' ]; then
+    ./configure CC="$COMPILER" PATH_KRB5_CONFIG=/usr/bin/krb5-config.heimdal
+else
+    ./configure CC="$COMPILER"
+fi
 make warnings
 
 # Run the regular tests with valgrind for one of the builds.  Arbitrarily pick