forked from Ameba-AIoT/ameba-rtos
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (86 loc) · 3.71 KB
/
build_template_amebasmart.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Reusable amebasmart workflow template
on:
workflow_call:
# parameters from upstream workflow
inputs:
module_name:
required: true
type: string
artifacts_name:
required: true
type: string
# parameters from upstream inherit
secrets:
TOKEN_AMEBALITE:
required: false
TOKEN_AMEBASMART:
required: false
TOKEN_AMEBADPLUS:
required: false
jobs:
build-template-amebasmart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Configure bash
run: |
sudo ln -sf /bin/bash /bin/sh
- name: Configure prerequisites
run: |
# set config
if ${{ inputs.artifacts_name == 'amebasmart-B1' }}; then
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config BT1
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config IPC
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config AUDIO_MIXER
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config TRUSTZONE
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config VFS_FATFS
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config USB_AP_DEVICE
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config USB_AP_HOST
fi
if ${{ inputs.artifacts_name == 'amebasmart-B2' }}; then
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config AUDIO_MIXER_SINGLECORE
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config TRUSTZONE
fi
if ${{ inputs.artifacts_name == 'amebasmart-B3' }}; then
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config BT2
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config IPC
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config AUDIO_PASSTHROUGH
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config TRUSTZONE
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config USB_HP_DEVICE
fi
if ${{ inputs.artifacts_name == 'amebasmart-B4' }}; then
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config BT3
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config AUDIO_PASSTHROUGH_SINGLECORE
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config TRUSTZONE
fi
if ${{ inputs.artifacts_name == 'amebasmart-B5' }}; then
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config MP
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config BT_EN
fi
if ${{ inputs.artifacts_name == 'amebasmart-B6' }}; then
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config MP_NORMAL
./tools/build_check/rtl_sdk_config.py --chip AMEBASMART --config BT_EN
fi
- name: Compile
run: |
cd amebasmart_gcc_project
make all
cd -
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifacts_name }}
path: |
amebasmart_gcc_project/menuconfig/*.config
amebasmart_gcc_project/menuconfig/*.config_ap
amebasmart_gcc_project/menuconfig/*.config_hp
amebasmart_gcc_project/menuconfig/*.config_lp
amebasmart_gcc_project/project_ap/asdk/image
amebasmart_gcc_project/project_hp/asdk/image
amebasmart_gcc_project/project_lp/asdk/image
amebasmart_gcc_project/project_ap/inc
amebasmart_gcc_project/project_hp/inc
amebasmart_gcc_project/project_lp/inc