Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-candidate' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed Mar 28, 2023
2 parents b698126 + 9b9dce3 commit c41fe8e
Show file tree
Hide file tree
Showing 606 changed files with 4,552 additions and 4,322 deletions.
7 changes: 5 additions & 2 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
/applications/main/subghz/ @skotopes @DrZlo13 @hedger @Skorpionm
/applications/main/u2f/ @skotopes @DrZlo13 @hedger @nminaylov

/applications/plugins/bt_hid_app/ @skotopes @DrZlo13 @hedger @gornekich
/applications/plugins/picopass/ @skotopes @DrZlo13 @hedger @gornekich
/applications/external/bt_hid_app/ @skotopes @DrZlo13 @hedger @gornekich
/applications/external/picopass/ @skotopes @DrZlo13 @hedger @gornekich

/applications/services/bt/ @skotopes @DrZlo13 @hedger @gornekich
/applications/services/cli/ @skotopes @DrZlo13 @hedger @nminaylov
Expand All @@ -44,6 +44,9 @@

/applications/examples/example_thermo/ @skotopes @DrZlo13 @hedger @gsurkov

# Firmware targets
/firmware/ @skotopes @DrZlo13 @hedger @nminaylov

# Assets
/assets/resources/infrared/ @skotopes @DrZlo13 @hedger @gsurkov

Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@ jobs:
main:
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get commit details'
Expand Down Expand Up @@ -166,19 +163,14 @@ jobs:
if: ${{ !startsWith(github.ref, 'refs/tags') }}
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]
then
git submodule status \
|| git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
fetch-depth: 1
submodules: false
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get commit details'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Check submodules branch'
name: 'Lint sources & check submodule integrity'

on:
push:
Expand All @@ -9,22 +9,25 @@ on:
- '*'
pull_request:

env:
TARGETS: f7
FBT_TOOLCHAIN_PATH: /runner/_work
SET_GH_OUTPUT: 1

jobs:
check_protobuf:
runs-on: [self-hosted, FlipperZeroShell]
lint_sources_check_submodules:
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}


- name: 'Check protobuf branch'
run: |
git submodule update --init
Expand All @@ -36,12 +39,28 @@ jobs:
BRANCHES=$(git branch -r --contains "$SUBMODULE_HASH");
COMMITS_IN_BRANCH="$(git rev-list --count dev)";
if [ $COMMITS_IN_BRANCH -lt $SUB_COMMITS_MIN ]; then
echo "name=fails::error" >> $GITHUB_OUTPUT
echo "name=fails::error" >> $GITHUB_OUTPUT;
echo "::error::Error: Too low commits in $SUB_BRANCH of submodule $SUB_PATH: $COMMITS_IN_BRANCH(expected $SUB_COMMITS_MIN+)";
exit 1;
fi
if ! grep -q "/$SUB_BRANCH" <<< "$BRANCHES"; then
echo "name=fails::error" >> $GITHUB_OUTPUT
echo "name=fails::error" >> $GITHUB_OUTPUT;
echo "::error::Error: Submodule $SUB_PATH is not on branch $SUB_BRANCH";
exit 1;
fi
- name: 'Check Python code formatting'
id: syntax_check_py
run: ./fbt lint_py 2>&1 >/dev/null || echo "errors=1" >> $GITHUB_OUTPUT

- name: 'Check C++ code formatting'
if: always()
id: syntax_check_cpp
run: ./fbt lint 2>&1 >/dev/null || echo "errors=1" >> $GITHUB_OUTPUT

- name: Report code formatting errors
if: ( steps.syntax_check_py.outputs.errors || steps.syntax_check_cpp.outputs.errors ) && github.event.pull_request
run: |
echo "Code formatting errors found";
echo "Please run './fbt format' or './fbt format_py' to fix them";
exit 1;
47 changes: 0 additions & 47 deletions .github/workflows/lint_c.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/lint_python.yml

This file was deleted.

