Skip to content

Commit 4ef0d14

Browse files
committed
Add workflow for esp82xx-nonos-linklayer
1 parent c3bacab commit 4ef0d14

File tree

1 file changed

+87
-0
lines changed

1 file changed

+87
-0
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build and deploy esp82xx-nonos-linklayer
2+
3+
on:
4+
workflow_dispatch:
5+
6+
7+
permissions:
8+
contents: read
9+
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
environment: deploy
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
path: repo
19+
fetch-tags: true
20+
21+
- uses: actions/setup-python@v4
22+
with:
23+
python-version: '3.x'
24+
25+
- uses: actions/cache@v3
26+
with:
27+
path: |
28+
esp8266/tools/dist
29+
esp8266/tools/sdk/lwip2/builder/lwip2-src
30+
key: ${{ runner.os }}-deploy-${{ hashFiles('esp8266/tools/sdk/lwip2/builder/.git/HEAD', 'esp8266/package/package_esp8266com_index.template.json') }}
31+
32+
- name: Fetch ESP8266 Core
33+
uses: actions/checkout@v3
34+
with:
35+
path: esp8266
36+
repository: esp8266/Arduino
37+
fetch-depth: 1
38+
submodules: false
39+
40+
- name: Initialize deploy tools
41+
env:
42+
ESP8266_ARDUINO_CORE_DIR: ${{ github.workspace }}/esp8266
43+
SSH_DEPLOY_SECRET: ${{ secrets.SSH_DEPLOY_KEY }}
44+
SSH_DEPLOY_KEY: ${HOME}/.ssh/deploy_key
45+
run: |
46+
mkdir ${HOME}/.ssh
47+
48+
cat "${SSH_DEPLOY_SECRET}" > "${SSH_DEPLOY_KEY}"
49+
chmod 600 "${SSH_DEPLOY_KEY}"
50+
51+
echo -ne "Host github.com\n\tHostName github.com\n\tIdentityFile ${SSH_DEPLOY_KEY}\n" > \
52+
${HOME}/.ssh/config
53+
54+
git config user.email "[email protected]"
55+
git config user.name "GitHub CI Action"
56+
57+
- name: Initialize build environment
58+
run: |
59+
pushd esp8266/tools
60+
python get.py -q
61+
popd
62+
63+
- name: Prepare lwip2 builder
64+
run: |
65+
pushd ${ESP8266_ARDUINO_CORE_DIR}
66+
git remote add deploy ${{ github.repositoryUrl }}
67+
git switch -c lwip2-rebuild
68+
git submodule update --init -- tools/sdk/lwip2/builder
69+
git submodule update --remote --merge -- tools/sdk/lwip2/builder
70+
git add -u
71+
git commit -m 'Update lwip2 builder'
72+
popd
73+
74+
- name: Build and deploy
75+
run: |
76+
pushd esp8266
77+
78+
pushd tools/sdk/lwip2
79+
make install
80+
popd
81+
82+
git add -u
83+
git commit -m 'Rebuild lwip2 libs'
84+
85+
git push deploy lwip2-rebuild
86+
87+
popd

0 commit comments

Comments
 (0)