mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-26 22:40:25 +00:00
[FL-3359] github: added debugapps artifact; packaging resources per-target (#2750)
* github: added debugapps artifact; packaging resources per-target * github: target name fixes * github: fixed path for debug apps * scripts: dist: removed lib stub artifact * scripts: fixed broken SDK * github: removed unused step
This commit is contained in:
parent
e3e64e5e83
commit
1c306a04fc
2 changed files with 10 additions and 30 deletions
29
.github/workflows/build.yml
vendored
29
.github/workflows/build.yml
vendored
|
@ -52,10 +52,8 @@ jobs:
|
||||||
|
|
||||||
- name: 'Make artifacts directory'
|
- name: 'Make artifacts directory'
|
||||||
run: |
|
run: |
|
||||||
rm -rf artifacts
|
rm -rf artifacts map_analyser_files
|
||||||
rm -rf map_analyser_files
|
mkdir artifacts map_analyser_files
|
||||||
mkdir artifacts
|
|
||||||
mkdir map_analyser_files
|
|
||||||
|
|
||||||
- name: 'Bundle scripts'
|
- name: 'Bundle scripts'
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||||
|
@ -66,28 +64,21 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
for TARGET in ${TARGETS}; do
|
for TARGET in ${TARGETS}; do
|
||||||
TARGET="$(echo "${TARGET}" | sed 's/f//')"; \
|
TARGET_HW="$(echo "${TARGET}" | sed 's/f//')"; \
|
||||||
./fbt TARGET_HW=$TARGET copro_dist updater_package \
|
./fbt TARGET_HW=$TARGET_HW copro_dist updater_package \
|
||||||
${{ startsWith(github.ref, 'refs/tags') && 'DEBUG=0 COMPACT=1' || '' }}
|
${{ startsWith(github.ref, 'refs/tags') && 'DEBUG=0 COMPACT=1' || '' }}
|
||||||
done
|
|
||||||
|
|
||||||
- name: 'Move upload files'
|
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
|
||||||
run: |
|
|
||||||
set -e
|
|
||||||
for TARGET in ${TARGETS}; do
|
|
||||||
mv dist/${TARGET}-*/* artifacts/
|
mv dist/${TARGET}-*/* artifacts/
|
||||||
|
tar czpf "artifacts/flipper-z-${TARGET}-resources-${SUFFIX}.tgz" \
|
||||||
|
-C assets resources
|
||||||
|
./fbt TARGET_HW=$TARGET_HW fap_dist
|
||||||
|
tar czpf "artifacts/flipper-z-${TARGET}-debugapps-${SUFFIX}.tgz" \
|
||||||
|
-C dist/${TARGET}-*/apps/Debug .
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: "Check for uncommitted changes"
|
- name: "Check for uncommitted changes"
|
||||||
run: |
|
run: |
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
||||||
- name: 'Bundle resources'
|
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
|
||||||
run: |
|
|
||||||
tar czpf "artifacts/flipper-z-any-resources-${SUFFIX}.tgz" -C assets resources
|
|
||||||
|
|
||||||
- name: 'Bundle core2 firmware'
|
- name: 'Bundle core2 firmware'
|
||||||
if: ${{ !github.event.pull_request.head.repo.fork }}
|
if: ${{ !github.event.pull_request.head.repo.fork }}
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -84,17 +84,6 @@ class Main(App):
|
||||||
if exists(sdk_folder := join(obj_directory, foldertype)):
|
if exists(sdk_folder := join(obj_directory, foldertype)):
|
||||||
self.note_dist_component(foldertype, "dir", sdk_folder)
|
self.note_dist_component(foldertype, "dir", sdk_folder)
|
||||||
|
|
||||||
# TODO: remove this after everyone migrates to new uFBT
|
|
||||||
self.create_zip_stub("lib")
|
|
||||||
|
|
||||||
def create_zip_stub(self, foldertype):
|
|
||||||
with zipfile.ZipFile(
|
|
||||||
self.get_dist_path(self.get_dist_file_name(foldertype, "zip")),
|
|
||||||
"w",
|
|
||||||
zipfile.ZIP_DEFLATED,
|
|
||||||
) as _:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def copy(self) -> int:
|
def copy(self) -> int:
|
||||||
self._dist_components: dict[str, str] = dict()
|
self._dist_components: dict[str, str] = dict()
|
||||||
self.projects: dict[str, ProjectDir] = dict(
|
self.projects: dict[str, ProjectDir] = dict(
|
||||||
|
|
Loading…
Reference in a new issue