Skip to content

[NfcMagic] Fix build issue #589

[NfcMagic] Fix build issue

[NfcMagic] Fix build issue #589

Workflow file for this run

name: Build faps
on:
push:
branches:
- dev
pull_request:
workflow_dispatch:
inputs:
sdk-channel:
description: 'SDK channel to use'
required: true
default: 'rc'
type: choice
options:
- 'rc'
- 'release'
- 'dev'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: recursive
- name: Set up ufbt
uses: flipperdevices/[email protected]
with:
sdk-channel: ${{ github.event.inputs.sdk-channel || 'rc'}}
task: setup
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v39
with:
dir_names: true
dir_names_max_depth: 1
dir_names_exclude_current_dir: true
files: |
!.*/**
- name: Build & lint updated apps
if: steps.changed-files.outputs.all_changed_and_modified_files != ''
run: |
BUILD_FAILED=0
for appdir in ${{ steps.changed-files.outputs.all_changed_and_modified_files }} ; do
if [ ! -f "$appdir/application.fam" ] ; then
echo "Skipping $appdir, no application.fam. File may have been deleted."
continue
fi
echo "Building in $appdir"
pushd "$appdir"
if ! ufbt build faps ; then
echo "::error::Failed to build $appdir"
BUILD_FAILED=1
fi
popd
done
if [ $BUILD_FAILED -ne 0 ] ; then
echo One or more apps failed to build
exit 1
fi
- name: Build & lint all apps
id: build-all
if: steps.changed-files.outputs.all_changed_and_modified_files == ''
run: |
BUILD_FAILED=0
for appdir in $( dirname $( find . -name application.fam ) ) ; do
if [ ! -f "$appdir/application.fam" ] ; then
echo "Skipping $appdir, no application.fam. File may have been deleted."
continue
fi
echo "Building in $appdir"
pushd "$appdir"
if ! ufbt build faps ; then
BUILD_FAILED=1
echo "::error::Failed to build $appdir"
fi
popd
done
if [ $BUILD_FAILED -ne 0 ] ; then
echo One or more apps failed to build
exit 1
fi
- name: Gather build artifacts
if: steps.build-all.conclusion == 'success'
run: |
mkdir -p dist
cp -v $( find . -name '*.fap' ) dist/
- name: Upload all .fap files
if: steps.build-all.conclusion == 'success'
uses: actions/upload-artifact@v4
with:
name: faps
path: dist/*.fap