Skip to content

Commit 01d6b89

Browse files
authored
chore: workflows to ubuntu latest (#827)
* chore: workflows to ubuntu latest * this went away i guess * this is lots easier with hatch * no time for this * or this * broken * i shall not be constrained * wrong spelling * these perchance * not that one tho * read all about it * try THIS * just separate lint and compile im out of patience
1 parent b2bd50c commit 01d6b89

File tree

10 files changed

+183
-160
lines changed

10 files changed

+183
-160
lines changed

.clang-tidy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
Checks: '-*,clang-analyzer-*,bugprone-*,-bugprone-branch-clone,cppcoreguidelines-*,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,misc-*,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,modernize-*,readability-*,-readability-magic-numbers,performance-*,-performance-no-int-to-ptr,-readability-named-parameter,-readability-static-accessed-through-instance'
2+
Checks: '-*,clang-analyzer-*,bugprone-*,-bugprone-branch-clone,cppcoreguidelines-*,-cppcoreguidelines-non-private-member-variables-in-classes,-cppcoreguidelines-avoid-magic-numbers,-cppcoreguidelines-avoid-non-const-global-variables,misc-*,-misc-non-private-member-variables-in-classes,-misc-unused-parameters,modernize-*,readability-*,-readability-magic-numbers,performance-*,-performance-no-int-to-ptr,-readability-named-parameter,-readability-static-accessed-through-instance,-misc-include-cleaner,-bugprone-easily-swappable-parameters,-clang-diagnostic-unused-command-line-argument,-modernize-use-constraints'
33
WarningsAsErrors: '*'
44
HeaderFilterRegex: '.*/.*hpp'
5-
AnalyzeTemporaryDtors: false
65
FormatStyle: none
76
CheckOptions:
87
- key: bugprone-argument-comment.CommentBoolLiterals

.github/workflows/build-simulators.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
pipettes-96,
3030
]
3131
name: ${{ matrix.target }} simulator
32-
runs-on: "ubuntu-20.04"
32+
runs-on: "ubuntu-latest"
3333
timeout-minutes: 10
3434
steps:
3535
- name: Checkout ot3-firmware repo

.github/workflows/build-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ defaults:
1717
jobs:
1818
build-and-test:
1919
name: Run all tests
20-
runs-on: "ubuntu-20.04"
20+
runs-on: "ubuntu-latest"
2121
timeout-minutes: 20
2222
steps:
2323
- name: Checkout ot3-firmware repo

.github/workflows/codecov.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ concurrency:
2121
jobs:
2222
generate-coverage:
2323
name: 'Generate-Coverage'
24-
runs-on: 'ubuntu-20.04'
24+
runs-on: 'ubuntu-latest'
2525
timeout-minutes: 10
2626
steps:
2727
- name: Checkout ot3-firmware repo
Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "cross-compile/format/lint all targets"
1+
name: "cross-compile all targets"
22
on:
33
push:
44
branches:
@@ -16,7 +16,7 @@ defaults:
1616

1717
jobs:
1818
build-cross:
19-
runs-on: "ubuntu-20.04"
19+
runs-on: "ubuntu-latest"
2020
timeout-minutes: 20
2121
strategy:
2222
matrix:
@@ -57,72 +57,3 @@ jobs:
5757

5858
- name: Build all STM32G4 applications
5959
run: cmake --build --preset=${{ matrix.target }} --target ${{ matrix.target }}-images ${{ matrix.target }}-applications
60-
61-
format:
62-
runs-on: "ubuntu-20.04"
63-
timeout-minutes: 20
64-
name: Formatting
65-
steps:
66-
- name: Checkout ot3-firmware repo
67-
uses: actions/checkout@v4
68-
with:
69-
path: ot3-firmware
70-
71-
- name: Checkout github actions directory
72-
uses: actions/checkout@v4
73-
with:
74-
sparse-checkout: |
75-
.github/actions
76-
sparse-checkout-cone-mode: false
77-
path: actions
78-
79-
- name: Setup main
80-
uses: ./actions/.github/actions/main-setup
81-
with:
82-
cache-version: ${{ secrets.CACHE_VERSION }}
83-
84-
- name: Configure
85-
run: cmake --preset=cross .
86-
87-
- name: Format
88-
run: cmake --build ./build-cross --target format-ci
89-
90-
lint:
91-
runs-on: "ubuntu-20.04"
92-
timeout-minutes: 20
93-
name: ${{ matrix.target }} lint
94-
strategy:
95-
matrix:
96-
target: [
97-
bootloader,
98-
gantry,
99-
gripper,
100-
head,
101-
hepa-uv,
102-
pipettes,
103-
rear-panel
104-
]
105-
steps:
106-
- name: Checkout ot3-firmware repo
107-
uses: actions/checkout@v4
108-
with:
109-
path: ot3-firmware
110-
111-
- name: Checkout github actions directory
112-
uses: actions/checkout@v4
113-
with:
114-
sparse-checkout: |
115-
.github/actions
116-
sparse-checkout-cone-mode: false
117-
path: actions
118-
119-
- name: Setup main
120-
uses: ./actions/.github/actions/main-setup
121-
with:
122-
cache-version: ${{ secrets.CACHE_VERSION }}
123-
124-
- name: Configure
125-
run: cmake --preset=cross .
126-
127-
- name: Format
128-
run: cmake --build ./build-cross --target ${{ matrix.target }}-lint

