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