-
Notifications
You must be signed in to change notification settings - Fork 22
106 lines (91 loc) · 2.65 KB
/
run.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
name: Test build
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
jobs:
make-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: repo
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/cache@v3
with:
path: |
repo/build/lwip2-src
esp8266/tools/dist
key: ${{ runner.os }}-make-${{ hashFiles('repo/makefiles/Makefile.*', 'repo/makefiles/include/*.mk', 'repo/Makefile*') }}
- name: Fetch ESP8266 Core
uses: actions/checkout@v3
with:
path: esp8266
repository: esp8266/Arduino
fetch-depth: 1
submodules: false
- name: Get toolchain files
run: |
cd esp8266/tools
python get.py -q
- name: Build
env:
ESP8266_ARDUINO_CORE_DIR: ${{ github.workspace }}/esp8266
run: |
make -C repo/ -j$(nproc) \
LIBS=${{ github.workspace }}/install \
INC=${{ github.workspace }}/install/include \
PREFIX=${ESP8266_ARDUINO_CORE_DIR} \
arduino/upstream
pushd install
zip --quiet --recurse-paths ../lwip2-build.zip ./
popd
- uses: actions/upload-artifact@v3
with:
name: Build
path: lwip2-build.zip
cmake-build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: repo
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/cache@v3
with:
path: |
build/_deps/lwip2-src
build/_deps/lwip2-subbuild
esp8266/tools/dist
key: ${{ runner.os }}-cmake-${{ hashFiles('repo/CMakeLists.txt', 'repo/cmake/*.cmake') }}
- name: Fetch ESP8266 Core
uses: actions/checkout@v3
with:
path: esp8266
repository: esp8266/Arduino
fetch-depth: 1
submodules: false
- name: Get toolchain files
run: |
cd esp8266/tools
python get.py -q
- name: Build
env:
ESP8266_ARDUINO_CORE_DIR: ${{ github.workspace }}/esp8266
run: |
cmake \
--toolchain=${{ github.workspace }}/repo/cmake/toolchain-esp8266.cmake \
-DCMAKE_PROGRAM_PATH=${ESP8266_ARDUINO_CORE_DIR}/tools/xtensa-lx106-elf/bin \
-DESP8266_ARDUINO_CORE_DIR=${ESP8266_ARDUINO_CORE_DIR} \
-S repo \
-B build
cmake --build build/ --parallel $(nproc)