GitHub Actions CI

This commit is contained in:
2021-09-18 04:18:59 +02:00
parent b3b68e8c7a
commit 15a6fc97cd
2 changed files with 172 additions and 26 deletions

146
.github/workflows/main.yml vendored Normal file
View File

@ -0,0 +1,146 @@
on:
push:
pull_request:
branches:
- main
page_build:
release:
types:
- created
jobs:
feedc0de:
runs-on: ubuntu-latest
name: feedc0de
steps:
- name: Checkout
uses: actions/checkout@v2
#with:
# submodules: recursive
- name: Get esp-idf checkout hash
run: |
ESP_IDF_HASH="$(git submodule | awk '{ if ($2 == "esp-idf") print $1 }')"
echo "ESP_IDF_HASH=${ESP_IDF_HASH#"-"}" >> $GITHUB_ENV
- name: Cache esp-idf
id: cache-esp-idf
uses: actions/cache@v2
with:
path: |
.git/modules/esp-idf
esp-idf
key: ${{ runner.os }}-esp-idf-${{ env.ESP_IDF_HASH }}
- name: Checkout esp-idf
if: steps.cache-esp-idf.outputs.cache-hit != 'true'
run: git submodule update --init --recursive esp-idf
- name: Checkout dependencies
run: git submodule update --init --recursive $(git submodule | awk '{ if ($2 != "esp-idf") print $2 }')
- name: Get esp-idf release name
run: echo "ESP_RELEASE=$(git -C esp-idf describe --tags $(git -C esp-idf rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Cache .espressif
id: cache-espressif
uses: actions/cache@v2
with:
path: ~/.espressif
key: ${{ runner.os }}-espressif-${{ env.ESP_RELEASE }}
- name: Install .espressif dependencies
if: steps.cache-espressif.outputs.cache-hit != 'true'
run: ./esp-idf/install.sh
- name: Install ccache
run: DEBIAN_FRONTEND=noninteractive sudo apt install -y ccache
- name: Cache ccache
id: cache-ccache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache
- name: Build firmware
run: |
export CCACHE_MAXSIZE=400M
. export.sh
./switchconf.sh feedc0de
idf.py --ccache build
ccache -s
- name: Upload Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
name: bobbyquad_feedc0de
path: build_feedc0de/bobbyquad_feedc0de.bin
comred:
runs-on: ubuntu-latest
name: comred
steps:
- name: Checkout
uses: actions/checkout@v2
#with:
# submodules: recursive
- name: Get esp-idf checkout hash
run: |
ESP_IDF_HASH="$(git submodule | awk '{ if ($2 == "esp-idf") print $1 }')"
echo "ESP_IDF_HASH=${ESP_IDF_HASH#"-"}" >> $GITHUB_ENV
- name: Cache esp-idf
id: cache-esp-idf
uses: actions/cache@v2
with:
path: |
.git/modules/esp-idf
esp-idf
key: ${{ runner.os }}-esp-idf-${{ env.ESP_IDF_HASH }}
- name: Checkout esp-idf
if: steps.cache-esp-idf.outputs.cache-hit != 'true'
run: git submodule update --init --recursive esp-idf
- name: Checkout dependencies
run: git submodule update --init --recursive $(git submodule | awk '{ if ($2 != "esp-idf") print $2 }')
- name: Get esp-idf release name
run: echo "ESP_RELEASE=$(git -C esp-idf describe --tags $(git -C esp-idf rev-list --tags --max-count=1))" >> $GITHUB_ENV
- name: Cache .espressif
id: cache-espressif
uses: actions/cache@v2
with:
path: ~/.espressif
key: ${{ runner.os }}-espressif-${{ env.ESP_RELEASE }}
- name: Install .espressif dependencies
if: steps.cache-espressif.outputs.cache-hit != 'true'
run: ./esp-idf/install.sh
- name: Install ccache
run: DEBIAN_FRONTEND=noninteractive sudo apt install -y ccache
- name: Cache ccache
id: cache-ccache
uses: actions/cache@v2
with:
path: ~/.ccache
key: ${{ runner.os }}-ccache
- name: Build firmware
run: |
export CCACHE_MAXSIZE=400M
. export.sh
./switchconf.sh comred
idf.py --ccache build
ccache -s
- name: Upload Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
name: bobbyquad_comred
path: build_comred/bobbyquad_comred.bin

