@@ -3,13 +3,15 @@ name: CI
33on : [push, pull_request]
44
55jobs :
6+
7+
68 build :
79 runs-on : ubuntu-20.04
810 container :
911 image : alpine:3.16
1012 strategy :
1113 matrix :
12- model : ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2"]
14+ model : ["TS100", "TS80", "TS80P", "Pinecil", "MHP30", "Pinecilv2", "S60", "TS101" ]
1315 fail-fast : true
1416
1517 steps :
@@ -19,20 +21,21 @@ jobs:
1921 - name : Install dependencies (python)
2022 run : python3 -m pip install bdflib
2123
22- - uses : actions/checkout@v3
24+ - uses : actions/checkout@v4
2325 with :
2426 submodules : true
2527
2628 - name : Git ownership exception
2729 run : git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
2830
29- - name : build ${{ matrix.model }}
31+ - name : Git meta info
32+ run : echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
33+
34+ - name : Build ${{ matrix.model }}
3035 run : cd source && ./build.sh -m ${{ matrix.model }}
3136
32- - name : copy license text
33- run : |
34- cp LICENSE source/Hexfile/LICENSE
35- cp LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
37+ - name : Copy license files
38+ run : cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
3639
3740 - name : Archive ${{ matrix.model }} artifacts
3841 uses : actions/upload-artifact@v3
@@ -47,14 +50,15 @@ jobs:
4750 if-no-files-found : error
4851
4952 - name : Generate json index file
50- run : cd source && python3 metadata.py ${{ matrix.model }}.json
53+ run : ./ source/ metadata.py ${{ matrix.model }}.json
5154
5255 - name : Archive ${{ matrix.model }} index file
5356 uses : actions/upload-artifact@v3
5457 with :
5558 name : metadata
5659 path : source/Hexfile/${{ matrix.model }}.json
5760
61+
5862 build_multi-lang :
5963 runs-on : ubuntu-20.04
6064 container :
@@ -70,20 +74,21 @@ jobs:
7074 - name : Install dependencies (python)
7175 run : python3 -m pip install bdflib
7276
73- - uses : actions/checkout@v3
77+ - uses : actions/checkout@v4
7478 with :
7579 submodules : true
7680
7781 - name : Git ownership exception
7882 run : git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
7983
80- - name : build ${{ matrix.model }}
81- run : cd source && make -j$(nproc) model="${{ matrix.model }}" firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese
84+ - name : Git meta info
85+ run : echo "GITHUB_CI_PR_SHA=${{github.event.pull_request.head.sha}}" >> "${GITHUB_ENV}"
86+
87+ - name : Build ${{ matrix.model }}
88+ run : make -C source/ -j$(nproc) model="${{ matrix.model }}" firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese
8289
83- - name : copy license text
84- run : |
85- cp LICENSE source/Hexfile/LICENSE
86- cp LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
90+ - name : Copy license files
91+ run : cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
8792
8893 - name : Archive ${{ matrix.model }} artifacts
8994 uses : actions/upload-artifact@v3
@@ -98,75 +103,104 @@ jobs:
98103 if-no-files-found : error
99104
100105 - name : Generate json index file
101- run : cd source && python3 metadata.py ${{ matrix.model }}_multi-lang.json
106+ run : ./ source/ metadata.py ${{ matrix.model }}_multi-lang.json
102107
103108 - name : Archive ${{ matrix.model }} index file
104109 uses : actions/upload-artifact@v3
105110 with :
106111 name : metadata
107112 path : source/Hexfile/${{ matrix.model }}_multi-lang.json
108113
114+
109115 tests :
110116 runs-on : ubuntu-20.04
111117 container :
112118 image : alpine:3.16
113119
114120 steps :
115- - name : deps
121+ - name : Install dependencies (apk)
116122 run : apk add --no-cache python3 py3-pip make git bash findutils gcc musl-dev
117123
118- - uses : actions/checkout@v3
124+ - uses : actions/checkout@v4
119125 with :
120126 submodules : true
121127
122- - name : install black
128+ - name : Install dependencies (python)
123129 run : python3 -m pip install bdflib
124130
125131 - name : Run python tests
126- run : cd Translations && chmod +x make_translation_test.py && . /make_translation_test.py
132+ run : ./Translations /make_translation_test.py
127133
128134 - name : Run BriefLZ tests
129- run : |
130- cd source
131- make Objects/host/brieflz/libbrieflz.so
132- cd ../Translations
133- chmod +x brieflz_test.py
134- ./brieflz_test.py
135-
136- check_formatting :
135+ run : make -C source/ Objects/host/brieflz/libbrieflz.so && ./Translations/brieflz_test.py
136+
137+
138+ check_c-cpp :
139+ runs-on : ubuntu-20.04
140+ container :
141+ image : alpine:3.16
142+
143+ steps :
144+ - name : Install dependencies (apk)
145+ run : apk add --no-cache make git diffutils findutils clang-extra-tools bash
146+
147+ - uses : actions/checkout@v4
148+ with :
149+ submodules : true
150+
151+ - name : Check format style with clang-format
152+ run : make clean check-style
153+
154+
155+ check_python :
137156 runs-on : ubuntu-20.04
138157 container :
139158 image : alpine:3.16
140159
141160 steps :
142- - name : deps
161+ - name : Install dependencies (apk)
143162 run : apk add --no-cache python3 py3-pip make git black
144163
145- - uses : actions/checkout@v3
164+ - uses : actions/checkout@v4
146165 with :
147166 submodules : true
148167
149- - name : install black
168+ - name : Install dependencies (python)
150169 run : python3 -m pip install bdflib flake8
151170
152- - name : Check formatting with clang-format
153- run : cd source && make clean && make check-style
154-
155171 - name : Check python formatting with black
156172 run : black --check Translations
157173
158174 - name : Check python with flake8
159175 run : flake8 Translations
160176
161- shellcheck :
162- name : runner / shellcheck
177+
178+ check_shell :
179+ name : check_shell
163180 runs-on : ubuntu-latest
164181 steps :
165- - uses : actions/checkout@v3
182+ - uses : actions/checkout@v4
166183 - name : shellcheck
167184 uses : reviewdog/action-shellcheck@v1
168185 with :
169186 github_token : ${{ secrets.github_token }}
170187 reporter : github-pr-review # Change reporter.
171188 exclude : " ./.git/*" # Optional.
172189 check_all_files_with_shebangs : " false" # Optional.
190+
191+
192+ check_readme :
193+ runs-on : ubuntu-20.04
194+ container :
195+ image : alpine:3.16
196+
197+ steps :
198+ - name : Install dependencies (apk)
199+ run : apk add --no-cache git
200+
201+ - uses : actions/checkout@v4
202+ with :
203+ submodules : true
204+
205+ - name : Check autogenerated Documentation/README.md
206+ run : /bin/sh ./scripts/deploy.sh docs_readme
0 commit comments