unleashed-firmware/.github/workflows/build_compact.yml
hedger 917410a0a8
[FL-3629] fbt: reworked assets & resources handling (#3160)
* fbt: reworking targets & assets handling WIP
* fbt: dist fixes
* fbt: moved SD card resources to owning apps
* unit_tests: moved resources to app folder
* github: updated unit_tests paths
* github: packaging fixes
* unit_tests: fixes
* fbt: assets: internal cleanup
* fbt: reworked assets handling
* github: unit_tests: reintroducing fixes
* minor cleanup
* fbt: naming changes to reflect private nature of scons tools
* fbt: resources: fixed dist archive paths
* docs: updated paths
* docs: updated more paths
* docs: included "resources" parameter in app manifest docs; updated assets readme
* updated gitignore for assets
* github: updated action versions
* unit_tests: restored timeout; scripts: assets: logging changes
* gh: don't upload desktop animations for unit test run

Co-authored-by: あく <alleteam@gmail.com>
2023-10-31 00:17:30 +09:00

87 lines
2.6 KiB
YAML

name: 'Compact build'
on:
pull_request:
env:
FBT_TOOLCHAIN_PATH: /runner/_work
FBT_GIT_SUBMODULE_SHALLOW: 1
jobs:
compact:
runs-on: [self-hosted, FlipperZeroShell]
strategy:
fail-fast: false
matrix:
target: [f7, f18]
steps:
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
- name: 'Checkout code'
uses: actions/checkout@v4
with:
fetch-depth: 1
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: 'Get commit details'
run: |
if [[ ${{ github.event_name }} == 'pull_request' ]]; then
TYPE="pull"
elif [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
TYPE="tag"
else
TYPE="other"
fi
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE" || cat "${{ github.event_path }}"
- name: 'Build the firmware'
id: build-fw
run: |
set -e
TARGET="$(echo '${{ matrix.target }}' | sed 's/f//')"; \
./fbt TARGET_HW=$TARGET DEBUG=0 COMPACT=1 fap_dist updater_package
echo "sdk-file=$(ls dist/${{ matrix.target }}-*/flipper-z-${{ matrix.target }}-sdk-*.zip)" >> $GITHUB_OUTPUT
echo "hw-target-code=$TARGET" >> $GITHUB_OUTPUT
- name: Deploy uFBT with SDK
uses: flipperdevices/flipperzero-ufbt-action@v0.1
with:
task: setup
sdk-file: ${{ steps.build-fw.outputs.sdk-file }}
sdk-hw-target: ${{ steps.build-fw.outputs.hw-target-code }}
- name: Build test app with SDK
run: |
mkdir testapp
cd testapp
ufbt create APPID=testapp
ufbt
- name: Build example & external apps with uFBT
run: |
for appdir in 'applications/examples'; do
for app in $(find "$appdir" -maxdepth 1 -mindepth 1 -type d); do
pushd $app
TARGETS_FAM=$(grep "targets" application.fam || echo "${{ matrix.target }}")
if ! grep -q "${{ matrix.target }}" <<< $TARGETS_FAM ; then
echo Skipping unsupported app: $app
popd
continue
fi
echo Building $app
ufbt
popd
done
done
## Uncomment this for a single job that will run only if all targets are built successfully
# report-status:
# name: Report status
# needs: [compact]
# if: always() && !contains(needs.*.result, 'failure')
# runs-on: [self-hosted, FlipperZeroShell]
# steps:
# - run: echo "All good ✨" ;