2022-10-06 21:21:25 -05:00
|
|
|
name: Code Format
|
|
|
|
|
|
|
|
# Run CI on push, PR, and weekly.
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0 " # weekly
|
|
|
|
|
|
|
|
# Multiple job to tests
|
|
|
|
jobs:
|
|
|
|
change_detect:
|
|
|
|
name: "Check"
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
config:
|
|
|
|
- name: "C/C++"
|
|
|
|
code_type: "-cpp"
|
2022-10-07 12:21:14 -05:00
|
|
|
- name: "XML"
|
|
|
|
code_type: "-xml"
|
2022-10-06 21:21:25 -05:00
|
|
|
steps:
|
|
|
|
- name: Cancel previous
|
|
|
|
uses: styfle/cancel-workflow-action@0.9.1
|
|
|
|
with:
|
|
|
|
access_token: ${{ github.token }}
|
|
|
|
|
2022-10-06 22:49:38 -05:00
|
|
|
- name: Checkout OpenFPGA repo
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
2022-10-06 21:21:25 -05:00
|
|
|
- name: Install dependencies
|
2022-11-04 16:18:30 -05:00
|
|
|
run: sudo bash ./.github/workflows/install_dependencies_build.sh
|
2022-10-06 21:21:25 -05:00
|
|
|
|
|
|
|
- name: Dump tool versions
|
|
|
|
run: |
|
|
|
|
clang-format-10 --version
|
|
|
|
|
|
|
|
- name: Check format
|
|
|
|
run: ./dev/check-format.sh ${{ matrix.config.code_type }}
|