forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (68 loc) · 2.25 KB
/
esp82xx-nonos-linklayer.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
name: Build and deploy esp82xx-nonos-linklayer
on:
workflow_dispatch:
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
environment: deploy
steps:
- uses: actions/checkout@v4
with:
path: repo
fetch-tags: true
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- uses: actions/cache@v3
with:
path: |
esp8266/tools/dist
esp8266/tools/sdk/lwip2/builder/lwip2-src
key: ${{ runner.os }}-deploy-${{ hashFiles('esp8266/tools/sdk/lwip2/builder/.git/HEAD', 'esp8266/package/package_esp8266com_index.template.json') }}
- name: Fetch ESP8266 Core
uses: actions/checkout@v3
with:
path: esp8266
repository: esp8266/Arduino
fetch-depth: 1
submodules: false
- name: Initialize deploy tools
env:
ESP8266_ARDUINO_CORE_DIR: ${{ github.workspace }}/esp8266
SSH_DEPLOY_SECRET: ${{ secrets.SSH_DEPLOY_KEY }}
SSH_DEPLOY_KEY: ${HOME}/.ssh/deploy_key
run: |
mkdir ${HOME}/.ssh
cat "${SSH_DEPLOY_SECRET}" > "${SSH_DEPLOY_KEY}"
chmod 600 "${SSH_DEPLOY_KEY}"
echo -ne "Host github.com\n\tHostName github.com\n\tIdentityFile ${SSH_DEPLOY_KEY}\n" > \
${HOME}/.ssh/config
git config user.email "github-ci-action@github.com"
git config user.name "GitHub CI Action"
- name: Initialize build environment
run: |
pushd esp8266/tools
python get.py -q
popd
- name: Prepare lwip2 builder
run: |
pushd ${ESP8266_ARDUINO_CORE_DIR}
git remote add deploy ${{ github.repositoryUrl }}
git switch -c lwip2-rebuild
git submodule update --init -- tools/sdk/lwip2/builder
git submodule update --remote --merge -- tools/sdk/lwip2/builder
git add -u
git commit -m 'Update lwip2 builder'
popd
- name: Build and deploy
run: |
pushd esp8266
pushd tools/sdk/lwip2
make install
popd
git add -u
git commit -m 'Rebuild lwip2 libs'
git push deploy lwip2-rebuild
popd