-
-
Notifications
You must be signed in to change notification settings - Fork 55
58 lines (49 loc) · 1.48 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: "Build"
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
DEFAULT_TARGET: f7
FBT_GIT_SUBMODULE_SHALLOW: 1
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: [f7]
steps:
- name: "Checkout firmware"
uses: actions/checkout@v4
with:
repository: Next-Flip/Momentum-Firmware
fetch-depth: 1
ref: dev
submodules: recursive
- name: "Checkout apps"
uses: actions/checkout@v4
with:
path: applications/external
fetch-depth: 1
ref: ${{ github.event.pull_request.head.sha }}
- name: "Get commit details"
run: |
BUILD_TYPE='DEBUG=0 COMPACT=1'
echo "FBT_BUILD_TYPE=$BUILD_TYPE" >> $GITHUB_ENV
echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV
echo "TARGET_HW=$(echo "${{ matrix.target }}" | sed 's/f//')" >> $GITHUB_ENV
- name: "Build the firmware and apps"
run: |
git add applications/external
./fbt TARGET_HW=$TARGET_HW $FBT_BUILD_TYPE updater_package
- name: "Check for uncommitted changes"
run: |
git diff --exit-code
- name: "Upload artifacts to GitHub"
uses: actions/upload-artifact@v3
with:
path: |
dist/${{ env.TARGET }}-*/flipper-z-${{ env.TARGET }}-update-*