[ci] move CI to github, remove hardcoded flags #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: style-checks | |
on: [pull_request] | |
jobs: | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: retrieve merge target info | |
run: git fetch origin $GITHUB_BASE_REF | |
- run: sudo apt-get update | |
- run: sudo apt-get install -y clang-format-12 | |
- name: run git-clang-format | |
run: | | |
target=$(git rev-parse origin/$GITHUB_BASE_REF) | |
git-clang-format-12 --quiet --diff $target > clang-format-diff | |
lint=$(grep -v --color=never "no modified files to format" clang-format-diff || true) | |
if [ ! -z "$lint" ]; then echo "format errors, inspect the clang-format-diff artifact for info"; exit 1; else exit 0; fi | |
shell: bash | |
- name: output clang format diff | |
if: always() | |
run: cat ./clang-format-diff | |
license-check: | |
runs-on: ubuntu-latest | |
container: apache/skywalking-eyes | |
steps: | |
- uses: actions/checkout@v2 | |
- run: /bin/license-eye -c .licenserc.yml -v debug header check |