mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 03:55:04 -05:00
chore(ci): move format and linting jobs to their own workflow
This is done to declutter the main workflow continuous-integration.yml.
This commit is contained in:
43
.github/workflows/continuous-integration.yml
vendored
43
.github/workflows/continuous-integration.yml
vendored
@@ -14,46 +14,9 @@ env:
|
||||
THIS_FILE: .github/workflows/continuous-integration.yml
|
||||
|
||||
jobs:
|
||||
########################
|
||||
# Tests and formating #
|
||||
########################
|
||||
|
||||
FormattingAndLinting:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
- name: Format with clang-format (Cpp)
|
||||
run: sudo apt install moreutils && .github/workflows/scripts/format_cpp.sh
|
||||
- name: Format with cmake-format (Cmake)
|
||||
run: pip3 install cmakelang && .github/workflows/scripts/format_cmake.sh
|
||||
- name: Format with black (Python)
|
||||
run: |
|
||||
cd compiler
|
||||
pip install -r lib/Bindings/Python/requirements_dev.txt
|
||||
make check-python-format
|
||||
- name: Lint with pylint (Python)
|
||||
run: |
|
||||
cd compiler
|
||||
# compiler requirements to lint
|
||||
pip install numpy
|
||||
make python-lint
|
||||
- name: Format with rustfmt (Rust)
|
||||
run: |
|
||||
cd compiler
|
||||
make check-rust-format
|
||||
- name: Linelint
|
||||
uses: fernandrone/linelint@0.0.4
|
||||
id: linelint
|
||||
|
||||
CheckLicense:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check if sources include the license header
|
||||
run: .github/workflows/scripts/check_for_license.sh
|
||||
#####################
|
||||
# Build and testing #
|
||||
#####################
|
||||
|
||||
BuildAndTestMacOS:
|
||||
runs-on: macos-11
|
||||
|
||||
47
.github/workflows/format_and_linting.yml
vendored
Normal file
47
.github/workflows/format_and_linting.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Check format and run linters
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, test-ci]
|
||||
tags:
|
||||
- 'v*'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
jobs:
|
||||
FormattingAndLinting:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
- name: Format with clang-format (Cpp)
|
||||
run: sudo apt install moreutils && .github/workflows/scripts/format_cpp.sh
|
||||
- name: Format with cmake-format (Cmake)
|
||||
run: pip3 install cmakelang && .github/workflows/scripts/format_cmake.sh
|
||||
- name: Format with black (Python)
|
||||
run: |
|
||||
cd compiler
|
||||
pip install -r lib/Bindings/Python/requirements_dev.txt
|
||||
make check-python-format
|
||||
- name: Lint with pylint (Python)
|
||||
run: |
|
||||
cd compiler
|
||||
# compiler requirements to lint
|
||||
pip install numpy
|
||||
make python-lint
|
||||
- name: Format with rustfmt (Rust)
|
||||
run: |
|
||||
cd compiler
|
||||
make check-rust-format
|
||||
- name: Linelint
|
||||
uses: fernandrone/linelint@0.0.4
|
||||
id: linelint
|
||||
|
||||
CheckLicense:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check if sources include the license header
|
||||
run: .github/workflows/scripts/check_for_license.sh
|
||||
Reference in New Issue
Block a user