-
Notifications
You must be signed in to change notification settings - Fork 49
55 lines (44 loc) · 1.86 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
name: Build z03mmc firmware
on:
push:
# branches: [ "master" ]
pull_request:
# branches: [ "master" ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
TOOLCHAIN_DIR: ${{github.workspace}}/tc32
SDK_DIR: ${{github.workspace}}/tl_zigbee_sdk
ARTIFACT_DIR: ${{github.workspace}}/build/src/
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get toolchain
run: git clone https://github.com/devbis/tc32.git -b linux --depth 1 ${{ env.TOOLCHAIN_DIR }}
- name: Get SDK
run: git clone https://github.com/devbis/tl_zigbee_sdk.git --depth 1 ${{ env.SDK_DIR }}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSDK_PREFIX=${{env.SDK_DIR}} -DTOOLCHAIN_PREFIX=${{env.TOOLCHAIN_DIR}}
- name: Build
id: make
run: |
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target=z03mmc.ota
echo "status=success" >> $GITHUB_OUTPUT
- name: Build additional firmware with Heiman model
id: make2
run: |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSDK_PREFIX=${{env.SDK_DIR}} -DMIMIC_HEIMAN=1 -DTOOLCHAIN_PREFIX=${{env.TOOLCHAIN_DIR}}
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target=z03mmc_heiman.bin
echo "status=success" >> $GITHUB_OUTPUT
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3
if: steps.make.outputs.status == 'success' && steps.make2.outputs.status == 'success' && !cancelled()
with:
# Artifact name
name: firmware
# A file, directory or wildcard pattern that describes what to upload
path: |
${{ env.ARTIFACT_DIR }}/*.bin
${{ env.ARTIFACT_DIR }}/*.ota