GitHub workflow

Switch from Travis CI to GitHub workflows.
This commit is contained in:
Pier Luigi Fiorini 2020-11-03 08:55:53 +01:00
parent 52eb5e8759
commit e8a2b4268f
3 changed files with 102 additions and 2 deletions

54
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: CI
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
env:
CLAZY_CHECKS: "level1"
jobs:
build:
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
compiler:
- gcc
- clang
container:
#- suse-qt512
- suse-qt515
pam:
- ON
- OFF
runs-on: ubuntu-latest
container:
image: liridev/${{ matrix.container }}
steps:
- uses: actions/checkout@v2
- name: Dependencies
run: |
set -x
zypper --non-interactive install python3-docutils
- name: Build
run: |
set -x
mkdir -p build
cd build
if [ "${{ matrix.compiler }}" == "clang" ]; then
export CC=clang
#export CXX=clang++
export CXX=clazy
fi
cmake .. \
-DBUILD_MAN_PAGES:BOOL=ON \
-DENABLE_PAM:BOOL=${{ matrix.pam }} \
-DLOGIN_DEFS_PATH:path="/usr/etc/login.defs"
make -j $(getconf _NPROCESSORS_ONLN)
sudo make install

47
.github/workflows/checks.yml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Checks
on:
push:
branches:
- master
- develop
tags:
- v*
pull_request:
types:
- opened
- synchronize
- reopened
- edited
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
# No longer works as of 2020-11-03 due to npm 7.0.3 -> 7.0.7
# wip:
# if: "!contains(github.event.head_commit.message, 'ci skip') && github.event_name == 'pull_request'"
# runs-on: ubuntu-latest
# steps:
# - name: Work in progress
# uses: wip/action@master
xdg:
if: "!contains(github.event.head_commit.message, 'ci skip')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Validate XDG files
uses: liri-infra/xdg-validator-action@master
with:
strict: false
qml:
if: "!contains(github.event.head_commit.message, 'ci skip')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Validate QML and JavaScript files
uses: liri-infra/qmllint-action@master

3
.gitignore vendored
View File

@ -1,4 +1,3 @@
*build*
/build/
*~
*.user