-
Notifications
You must be signed in to change notification settings - Fork 3
110 lines (96 loc) · 2.94 KB
/
code-quality.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: Code quality
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pylint:
name: Pylint
runs-on: ubuntu-20.04
container:
image: aswf/ci-vfxall:2022-clang13.1
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r resources/build/linter-requirements.txt
python -m pip install -r tests/requirements.txt
- name: Lint
uses: TheFoundryVisionmongers/[email protected]
with:
pylint-disable: fixme # We track 'todo's through other means
pylint-paths: >
tests
black:
runs-on: ubuntu-latest
name: Python formatting
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r resources/build/linter-requirements.txt
- name: Check Python formatting
run: black tests --check .
build-openassetio:
name: Build OpenAssetIO
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio
build-openassetio-mediacreation:
name: Build OpenAssetIO-MediaCreation
runs-on: ubuntu-latest
container:
image: ghcr.io/openassetio/openassetio-build
steps:
- uses: actions/checkout@v3
- name: Build
uses: ./.github/build_openassetio_mediacreation
cpp-linters:
name: C++ linters
runs-on: ubuntu-20.04
needs: build-openassetio
container:
image: aswf/ci-vfxall:2022-clang13.1
strategy:
matrix:
config:
- os: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
# Configure the system and install library dependencies via
# conan packages.
run: |
python -m pip install -r resources/build/linter-requirements.txt
clang-tidy --version
clang-format --version
cpplint --version
- name: Get OpenAssetIO
uses: actions/download-artifact@v3
with:
name: OpenAssetIO Build
path: ./openassetio-build
- name: Get OpenAssetIO-MediaCreation
uses: actions/download-artifact@v3
with:
name: OpenAssetIO-MediaCreation Build
path: ./openassetio-mediacreation-build
- name: Configure CMake build
run: >
cmake -DCMAKE_PREFIX_PATH="./openassetio-build;./openassetio-mediacreation-build"
-S . -B build -G Ninja
--install-prefix ${{ github.workspace }}/dist
--preset lint
- name: Build and lint
run: |
cmake --build build