github: workflow trigger optimizations (#3030)
This commit is contained in:
parent
d8d2b360cb
commit
5eeb672dd4
72
.github/workflows/build.yml
vendored
72
.github/workflows/build.yml
vendored
@ -15,7 +15,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
runs-on: [self-hosted,FlipperZeroShell]
|
runs-on: [self-hosted, FlipperZeroShell]
|
||||||
steps:
|
steps:
|
||||||
- name: 'Wipe workspace'
|
- name: 'Wipe workspace'
|
||||||
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
||||||
@ -37,7 +37,6 @@ jobs:
|
|||||||
TYPE="other"
|
TYPE="other"
|
||||||
fi
|
fi
|
||||||
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE" || cat "${{ github.event_path }}"
|
python3 scripts/get_env.py "--event_file=${{ github.event_path }}" "--type=$TYPE" || cat "${{ github.event_path }}"
|
||||||
echo random_hash=$(openssl rand -base64 40 | shasum -a 256 | awk '{print $1}') >> $GITHUB_OUTPUT
|
|
||||||
echo "event_type=$TYPE" >> $GITHUB_OUTPUT
|
echo "event_type=$TYPE" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: 'Check API versions'
|
- name: 'Check API versions'
|
||||||
@ -149,72 +148,3 @@ jobs:
|
|||||||
- [📥 DFU file](https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-full-${{steps.names.outputs.suffix}}.dfu)
|
- [📥 DFU file](https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-full-${{steps.names.outputs.suffix}}.dfu)
|
||||||
- [☁️ Web/App updater](https://lab.flipper.net/?url=https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz&channel=${{steps.names.outputs.branch_name}}&version=${{steps.names.outputs.commit_sha}})
|
- [☁️ Web/App updater](https://lab.flipper.net/?url=https://update.flipperzero.one/builds/firmware/${{steps.names.outputs.branch_name}}/flipper-z-${{steps.names.outputs.default_target}}-update-${{steps.names.outputs.suffix}}.tgz&channel=${{steps.names.outputs.branch_name}}&version=${{steps.names.outputs.commit_sha}})
|
||||||
edit-mode: replace
|
edit-mode: replace
|
||||||
|
|
||||||
compact:
|
|
||||||
if: ${{ !startsWith(github.ref, 'refs/tags') }}
|
|
||||||
runs-on: [self-hosted,FlipperZeroShell]
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
target: [f7, f18]
|
|
||||||
steps:
|
|
||||||
- name: 'Wipe workspace'
|
|
||||||
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
|
||||||
|
|
||||||
- name: 'Checkout code'
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
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.0
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|||||||
75
.github/workflows/build_compact.yml
vendored
Normal file
75
.github/workflows/build_compact.yml
vendored
Normal file
@ -0,0 +1,75 @@
|
|||||||
|
name: 'Compact build'
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
FBT_TOOLCHAIN_PATH: /runner/_work
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
compact:
|
||||||
|
runs-on: [self-hosted, FlipperZeroShell]
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target: [f7, f18]
|
||||||
|
steps:
|
||||||
|
- name: 'Wipe workspace'
|
||||||
|
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
||||||
|
|
||||||
|
- name: 'Checkout code'
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
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.0
|
||||||
|
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
|
||||||
@ -1,11 +1,6 @@
|
|||||||
name: 'Lint sources & check submodule integrity'
|
name: 'Lint sources & check submodule integrity'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- dev
|
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@ -15,7 +10,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint_sources_check_submodules:
|
lint_sources_check_submodules:
|
||||||
runs-on: [self-hosted,FlipperZeroShell]
|
runs-on: [self-hosted, FlipperZeroShell]
|
||||||
steps:
|
steps:
|
||||||
- name: 'Wipe workspace'
|
- name: 'Wipe workspace'
|
||||||
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
||||||
|
|||||||
2
.github/workflows/merge_report.yml
vendored
2
.github/workflows/merge_report.yml
vendored
@ -10,7 +10,7 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
merge_report:
|
merge_report:
|
||||||
runs-on: [self-hosted,FlipperZeroShell]
|
runs-on: [self-hosted, FlipperZeroShell]
|
||||||
steps:
|
steps:
|
||||||
- name: 'Wipe workspace'
|
- name: 'Wipe workspace'
|
||||||
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;
|
||||||
|
|||||||
2
.github/workflows/pvs_studio.yml
vendored
2
.github/workflows/pvs_studio.yml
vendored
@ -4,8 +4,6 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/reindex.yml
vendored
2
.github/workflows/reindex.yml
vendored
@ -7,7 +7,7 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
reindex:
|
reindex:
|
||||||
name: 'Reindex updates'
|
name: 'Reindex updates'
|
||||||
runs-on: [self-hosted,FlipperZeroShell]
|
runs-on: [self-hosted, FlipperZeroShell]
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger reindex
|
- name: Trigger reindex
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user