Refactor github workflows; add preprocess test
This commit refactors the github workflows into two file (push/pull request), makes use of the new central seL4 github actions, and adds the preprocess test for pull requests. Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
This commit is contained in:
parent
cf1428630e
commit
ab5b6bd6bf
4 changed files with 55 additions and 90 deletions
39
.github/workflows/git.yaml
vendored
39
.github/workflows/git.yaml
vendored
|
|
@ -1,39 +0,0 @@
|
|||
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
name: Git
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
gitlint:
|
||||
name: Gitlint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- run: |
|
||||
git fetch --depth 1 --no-tags origin +refs/heads/${{ github.base_ref }}:refs/heads/${{ github.base_ref }}
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: seL4/sel4_tools
|
||||
path: sel4_tools
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.7'
|
||||
- name: Install gitlint
|
||||
run: pip install gitlint
|
||||
- name: Run gitlint
|
||||
run: gitlint --commits ${{ github.base_ref }}..${{ github.event.pull_request.head.sha }} --config sel4_tools/misc/.gitlint lint
|
||||
|
||||
whitespace:
|
||||
name: Trailing Whitespace
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: |
|
||||
git fetch --depth 1 --no-tags origin +refs/heads/${{ github.base_ref }}:refs/heads/${{ github.base_ref }}
|
||||
- name: Check
|
||||
run: git diff --check ${{ github.base_ref }}
|
||||
46
.github/workflows/pr.yml
vendored
Normal file
46
.github/workflows/pr.yml
vendored
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
# Actions to run on pull requests
|
||||
|
||||
name: PR
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
gitlint:
|
||||
name: Gitlint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: seL4/ci-actions/gitlint@master
|
||||
|
||||
whitespace:
|
||||
name: 'Trailing Whitespace'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: seL4/ci-actions/git-diff-check@master
|
||||
|
||||
shell:
|
||||
name: 'Portable Shell'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: seL4/ci-actions/bashisms@master
|
||||
|
||||
style:
|
||||
name: Style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: seL4/ci-actions/style@master
|
||||
|
||||
preprocess:
|
||||
name: Preprocess
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
arch: [ARM, ARM_HYP, RISCV64, X64]
|
||||
steps:
|
||||
- uses: seL4/ci-actions/preprocess@master
|
||||
with:
|
||||
L4V_ARCH: ${{ matrix.arch }}
|
||||
|
|
@ -2,7 +2,8 @@
|
|||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
name: License
|
||||
# Actions to run on Push and Pull Request
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
@ -15,6 +16,10 @@ jobs:
|
|||
name: License Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Check
|
||||
uses: fsfe/reuse-action@master
|
||||
- uses: seL4/ci-actions/license-check@master
|
||||
|
||||
links:
|
||||
name: Links
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: seL4/ci-actions/link-check@master
|
||||
47
.github/workflows/style.yaml
vendored
47
.github/workflows/style.yaml
vendored
|
|
@ -1,47 +0,0 @@
|
|||
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
|
||||
#
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
name: Style
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
style:
|
||||
name: Check Style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: seL4/sel4_tools
|
||||
path: sel4_tools
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.7'
|
||||
- name: Install python packages
|
||||
run: pip install sel4-deps
|
||||
- name: Install astyle
|
||||
run: sudo apt-get install astyle
|
||||
- name: Run style check
|
||||
run: |
|
||||
sel4_tools/misc/style.sh ${{ env.GIT_DIFF }}
|
||||
[ -z "$(git status -uno --porcelain)" ] || (git diff; exit 1)
|
||||
|
||||
shell:
|
||||
name: Check shell scripts
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: technote-space/get-diff-action@v1
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
repository: seL4/sel4_tools
|
||||
path: sel4_tools
|
||||
- name: Install
|
||||
run: sudo apt-get install devscripts
|
||||
- name: Run shell script check
|
||||
run: |
|
||||
sel4_tools/misc/is-valid-shell-script ${{ env.GIT_DIFF }}
|
||||
Loading…
Reference in a new issue