forked from FreeRTOS/FreeRTOS
-
Notifications
You must be signed in to change notification settings - Fork 1
174 lines (157 loc) · 5.86 KB
/
ci.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: CI Checks
env:
bashPass: \033[32;1mPASSED -
bashWarn: \033[33;1mWARNING -
bashFail: \033[31;1mFAILED -
bashEnd: \033[0m
on:
push:
pull_request:
workflow_dispatch:
jobs:
git-secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout awslabs/git-secrets
uses: actions/checkout@v3
with:
repository: awslabs/git-secrets
ref: master
path: git-secrets
- name: Install git-secrets
run: cd git-secrets && sudo make install && cd ..
- name: Run git-secrets
run: |
git-secrets --register-aws
git-secrets --scan
formatting:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Check Formatting of Common Demo Files
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
with:
path: FreeRTOS/Demo/Common
exclude-dirs: ethernet, drivers
- name: Check Formatting
uses: FreeRTOS/CI-CD-Github-Actions/formatting@main
with:
exclude-dirs: ethernet, drivers, FreeRTOS/Demo
spell-check:
runs-on: ubuntu-latest
steps:
- name: Checkout Parent Repo
uses: actions/checkout@v3
- name: Check Spelling of Common Demo Files
uses: FreeRTOS/CI-CD-GitHub-Actions/spellings@main
with:
path: FreeRTOS/Demo/Common
exclude-dirs: ethernet, drivers
- name: Check Spelling
uses: FreeRTOS/CI-CD-GitHub-Actions/spellings@main
with:
exclude-dirs: ethernet, drivers, FreeRTOS/Demo
doxygen:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v3
with:
submodules: recursive
path: freertos
- name: Install Python3
uses: actions/setup-python@v3
- name: Download tag dependency of coreMQTT-Agent
run: |
# We don't need to generate the coreMQTT docs, we only need the tag file.
# Therefore, we can just download it.
mkdir -p freertos/FreeRTOS-Plus/Source/Application-Protocols/coreMQTT-Agent/source/dependency/coreMQTT/docs/doxygen/output
wget -O freertos/FreeRTOS-Plus/Source/Application-Protocols/coreMQTT-Agent/source/dependency/coreMQTT/docs/doxygen/output/mqtt.tag \
"https://freertos.org/Documentation/api-ref/coreMQTT/docs/doxygen/output/mqtt.tag"
- name: Generate doxygen ZIP
uses: FreeRTOS/CI-CD-Github-Actions/doxygen@main
with:
path: ./freertos
# List of directories containing libraries whose doxygen output will be generated.
libs_parent_dir_path: FreeRTOS-Plus/Source,FreeRTOS-Plus/Source/AWS,FreeRTOS-Plus/Source/Application-Protocols,FreeRTOS-Plus/Source/Utilities
generate_zip: true
- name: Upload doxygen artifact if main branch
if: success() && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-candidate' )
env:
GIT_SHA:
uses: actions/upload-artifact@v2
with:
name: doxygen.zip-${{ github.sha }}
path: ./freertos/doxygen.zip
retention-days: 2
verify-manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
- name: Run manifest verifier
uses: FreeRTOS/CI-CD-GitHub-Actions/manifest-verifier@v2
with:
path: ./
fail-on-incorrect-version: true
memory-statistics:
runs-on: ubuntu-latest
env:
ARM_GCC_TOOLCHAIN_URL: "https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2?revision=05382cca-1721-44e1-ae19-1e7c3dc96118&la=en&hash=D7C9D18FCA2DD9F894FD9F3C3DC9228498FA281A"
steps:
- name: Install ARM GCC
run:
wget -qO- "${{ env.ARM_GCC_TOOLCHAIN_URL }}" | sudo tar
--strip-components=1 -xj -C /usr/local
- name: Clone FreeRTOS Repository with submodules
uses: actions/checkout@v3
with:
submodules: recursive
- name: Clone mbedTLS submodule from corePKCS11
run:
git submodule update --init --recursive --checkout --
FreeRTOS-Plus/Source/corePKCS11
- name: Clone CI-CD-Github-Actions repository
uses: actions/checkout@v3
with:
repository: FreeRTOS/CI-CD-GitHub-Actions
path: tools
- name: Run script to generate JSON memory statistics
run:
tools/memory_statistics/memory_statistics.py --json_report
--config tools/memory_statistics/paths.json --output
freertos_lts_memory_estimates.json
- name:
Upload memory size report as artifact (for main and
release-candidate ONLY)
if: success() && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-candidate' )
uses: actions/upload-artifact@v2
with:
name: freertos-memory-estimates
path: ./freertos_lts_memory_estimates.json
retention-days: 2
proof_ci:
if: ${{ github.event.pull_request }}
runs-on: cbmc_ubuntu-latest_16-core
steps:
- uses: actions/checkout@v3
- env:
stepName: Install Dependencies
run: |
echo -e "::group::${{ env.stepName }}"
git submodule update --init --checkout --recursive --depth 1
sudo apt-get update
sudo apt-get install --yes --no-install-recommends gcc-multilib
echo -e "::endgroup::"
echo -e "${{ env.bashPass }} ${{env.stepName}} ${{ env.bashEnd }}"
- name: Set up CBMC runner
uses: FreeRTOS/CI-CD-Github-Actions/set_up_cbmc_runner@main
- name: Run CBMC
uses: FreeRTOS/CI-CD-Github-Actions/run_cbmc@main
with:
proofs_dir: FreeRTOS/Test/CBMC/proofs