aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ports_esp32.yml
blob: 45808b659add754d98fa2f7c68200867f599671e (plain)
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
name: esp32 port

on:
  push:
  pull_request:
    paths:
      - '.github/workflows/*.yml'
      - 'tools/**'
      - 'py/**'
      - 'extmod/**'
      - 'shared/**'
      - 'lib/**'
      - 'drivers/**'
      - 'ports/esp32/**'

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build_idf:
    strategy:
      fail-fast: false
      matrix:
        ci_func:  # names are functions in ci.sh
          - esp32_build_cmod_spiram_s2
          - esp32_build_s3_c3
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v4

    - id: idf_ver
      name: Read the ESP-IDF version
      run: source tools/ci.sh && echo "IDF_VER=$IDF_VER" | tee "$GITHUB_OUTPUT"

    - name: Cached ESP-IDF install
      id: cache_esp_idf
      uses: actions/cache@v4
      with:
        path: |
          ./esp-idf/
          ~/.espressif/
          !~/.espressif/dist/
          ~/.cache/pip/
        key: esp-idf-${{ steps.idf_ver.outputs.IDF_VER }}

    - name: Install ESP-IDF packages
      if: steps.cache_esp_idf.outputs.cache-hit != 'true'
      run: source tools/ci.sh && ci_esp32_idf_setup

    - name: ccache
      uses: hendrikmuhs/ccache-action@v1.2
      with:
        key: esp32-${{ matrix.ci_func }}

    - name: Build ci_${{matrix.ci_func }}
      run: source tools/ci.sh && ci_${{ matrix.ci_func }}