Skip to content

Commit

Permalink
Merge branch 'release-candidate' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
skotopes committed Aug 29, 2021
2 parents b629ae1 + 54278b9 commit 3773428
Show file tree
Hide file tree
Showing 277 changed files with 4,164 additions and 3,463 deletions.
66 changes: 40 additions & 26 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: 'Build'

on: push
on:
push:
branches:
- dev
- "release*"
tags:
- '*'
pull_request:

env:
TARGETS: f6
Expand Down Expand Up @@ -58,18 +65,6 @@ jobs:
make -j$(nproc) -C bootloader TARGET=${TARGET}
done
- name: 'Generate dfu file for bootloader'
uses: ./.github/actions/docker
with:
run: |
for TARGET in ${TARGETS}
do
hex2dfu \
-i bootloader/.obj/${TARGET}/bootloader.hex \
-o bootloader/.obj/${TARGET}/bootloader.dfu \
-l "Flipper Zero $(echo $TARGET | tr a-z A-Z)"
done
- name: 'Build firmware in docker'
uses: ./.github/actions/docker
with:
Expand All @@ -79,19 +74,8 @@ jobs:
make -j$(nproc) -C firmware TARGET=${TARGET}
done
- name: 'Generate dfu file for firmware'
uses: ./.github/actions/docker
with:
run: |
for TARGET in ${TARGETS}
do
hex2dfu \
-i firmware/.obj/${TARGET}/firmware.hex \
-o firmware/.obj/${TARGET}/firmware.dfu \
-l "Flipper Zero $(echo $TARGET | tr a-z A-Z)"
done
- name: 'Generate full hex file'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/docker
with:
run: |
Expand All @@ -104,6 +88,7 @@ jobs:
done
- name: 'Move upload files'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/docker
with:
run: |
Expand All @@ -124,6 +109,7 @@ jobs:
done
- name: 'Generate full dfu file'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: ./.github/actions/docker
with:
run: |
Expand All @@ -136,6 +122,7 @@ jobs:
done
- name: 'Full flash asssembly: bootloader as base'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
for TARGET in ${TARGETS}
do
Expand All @@ -145,13 +132,15 @@ jobs:
done
- name: 'Full flash asssembly: bootloader padding'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
for TARGET in ${TARGETS}
do
truncate -s 32768 artifacts/flipper-z-${TARGET}-full-${SUFFIX}.bin
done
- name: 'Full flash asssembly: append firmware'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
for TARGET in ${TARGETS}
do
Expand All @@ -160,7 +149,31 @@ jobs:
>> artifacts/flipper-z-${TARGET}-full-${SUFFIX}.bin
done
- name: 'Bundle core2 firmware'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
test -d core2_firmware && rm -rf core2_firmware || true
mkdir core2_firmware
cp \
lib/STM32CubeWB/package.xml \
lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_FUS_fw.bin \
lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_FUS_fw_for_fus_0_5_3.bin \
lib/STM32CubeWB/Projects/STM32WB_Copro_Wireless_Binaries/STM32WB5x/stm32wb5x_BLE_Stack_full_fw.bin \
core2_firmware
tar czpf artifacts/flipper-z-any-core2_firmware-${SUFFIX}.tgz core2_firmware
- name: 'Bundle scripts'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
tar czpf artifacts/flipper-z-any-scripts-${SUFFIX}.tgz scripts
- name: 'Bundle resources'
if: ${{ !github.event.pull_request.head.repo.fork }}
run: |
tar czpf artifacts/flipper-z-any-resources-${SUFFIX}.tgz -C assets resources
- name: 'Upload artifacts to update server'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: burnett01/rsync-deployments@4.1
with:
switches: -avzP --delete
Expand All @@ -172,6 +185,7 @@ jobs:
remote_key: ${{ secrets.RSYNC_DEPLOY_KEY }}

- name: 'Trigger update server reindex'
if: ${{ !github.event.pull_request.head.repo.fork }}
uses: wei/curl@master
with:
args: -X POST -F 'key=${{ secrets.REINDEX_KEY }}' ${{ secrets.REINDEX_URL }}
Expand Down
46 changes: 46 additions & 0 deletions .github/workflows/build_toolchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: 'Build toolchain Docker image'

on:
push:
branches:
- dev
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: flipperdevices/flipperzero-toolchain
flavor: latest=${{ startsWith(github.ref, 'refs/tags/') && !endsWith(github.ref, 'rc')}}
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: docker/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=registry,ref=flipperdevices/flipperzero-toolchain:buildcache
cache-to: type=registry,ref=flipperdevices/flipperzero-toolchain:buildcache,mode=max
25 changes: 22 additions & 3 deletions .github/workflows/lint_c.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: 'Lint C/C++ with clang-format'

on: pull_request
on:
push:
branches:
- dev
- "release*"
tags:
- '*'
pull_request:

env:
TARGETS: f6
Expand Down Expand Up @@ -37,7 +44,19 @@ jobs:
uses: ./.github/actions/docker

- name: 'Check syntax'
id: syntax_check
uses: ./.github/actions/docker
continue-on-error: false
with:
run: /syntax_check.sh
run: SET_GH_OUTPUT=1 /syntax_check.sh

- name: Report syntax errors
if: failure() && steps.syntax_check.outputs.errors && github.event.pull_request
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Please fix following syntax errors:
```
${{ steps.syntax_check.outputs.errors }}
```
You might want to run `docker compose exec dev /syntax_check.sh` for an auto-fix.
9 changes: 8 additions & 1 deletion .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: 'Python Lint'

on: pull_request
on:
push:
branches:
- dev
- "release*"
tags:
- '*'
pull_request:

jobs:
lint_python:
Expand Down
Loading

0 comments on commit 3773428

Please sign in to comment.