-
Notifications
You must be signed in to change notification settings - Fork 2
104 lines (96 loc) · 2.84 KB
/
c-cpp.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
name: C/C++ CI
on:
push:
branches: [ master github_actions_fix ]
pull_request:
branches: [ master ]
schedule:
- cron: '30 4 * * 1'
workflow_dispatch:
# note that I need to manually set the path for the arm-none-eabi-gcc exe
# after it comes out of the cache. I don't understand why I need to do that.
jobs:
build-gcc:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
uses: carlosperate/[email protected]
with:
release: '13.2.Rel1' # The arm-none-eabi-gcc release to use.
- name: make with GCC, debug build, Rev1
run: |
make -k DEBUG=1 REV1=1
- name: make with GCC, debug build, Rev2
run: |
make REV1=1 clean
make -k DEBUG=1 REV2=1
- name: make with GCC, Rev1
run: |
make REV1=1 clean
make -k REV1=1
- name: make with GCC, Rev 2
run: |
make REV1=1 clean
make -k REV2=1
build-clang:
# this build also needs arm-none-eabi-gcc as some of the clang sysroot stuff depends on it.
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4
- name: Install LLVM and Clang
uses: KyleMayes/[email protected]
with:
version: "17.0"
directory: ${{ runner.temp }}/llvm
- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
uses: carlosperate/[email protected]
with:
release: '13.2.Rel1' # The arm-none-eabi-gcc release to use.
# Directory to unpack GCC to. Defaults to a temporary directory.
- name: make with CLANG, Rev 1
run: |
export PATH=${PATH}:$HOME/work/_temp/arm-none-eabi/bin:
make -k COMPILER=clang REV1=1
- name: make with CLANG, Rev 2
run: |
export PATH=${PATH}:$HOME/work/_temp/arm-none-eabi/bin:
make -k COMPILER=clang REV1=1 clean
make -k COMPILER=clang REV2=1
clang-format:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
with:
files_ignore: |
**/*.yml
**/*.py
**/*.xml
**/*.ipynb
.clang*
.git*
**/*.sh
**/*.def
**/Makefile
makedefs
**/*.md
**/*.txt
**/.pylintrc
**/.gitignore
**/.git*
**/LICENSE
- name: Format changed files
if: steps.changed-files.outputs.any_changed == 'true'
uses: DoozyX/[email protected]
with:
source: ${{ steps.changed-files.outputs.all_changed_files }}
extensions: 'h,c'
clangFormatVersion: 17
inplace: false
style: file