OpenFPGA/.github/workflows/format.yaml

57 lines
1.4 KiB
YAML
Raw Normal View History

name: Code Format
# Run CI on push, PR, and weekly.
on:
workflow_dispatch:
pull_request:
push:
branches:
- 'master'
schedule:
- cron: "0 0 * * 0 " # weekly
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Multiple job to tests
jobs:
change_detect:
name: "Check"
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
config:
- name: "C/C++"
code_type: "-cpp"
dependency_version: "ubuntu22p04"
- name: "XML"
code_type: "-xml"
dependency_version: "ubuntu22p04"
2022-11-21 16:21:14 -06:00
- name: "Python"
code_type: "-py"
dependency_version: "ubuntu22p04"
steps:
- name: Cancel previous
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
2022-10-06 22:49:38 -05:00
- name: Checkout OpenFPGA repo
uses: actions/checkout@v2
- name: Install dependencies
2022-11-21 16:21:14 -06:00
run: |
sudo bash ./.github/workflows/install_dependencies_build_${{ matrix.config.dependency_version }}.sh
2022-11-21 16:21:14 -06:00
sudo python3 -m pip install -r requirements.txt
- name: Dump tool versions
run: |
clang-format-14 --version
2022-11-21 16:21:14 -06:00
black --version
- name: Check format
run: ./dev/check-format.sh ${{ matrix.config.code_type }}