Skip to content

Commit

Permalink
Updates the action to version 2, build step removed
Browse files Browse the repository at this point in the history
  • Loading branch information
CalinRadoni committed Oct 13, 2020
1 parent b945a78 commit f5b6285
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 39 deletions.
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ESP32 build - ESP-IDF v4.x
# ESP-IDF v4.x installer

GitHub Action to build your ESP32 code with Espressif IoT Development Framework v4.x
GitHub Action to install Espressif IoT Development Framework v4.x for building ESP32 code.

The usable ESP-IDF versions are:

Expand All @@ -13,33 +13,50 @@ The usable ESP-IDF versions are:

## Usage

Source the ESP-IDF required environment variables before building your code:

```sh
source ~/esp/esp-idf/export.sh
idf.py build
```

It is used at least in [ESP32HAL](https://github.com/CalinRadoni/ESP32HAL) repository.

### Example

```yml
name: ESP32 Builder

on: [push]

jobs:
builder:
name: Builder for test project
name: Builder for test ESP32 project
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Build
uses: CalinRadoni/esp-idf-v4-action@v1
- name: Install ESP-IDF
uses: CalinRadoni/esp-idf-v4-action@v2
with:
esp_idf_version: 'v4.1'
src_directory: '.'

- name: Build
run: |
source ~/esp/esp-idf/export.sh
idf.py reconfigure
idf.py app
idf.py size
```
## About
It was tested in the official Ubuntu Focal Docker container and it contains some minor extra steps not really needed for the GitHub-hosted Ubuntu 20.04 LTS runner, like the installation of `tzdata` and `python3-libusb1`. I left them for completeness if more tests are needed.

Version 2 of this action does not build the ESP32 code, like version 1 has done it, to allow custom build steps.

## License

This repository is licensed with the [MIT License](LICENSE).
14 changes: 2 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'ESP32 build - ESP-IDF v4'
description: 'GitHub Action to build your ESP32 code with Espressif IoT Development Framework v4.x'
name: 'ESP-IDF v4.x installer'
description: 'GitHub Action to install Espressif IoT Development Framework v4.x for building ESP32 code.'

branding:
icon: check
Expand All @@ -10,19 +10,9 @@ inputs:
description: 'Required ESP-IDF version (v4.1, release/v4.2, ...)'
required: false
default: 'v4.1'
src_directory:
description: 'The directory with source code'
required: false
default: '.'
idf_reconfigure:
description: 'Run the `idf.py reconfigure` command'
required: false
default: 'true'

runs:
using: "composite"
steps:
- run: ${{ github.action_path }}/install.sh ${{ inputs.esp_idf_version }}
shell: bash
- run: ${{ github.action_path }}/build.sh ${{ inputs.esp_idf_version }} ${{ inputs.src_directory }} ${{ inputs.idf_reconfigure }}
shell: bash
21 changes: 0 additions & 21 deletions build.sh

This file was deleted.

0 comments on commit f5b6285

Please sign in to comment.