Files
mod_tile/.github/workflows/lint.yml
David Hummel 7c4081dc81 Added build & test on Fedora 34
* Takes about 3-5 minutes

**Also:**
* Split up `Lint` and `Build & Test`
  * Into independent workflows
* Changed `.tar` compression to `GZip`
  * `--zstd` not available in `CentOS 7`
  * Also excluded `.git` & `.gitignore`
* Created `Provisioning` local action
  * Combining update & install steps, etc.
* Added libraries to `Ubuntu` build dependencies
  * `libmemcached-dev` & `librados-dev`
  * In order to test for successful compilation
* ~~Reduced `build-archive` retention to 1 day~~
* Updated `ax_pthread` macro
  * While trying to resolve `apxs` failure
  * http://www.gnu.org/software/autoconf-archive/ax_pthread.html
2021-08-02 17:03:19 +02:00

41 lines
1.1 KiB
YAML

---
name: Lint
on:
pull_request:
push:
branches:
- master
- develop
jobs:
astyle:
name: Lint with `astyle`
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Provision environment
uses: ./.github/actions/apt/provision
with:
packages: astyle
- name: Run `astyle`
run: |
astyle \
--options=none --lineend=linux --style=1tbs --indent=force-tab=8 \
--break-blocks --indent-switches --pad-oper --pad-header \
--unpad-paren --suffix=none \
includes/* src/*
- name: Check if any modifications were made by `astyle`
run: |
if [[ -n $(git diff) ]]; then
echo "You must run 'astyle \
--options=none --lineend=linux --style=1tbs --indent=force-tab=8 \
--break-blocks --indent-switches --pad-oper --pad-header \
--unpad-paren --suffix=none \
includes/* src/*' before submitting a pull request"
echo ""
git diff
exit -1
fi