Skip to content

Commit

Permalink
github: setup some basic GH actions
Browse files Browse the repository at this point in the history
This should mirror what we do with Travis CI.

Signed-off-by: Paul Moore <paul@paul-moore.com>
  • Loading branch information
pcmoore committed Dec 30, 2021
1 parent c7d5d0e commit 953407f
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Github Action to setup the audit-testsuite
#
# Copyright (c) 2021 Microsoft Corporation <paulmoore@microsoft.com>
# Author: Paul Moore <paul@paul-moore.com>
#

name: Setup the audit-testsuite
description: "Install CI dependencies for the audit-testsuite"
runs:
using: "composite"
steps:
- run: sudo apt-get install -y build-essential gcc-multilib python3-pip
shell: bash
- run: sudo apt-get install -y astyle
shell: bash
- run: |
# NOTE: the distro package isn't current enough (ubuntu-20.04)
git clone https://github.com/perltidy/perltidy.git perltidy
cd perltidy
perl Makefile.PL
make
sudo make install
echo "/usr/local/bin" >> $GITHUB_PATH
shell: bash
- run: |
# NOTE: the distro package isn't current enough (ubuntu-20.04)
sudo python3 -m pip install --upgrade pip
sudo python3 -m pip install yapf
echo "$HOME/.local/bin" >> $GITHUB_PATH
shell: bash
31 changes: 31 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Github CI Action for the audit-testsuite
#
# Copyright (c) 2021 Microsoft Corporation <paulmoore@microsoft.com>
# Author: Paul Moore <paul@paul-moore.com>
#

name: Continuous Integration
on: ["push", "pull_request"]

jobs:
syntax:
name: Check Syntax
runs-on: ubuntu-20.04
steps:
- name: Checkout from GitHub
uses: actions/checkout@v2
- name: Setup
uses: ./.github/actions/setup
- name: Syntax Checker
run: ./tools/check-syntax -f && git diff --exit-code
build:
name: Build Tests
runs-on: ubuntu-20.04
steps:
- name: Checkout from GitHub
uses: actions/checkout@v2
- name: Setup
uses: ./.github/actions/setup
- name: Build
run: make
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Basic Audit Regression Test Suite for the Linux Kernel
===============================================================================
https://github.com/linux-audit/audit-testsuite

[![Build Status](https://img.shields.io/travis/linux-audit/audit-testsuite/master.svg)](https://travis-ci.org/linux-audit/audit-testsuite)
[![Build Status](https://github.com/linux-audit/audit-testsuite/workflows/Continuous%20Integration/badge.svg?branch=main)](https://github.com/linux-audit/audit-testsuite/actions)

The audit-testsuite project provides a simple, self-contained regression test
suite for the Linux Kernel's audit subsystem.
Expand Down

0 comments on commit 953407f

Please sign in to comment.