Skip to content

Fix handling of prefix type in login CLI #333

Fix handling of prefix type in login CLI

Fix handling of prefix type in login CLI #333

Workflow file for this run

name: c-presubmit
on:
push:
branches: ['master']
pull_request:
branches: ['master']
jobs:
clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: clang-format
run: |
find . '(' -name '*.c' -or -name '*.h' ')' -print0 | \
xargs -0 --verbose -- clang-format --Werror --dry-run
cpplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cpplint
run: pip install cpplint && cpplint --recursive .
test:
runs-on: ubuntu-latest
strategy:
matrix:
container:
- 'debian:stable'
- 'debian:testing'
- 'alpine:latest'
- null
container: ${{ matrix.container }}
steps:
- uses: actions/checkout@v2
- name: install Debian dependencies
if: ${{ startsWith(matrix.container, 'debian:') }}
run: ./kokoro/rodete/fetch_dependencies.sh
- name: install Alpine dependencies
if: ${{ matrix.container == 'alpine:latest' }}
run: ./kokoro/alpine/fetch_dependencies.sh
- uses: cachix/install-nix-action@v17
if: ${{ matrix.container == null }}
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: install Nix dependencies
if: ${{ matrix.container == null }}
run: nix-shell --run 'meson --buildtype=release --werror build && ninja -C build && meson test --print-errorlogs -C build'
- name: setup build directory
if: ${{ matrix.container != null }}
run: meson --werror build
- name: build
if: ${{ matrix.container != null }}
run: ninja -C build
- name: test
if: ${{ matrix.container != null }}
run: meson test --print-errorlogs -C build
- name: install
if: ${{ matrix.container != null }}
run: |
DESTDIR=out meson install -C build
find build/out/
test -x build/out/usr/local/bin/glome
test -x build/out/usr/local/sbin/glome-login
test -f build/out/usr/local/etc/glome/config
test -f build/out/usr/local/include/glome.h
# Dereference the library and check that it points to a valid file.
test -f build/out/usr/local/lib/libglome.so || \
test -f build/out/usr/local/lib/x86_64-linux-gnu/libglome.so
test -f build/out/usr/local/lib/security/pam_glome.so || \
test -f build/out/usr/local/lib/x86_64-linux-gnu/security/pam_glome.so