diff options
Diffstat (limited to '.github')
-rwxr-xr-x | .github/setup_ci.sh | 51 | ||||
-rw-r--r-- | .github/workflows/c-cpp.yml | 38 |
2 files changed, 89 insertions, 0 deletions
diff --git a/.github/setup_ci.sh b/.github/setup_ci.sh new file mode 100755 index 000000000..237721ade --- /dev/null +++ b/.github/setup_ci.sh | |||
@@ -0,0 +1,51 @@ | |||
1 | #!/usr/bin/env bash | ||
2 | |||
3 | TARGETS=$@ | ||
4 | |||
5 | PACKAGES="" | ||
6 | INSTALL_FIDO_PPA="no" | ||
7 | |||
8 | #echo "Setting up for '$TARGETS'" | ||
9 | |||
10 | set -ex | ||
11 | |||
12 | lsb_release -a | ||
13 | |||
14 | for TARGET in $TARGETS; do | ||
15 | case $TARGET in | ||
16 | "") | ||
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 | ||
40 | done | ||
41 | |||
42 | if [ "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 | ||
46 | fi | ||
47 | |||
48 | if [ "x" != "x$PACKAGES" ]; then | ||
49 | sudo apt update -qq | ||
50 | sudo apt install -qy $PACKAGES | ||
51 | fi | ||
diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 000000000..f18f05a8a --- /dev/null +++ b/.github/workflows/c-cpp.yml | |||
@@ -0,0 +1,38 @@ | |||
1 | name: C/C++ CI | ||
2 | |||
3 | on: | ||
4 | push: | ||
5 | branches: [ master, ci ] | ||
6 | pull_request: | ||
7 | branches: [ master ] | ||
8 | |||
9 | jobs: | ||
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 | |||
25 | steps: | ||
26 | - uses: actions/checkout@v2 | ||
27 | - name: setup CI system | ||
28 | run: ./.github/setup_ci.sh ${{ matrix.configs }} | ||
29 | - name: autoreconf | ||
30 | run: autoreconf | ||
31 | - name: configure | ||
32 | run: ./configure ${{ matrix.configs }} | ||
33 | - name: make | ||
34 | run: make | ||
35 | - name: make tests | ||
36 | run: make tests | ||
37 | env: | ||
38 | TEST_SSH_UNSAFE_PERMISSIONS: 1 | ||