Skip to content

fix: stuff

fix: stuff #10

Workflow file for this run

name: Build compact target
on:
push:
branches: [main, "release*", "dev*"]
tags: ["*"]
pull_request:
branches: [main, "release*", "dev*"]
workflow_dispatch:
jobs:
build-compact:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [f7, f18]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
# Setup environment variables
- name: Set environment variables
run: |
echo "TARGETS=${{ matrix.target }}" >> $GITHUB_ENV
echo "DEFAULT_TARGET=f7" >> $GITHUB_ENV
echo "FBT_TOOLCHAIN_PATH=/tmp/toolchain" >> $GITHUB_ENV
echo "FBT_GIT_SUBMODULE_SHALLOW=1" >> $GITHUB_ENV
echo "DIST_SUFFIX=custom-$(date +%Y%m%d-%H%M%S)" >> $GITHUB_ENV
- name: 'Create toolchain directory with proper permissions'
run: |
sudo mkdir -p /tmp/toolchain
sudo chmod -R 777 /tmp/toolchain
# Create necessary directories before build
- name: Create required directories
run: |
mkdir -p lib/stm32wb_copro/firmware
touch lib/stm32wb_copro/firmware/.placeholder
# Build stuff
- name: 'Build firmware with fbt'
id: build-fw
run: |
TARGET="$(echo '${{ matrix.target }}' | sed 's/f//')"; \
sudo ./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: |
set -e
sudo -i
mkdir testapp
cd testapp
ufbt create APPID=testapp
ufbt
- name: Build example & external apps with uFBT
run: |
set -e
sudo -i
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: ubuntu-latest
# steps:
# - run: echo "All good ✨" ;