-
Notifications
You must be signed in to change notification settings - Fork 67
137 lines (124 loc) · 5.6 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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# This is a basic workflow to help you get started with Actions
name: CI-building linux
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != 'master' }}
# Controls when the action will run.
on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
make_linux_java:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
# tcp on, ipv4 on
- args: "TCP=1 IPV4=1"
# cloud on (tcp on, ipv4 on)
- args: "CLOUD=1"
# cloud on (tcp on, ipv4 on), debug on
- args: "CLOUD=1 DEBUG=1"
# cloud on (tcp on, ipv4 on), debug on, mbedTLS v3.5.0
- args: "CLOUD=1 DEBUG=1 MBEDTLS_FORCE_3_5_0=1"
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
# Runs a set of commands using the runners shell
- name: build
run: |
# the setup
sudo apt-get update -y
sudo apt-get -y install make autoconf swig default-jdk
swig -version
java -version
javac -version
# the actual build
cd port/linux
make JAVA=1 ${{ matrix.args }}
cd ../../swig/apps/unit_test
wget --quiet --output-document=junit-4.13.jar https://search.maven.org/remotecontent?filepath=junit/junit/4.13/junit-4.13.jar
wget --quiet --output-document=hamcrest-core-1.3.jar https://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar
JUNIT4=./junit-4.13.jar ./build-unit-tests.sh
JUNIT4=./junit-4.13.jar HAMCREST_CORE=./hamcrest-core-1.3.jar ./run-unit-tests.sh
ctt_build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: build
run: |
cd port/linux
make TCP=1 MNT=1 SWUPDATE=1 CLOUD=1 IPV4=0 CREATE=1 OSCORE=1
build_esp32:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
include:
# default build
- args: ""
# hawkbit build
- args: -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;hawkbit/sdkconfig.defaults.hawkbit"
# esp5.4, mbedtls3.6.2
- args:
force_5_4: true
# esp5.4, mbedtls3.6.2 + hawkbit build
- args: -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;hawkbit/sdkconfig.defaults.hawkbit"
force_5_4: true
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: "true"
- name: build esp32 (v5.1)
if: ${{ ! matrix.force_5_4 }}
run: |
sudo apt-get update -y
sudo apt install -y git wget flex bison gperf python3 python3-pip python3-setuptools python3-serial python3-click python3-cryptography python3-future python3-pyparsing python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev libusb-1.0-0
cd ./port/esp32
git clone --recursive -b release/v5.1 https://github.com/espressif/esp-idf.git
# checkout latest commit with mbedTLS v3.5.0
( cd esp-idf && git checkout 7380f96017424c7be5d8e3229bf81ceb0869cc54 )
( cd esp-idf && git submodule update --init --recursive )
./esp-idf/install.sh
. ./esp-idf/export.sh
cp sdkconfig.3_5_0.defaults sdkconfig.defaults
idf.py ${{ matrix.args }} set-target esp32
( cd esp-idf/components/mbedtls/mbedtls && patch -p1 < ../../../../../../patches/mbedtls/3.5/01-ocf-anon-psk.patch )
( cd esp-idf/components/mbedtls/mbedtls && patch -p1 < ../../../../patches/mbedtls/3.5/02-ocf-mbedtls-config.patch )
( cd esp-idf/components/lwip/lwip && find ../../../../patches/lwip/ -type f -name '*.patch' -exec patch -p1 -i {} \; )
idf.py build
- name: build esp32 (v5.4)
if: ${{ matrix.force_5_4 }}
run: |
sudo apt-get update -y
sudo apt install -y git wget flex bison gperf python3 python3-pip python3-setuptools python3-serial python3-click python3-cryptography python3-future python3-pyparsing python3-pyelftools cmake ninja-build ccache libffi-dev libssl-dev libusb-1.0-0
cd ./port/esp32
git clone --recursive -b release/v5.4 https://github.com/espressif/esp-idf.git
# checkout latest commit with mbedTLS v3.6.2
( cd esp-idf && git checkout c8bb53292d08d6449a09823cf554e62ac839cd8c )
( cd esp-idf && git submodule update --init --recursive )
./esp-idf/install.sh
. ./esp-idf/export.sh
cp sdkconfig.3_6_2.defaults sdkconfig.defaults
idf.py ${{ matrix.args }} set-target esp32
( cd esp-idf/components/mbedtls/mbedtls && patch -p1 < ../../../../../../patches/mbedtls/3.6/01-ocf-anon-psk.patch )
( cd esp-idf/components/mbedtls/mbedtls && patch -p1 < ../../../../patches/mbedtls/3.6/02-ocf-mbedtls-config.patch )
( cd esp-idf/components/lwip/lwip && find ../../../../patches/lwip/ -type f -name '*.patch' -exec patch -p1 -i {} \; )
idf.py build