9 changes: 3 additions & 6 deletions .github/workflows/merge_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ jobs:
merge_report:
runs-on: [self-hosted,FlipperZeroShell]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get commit details'
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/pvs_studio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,13 @@ jobs:
if: ${{ !github.event.pull_request.head.repo.fork }}
runs-on: [self-hosted, FlipperZeroShell]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout code'
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get commit details'
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@ jobs:
run_units_on_bench:
runs-on: [self-hosted, FlipperZeroUnitTest]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get flipper from device manager (mock)'
Expand All @@ -32,7 +29,7 @@ jobs:
- name: 'Flash unit tests firmware'
id: flashing
if: success()
run: |
run: |
./fbt flash OPENOCD_ADAPTER_SERIAL=2A0906016415303030303032 FIRMWARE_APP_SET=unit_tests FORCE=1
- name: 'Wait for flipper and format ext'
Expand Down
20 changes: 7 additions & 13 deletions .github/workflows/updater_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ jobs:
test_updater_on_bench:
runs-on: [self-hosted, FlipperZeroUpdaterTest]
steps:
- name: 'Decontaminate previous build leftovers'
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-depth: 1
submodules: false
ref: ${{ github.event.pull_request.head.sha }}

- name: 'Get flipper from device manager (mock)'
Expand Down Expand Up @@ -51,18 +49,14 @@ jobs:
run: |
echo "tag=$(git tag -l --sort=-version:refname | grep -v "rc\|RC" | head -1)" >> $GITHUB_OUTPUT
- name: 'Decontaminate previous build leftovers'
if: failure()
run: |
if [ -d .git ]; then
git submodule status || git checkout "$(git rev-list --max-parents=0 HEAD | tail -n 1)"
fi
- name: 'Wipe workspace'
run: find ./ -mount -maxdepth 1 -exec rm -rf {} \;

- name: 'Checkout latest release'
uses: actions/checkout@v3
if: failure()
with:
fetch-depth: 0
fetch-depth: 1
ref: ${{ steps.release_tag.outputs.tag }}

- name: 'Flash last release'
Expand Down
7 changes: 5 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
[submodule "lib/cxxheaderparser"]
path = lib/cxxheaderparser
url = https://github.com/robotpy/cxxheaderparser.git
[submodule "applications/plugins/dap_link/lib/free-dap"]
path = applications/plugins/dap_link/lib/free-dap
[submodule "applications/external/dap_link/lib/free-dap"]
path = applications/external/dap_link/lib/free-dap
url = https://github.com/ataradov/free-dap.git
[submodule "lib/heatshrink"]
path = lib/heatshrink
url = https://github.com/flipperdevices/heatshrink.git
2 changes: 1 addition & 1 deletion .pvsoptions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/plugins/dap_link/lib/free-dap
--ignore-ccache -C gccarm --rules-config .pvsconfig -e lib/fatfs -e lib/fnv1a-hash -e lib/FreeRTOS-Kernel -e lib/heatshrink -e lib/libusb_stm32 -e lib/littlefs -e lib/mbedtls -e lib/micro-ecc -e lib/microtar -e lib/mlib -e lib/qrcode -e lib/ST25RFAL002 -e lib/STM32CubeWB -e lib/u8g2 -e lib/nanopb -e */arm-none-eabi/* -e applications/external/dap_link/lib/free-dap
27 changes: 13 additions & 14 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -139,34 +139,33 @@ if GetOption("fullenv") or any(
basic_dist = distenv.DistCommand("fw_dist", distenv["DIST_DEPENDS"])
distenv.Default(basic_dist)

dist_dir = distenv.GetProjetDirName()
dist_dir_name = distenv.GetProjetDirName()
dist_dir = distenv.Dir(f"#/dist/{dist_dir_name}")
external_apps_artifacts = firmware_env["FW_EXTAPPS"]
external_app_list = external_apps_artifacts.application_map.values()

fap_dist = [
distenv.Install(
distenv.Dir(f"#/dist/{dist_dir}/apps/debug_elf"),
list(
app_artifact.debug
for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
),
dist_dir.Dir("debug_elf"),
list(app_artifact.debug for app_artifact in external_app_list),
),
*(
distenv.Install(
f"#/dist/{dist_dir}/apps/{app_artifact.app.fap_category}",
app_artifact.compact[0],
dist_dir.File(dist_entry[1]).dir,
app_artifact.compact,
)
for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
for app_artifact in external_app_list
for dist_entry in app_artifact.dist_entries
),
]
Depends(
fap_dist,
list(
app_artifact.validator
for app_artifact in firmware_env["FW_EXTAPPS"].applications.values()
),
list(app_artifact.validator for app_artifact in external_app_list),
)
Alias("fap_dist", fap_dist)
# distenv.Default(fap_dist)

distenv.Depends(firmware_env["FW_RESOURCES"], firmware_env["FW_EXTAPPS"].resources_dist)
distenv.Depends(firmware_env["FW_RESOURCES"], external_apps_artifacts.resources_dist)

# Copy all faps to device

Expand Down
Loading

0 comments on commit c41fe8e

Please sign in to comment.