1
0
forked from me/IronOS

Simplify commands for jobs in push.yml (#1761)

* Simplify commands for build steps

* Fixing multi-lang builds for Pinecil & PinecilV2

* Makefile: fix multi-thread building support

* source/Makefile: fix formatting

---------

Co-authored-by: Ben V. Brown <5425387+Ralim@users.noreply.github.com>
This commit is contained in:
Ivan Zorin
2023-07-28 12:45:22 +03:00
committed by GitHub
parent 65ac2e25a6
commit 55d36c98f1
3 changed files with 22 additions and 31 deletions

View File

@@ -30,9 +30,7 @@ jobs:
run: cd source && ./build.sh -m ${{ matrix.model }}
- name: Copy license files
run: |
cp LICENSE source/Hexfile/LICENSE
cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
run: cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -47,7 +45,7 @@ jobs:
if-no-files-found: error
- name: Generate json index file
run: cd source && python3 metadata.py ${{ matrix.model }}.json
run: ./source/metadata.py ${{ matrix.model }}.json
- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
@@ -79,12 +77,10 @@ jobs:
run: git config --global --add safe.directory /__w/IronOS/IronOS && git config --global safe.directory "$GITHUB_WORKSPACE"
- name: Build ${{ matrix.model }}
run: cd source && make -j$(nproc) model="${{ matrix.model }}" firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese
run: make -j$(nproc) model="${{ matrix.model }}" firmware-multi_compressed_European firmware-multi_compressed_Bulgarian+Russian+Serbian+Ukrainian firmware-multi_Chinese+Japanese
- name: Copy license files
run: |
cp LICENSE source/Hexfile/LICENSE
cp scripts/LICENSE_RELEASE.md source/Hexfile/LICENSE_RELEASE.md
run: cp LICENSE scripts/LICENSE_RELEASE.md source/Hexfile/
- name: Archive ${{ matrix.model }} artifacts
uses: actions/upload-artifact@v3
@@ -99,7 +95,7 @@ jobs:
if-no-files-found: error
- name: Generate json index file
run: cd source && python3 metadata.py ${{ matrix.model }}_multi-lang.json
run: ./source/metadata.py ${{ matrix.model }}_multi-lang.json
- name: Archive ${{ matrix.model }} index file
uses: actions/upload-artifact@v3
@@ -125,15 +121,10 @@ jobs:
run: python3 -m pip install bdflib
- name: Run python tests
run: cd Translations && chmod +x make_translation_test.py && ./make_translation_test.py
run: ./Translations/make_translation_test.py
- name: Run BriefLZ tests
run: |
cd source
make Objects/host/brieflz/libbrieflz.so
cd ../Translations
chmod +x brieflz_test.py
./brieflz_test.py
run: make -C source/ Objects/host/brieflz/libbrieflz.so && ./Translations/brieflz_test.py
check_c-cpp:
@@ -150,7 +141,7 @@ jobs:
submodules: true
- name: Check format style with clang-format
run: cd source && make clean && make check-style
run: make clean check-style
check_python:

View File

@@ -140,7 +140,7 @@ test-py:
@echo ""
flake8 Translations
black --check Translations
@make -C source/ Objects/host/brieflz/libbrieflz.so
@$(MAKE) -C source/ Objects/host/brieflz/libbrieflz.so
./Translations/brieflz_test.py
./Translations/make_translation_test.py
@@ -149,7 +149,7 @@ test-ccpp:
@echo ""
@echo "---- Checking C/C++ code... ----"
@echo ""
make -C source/ clean check-style
$(MAKE) -C source/ clean check-style
# meta target for tests & checks based on .github/workflows/push
tests: test-md test-sh test-py test-ccpp
@@ -159,11 +159,11 @@ tests: test-md test-sh test-py test-ccpp
# pass-through target for Makefile inside source/ dir
%:
make -C source/ $@
$(MAKE) -C source/ $@
# global clean-up target for produced/generated files inside tree
clean-build:
make -C source/ clean-all
$(MAKE) -C source/ clean-all
rm -Rf site
rm -Rf scripts/ci/artefacts

View File

@@ -763,15 +763,15 @@ Core/Gen/Translation_brieflz.%.cpp: $(OUTPUT_DIR)/Core/Gen/translation.files/%.o
@test -d $(@D) || mkdir -p $(@D)
@echo Generating BriefLZ compressed translation for $*
@OBJCOPY=$(OBJCOPY) $(HOST_PYTHON) ../Translations/make_translation.py \
--macros $(PWD)/Core/Gen/macros.txt \
-o $(PWD)/Core/Gen/Translation_brieflz.$*.cpp \
--macros $(CURDIR)/Core/Gen/macros.txt \
-o $(CURDIR)/Core/Gen/Translation_brieflz.$*.cpp \
--input-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/$*.pickle \
--strings-obj $(OUTPUT_DIR)/Core/Gen/translation.files/$*.o \
$*
Core/Gen/Translation_brieflz_font.%.cpp: $(OUTPUT_DIR)/Core/Gen/translation.files/%.pickle $(HOST_OUTPUT_DIR)/brieflz/libbrieflz.so Core/Gen/macros.txt
@test -d $(@D) || mkdir -p $(@D)
@echo Generating BriefLZ compressed translation for $*
@echo Generating BriefLZ compressed translation font for $*
@$(HOST_PYTHON) ../Translations/make_translation.py \
--macros $(PWD)/Core/Gen/macros.txt \
-o $(PWD)/Core/Gen/Translation_brieflz_font.$*.cpp \
@@ -818,8 +818,8 @@ Core/Gen/Translation_multi.$(1).cpp: $(patsubst %,../Translations/translation_%.
@test -d $(OUTPUT_DIR)/Core/Gen/translation.files || mkdir -p $(OUTPUT_DIR)/Core/Gen/translation.files
@echo 'Generating translations for multi-language $(2)'
@$(HOST_PYTHON) ../Translations/make_translation.py \
--macros $(PWD)/Core/Gen/macros.txt \
-o $(PWD)/Core/Gen/Translation_multi.$(1).cpp \
--macros $(CURDIR)/Core/Gen/macros.txt \
-o $(CURDIR)/Core/Gen/Translation_multi.$(1).cpp \
--output-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle \
$(3)
@@ -829,8 +829,8 @@ Core/Gen/Translation_brieflz_multi.$(1).cpp: $(OUTPUT_DIR)/Core/Gen/translation.
@test -d $$(@D) || mkdir -p $$(@D)
@echo Generating BriefLZ compressed translation for multi-language $(2)
@OBJCOPY=$(OBJCOPY) $(HOST_PYTHON) ../Translations/make_translation.py \
--macros $(PWD)/Core/Gen/macros.txt \
-o $(PWD)/Core/Gen/Translation_brieflz_multi.$(1).cpp \
--macros $(CURDIR)/Core/Gen/macros.txt \
-o $(CURDIR)/Core/Gen/Translation_brieflz_multi.$(1).cpp \
--input-pickled $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).pickle \
--strings-obj $(OUTPUT_DIR)/Core/Gen/translation.files/multi.$(1).o \
--compress-font \