.github/workflows/format-lint.yaml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: "format/lint all targets"
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
workflow_dispatch:
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref_name }}
10+
cancel-in-progress: true
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
working-directory: ot3-firmware
16+
17+
jobs:
18+
format:
19+
runs-on: "ubuntu-latest"
20+
timeout-minutes: 20
21+
name: Formatting
22+
steps:
23+
- name: Checkout ot3-firmware repo
24+
uses: actions/checkout@v4
25+
with:
26+
path: ot3-firmware
27+
28+
- name: Checkout github actions directory
29+
uses: actions/checkout@v4
30+
with:
31+
sparse-checkout: |
32+
.github/actions
33+
sparse-checkout-cone-mode: false
34+
path: actions
35+
36+
- name: Setup main
37+
uses: ./actions/.github/actions/main-setup
38+
with:
39+
cache-version: ${{ secrets.CACHE_VERSION }}
40+
41+
- name: Configure
42+
run: cmake --preset=cross .
43+
44+
- name: Format
45+
run: cmake --build ./build-cross --target format-ci
46+
47+
lint:
48+
runs-on: "ubuntu-latest"
49+
timeout-minutes: 20
50+
name: ${{ matrix.target }} lint
51+
strategy:
52+
matrix:
53+
target: [
54+
bootloader,
55+
gantry,
56+
gripper,
57+
head,
58+
hepa-uv,
59+
pipettes,
60+
rear-panel
61+
]
62+
steps:
63+
- name: Checkout ot3-firmware repo
64+
uses: actions/checkout@v4
65+
with:
66+
path: ot3-firmware
67+
68+
- name: Checkout github actions directory
69+
uses: actions/checkout@v4
70+
with:
71+
sparse-checkout: |
72+
.github/actions
73+
sparse-checkout-cone-mode: false
74+
path: actions
75+
76+
- name: Setup main
77+
uses: ./actions/.github/actions/main-setup
78+
with:
79+
cache-version: ${{ secrets.CACHE_VERSION }}
80+
81+
- name: Configure
82+
run: cmake --preset=cross .
83+
84+
- name: Format
85+
run: cmake --build ./build-cross --target ${{ matrix.target }}-lint

.github/workflows/run_emulation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010

1111
jobs:
1212
ot3-emulator:
13-
runs-on: "ubuntu-20.04"
13+
runs-on: "ubuntu-latest"
1414
name: OT-3 Emulator
1515
steps:
1616

common/cmake/ClangTidy.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ macro(add_clang_tidy_target)
6161
list(TRANSFORM _actt_clang_extra_args_${_actt_TARGET_NAME} PREPEND --extra-arg=-I)
6262
# This helps with clang accepting what GCC accepts around the implementations of the message queue
6363
list(APPEND _actt_clang_extra_args_${_actt_TARGET_NAME} "--extra-arg=-frelaxed-template-template-args")
64+
# This helps with modern clang-tidy not liking the gcc specs setting for cross builds
65+
list(APPEND _actt_clang_extra_args_${_actt_TARGET_NAME} "--extra-arg=-Wno-error=unused-command-line-argument")
66+
list(APPEND _actt_clang_extra_args_${_actt_TARGET_NAME} "--extra-arg=-Qunused-arguments")
67+
list(APPEND _actt_clang_extra_args_${_actt_TARGET_NAME} "--extra-arg=-Wno-unused-command-line-argument")
6468
add_custom_target(${_actt_TARGET_NAME}
6569
ALL
6670
COMMAND ${Clang_CLANGTIDY_EXECUTABLE} "--extra-arg=-DOPENTRONS_CLANG_TIDY_WORKAROUND_44178" ${_actt_clang_extra_args_${_actt_TARGET_NAME}} -p ${CMAKE_BINARY_DIR} ${_actt_LINT_SOURCES})

0 commit comments

Comments
 (0)