52
.gitmodules vendored
View File

@ -1,60 +1,60 @@
[submodule "src/espcpputils"]
path = components/espcpputils
url = git@github.com:0xFEEDC0DE64/espcpputils.git
[submodule "esp-idf"]
path = esp-idf
url = git@github.com:0xFEEDC0DE64/esp-idf.git
[submodule "components/cpputils"]
path = components/cpputils
url = git@github.com:0xFEEDC0DE64/cpputils.git
[submodule "components/espcpputils"]
path = components/espcpputils
url = git@github.com:0xFEEDC0DE64/espcpputils.git
url = ../../0xFEEDC0DE64/espcpputils.git
[submodule "esp-idf"]
path = esp-idf
url = ../../0xFEEDC0DE64/esp-idf.git
[submodule "components/cpputils"]
path = components/cpputils
url = ../../0xFEEDC0DE64/cpputils.git
[submodule "components/espcpputils"]
path = components/espcpputils
url = ../../0xFEEDC0DE64/espcpputils.git
[submodule "components/cxx-ring-buffer"]
path = components/cxx-ring-buffer
url = git@github.com:0xFEEDC0DE64/cxx-ring-buffer.git
url = ../../0xFEEDC0DE64/cxx-ring-buffer.git
[submodule "components/date"]
path = components/date
url = git@github.com:0xFEEDC0DE64/date.git
url = ../../0xFEEDC0DE64/date.git
[submodule "components/espchrono"]
path = components/espchrono
url = git@github.com:0xFEEDC0DE64/espchrono.git
url = ../../0xFEEDC0DE64/espchrono.git
[submodule "components/ArduinoJson"]
path = components/ArduinoJson
url = git@github.com:0xFEEDC0DE64/ArduinoJson.git
url = ../../0xFEEDC0DE64/ArduinoJson.git
[submodule "components/TFT_eSPI"]
path = components/TFT_eSPI
url = git@github.com:0xFEEDC0DE64/TFT_eSPI.git
url = ../../0xFEEDC0DE64/TFT_eSPI.git
[submodule "components/arduino-esp32"]
path = components/arduino-esp32
url = git@github.com:0xFEEDC0DE64/arduino-esp32.git
url = ../../0xFEEDC0DE64/arduino-esp32.git
[submodule "components/expected"]
path = components/expected
url = git@github.com:0xFEEDC0DE64/expected.git
url = ../../0xFEEDC0DE64/expected.git
[submodule "components/bobbycar-protocol"]
path = components/bobbycar-protocol
url = git@github.com:bobbycar-graz/bobbycar-protocol.git
url = ../../bobbycar-graz/bobbycar-protocol.git
[submodule "components/fmt"]
path = components/fmt
url = git@github.com:0xFEEDC0DE64/fmt.git
url = ../../0xFEEDC0DE64/fmt.git
[submodule "components/espwifistack"]
path = components/espwifistack
url = git@github.com:0xFEEDC0DE64/espwifistack.git
url = ../../0xFEEDC0DE64/espwifistack.git
[submodule "components/esp-nimble-cpp"]
path = components/esp-nimble-cpp
url = git@github.com:0xFEEDC0DE64/esp-nimble-cpp.git
url = ../../0xFEEDC0DE64/esp-nimble-cpp.git
[submodule "components/espasyncota"]
path = components/espasyncota
url = git@github.com:0xFEEDC0DE64/espasyncota.git
url = ../../0xFEEDC0DE64/espasyncota.git
[submodule "components/esphttpdutils"]
path = components/esphttpdutils
url = git@github.com:0xFEEDC0DE64/esphttpdutils.git
url = ../../0xFEEDC0DE64/esphttpdutils.git
[submodule "components/espasynchttpreq"]
path = components/espasynchttpreq
url = git@github.com:0xFEEDC0DE64/espasynchttpreq.git
url = ../../0xFEEDC0DE64/espasynchttpreq.git
[submodule "components/FastLED-idf"]
path = components/FastLED-idf
url = git@github.com:0xFEEDC0DE64/FastLED-idf.git
url = ../../0xFEEDC0DE64/FastLED-idf.git
[submodule "components/esp-gui-lib"]
path = components/esp-gui-lib
url = git@github.com:0xFEEDC0DE64/esp-gui-lib.git
url = ../../0xFEEDC0DE64/esp-gui-lib.git