Lots of improvements of actions

This commit is contained in:
2021-09-19 01:09:05 +02:00
parent f19e6b8a9e
commit 2992cbb613

View File

@ -16,57 +16,28 @@ jobs:
matrix:
node: [feedc0de, comred]
steps:
- name: Checkout
- name: Checkout (without submodules)
uses: actions/checkout@v2
- 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: Checkout and install esp-idf
uses: 0xFEEDC0DE64/checkout_install_esp_idf@main
- name: Cache esp-idf
id: cache-esp-idf
uses: actions/cache@v2
- name: Fast Submodule Checkout components/arduino-esp32
uses: 0xFEEDC0DE64/fast_submodule_checkout@main
with:
path: |
.git/modules/esp-idf
esp-idf
key: ${{ runner.os }}-esp-idf-${{ env.ESP_IDF_HASH }}
submodule: components/arduino-esp32
- name: Checkout esp-idf
if: steps.cache-esp-idf.outputs.cache-hit != 'true'
run: git submodule update --init --recursive esp-idf
- name: Checkout remaining submodules
run: git submodule update --init --recursive $(git submodule | awk '{ if ($2 != "esp-idf" && $2 != "components/arduino-esp32") print $2 }')
- 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
- name: Setup ccache
uses: 0xFEEDC0DE64/setup_ccache@main
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
key: ${{ runner.os }}-ccache-${{ matrix.node }}
- name: Build firmware
run: |
export CCACHE_MAXSIZE=400M
export CCACHE_MAXSIZE=400M CCACHE_BASEDIR="$(pwd)"
. export.sh
./switchconf.sh ${{ matrix.node }}
idf.py --ccache build