-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26899fb
commit 38e2aa1
Showing
10 changed files
with
222 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[codespell] | ||
ignore-words-list = bloc,ser,dout,exten | ||
write-changes = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[tool.commitizen] | ||
version = "0.0.0" | ||
update_changelog_on_bump = true | ||
tag_format = "v$version" | ||
changelog_start_rev = "v0.0" | ||
changelog_merge_prerelease = true | ||
annotated_tag = true | ||
bump_message = "change: Update version to $new_version" | ||
change_type_order = [ | ||
"BREAKING CHANGE", | ||
"New Features", | ||
"Bug Fixes", | ||
"Code Refactoring", | ||
"Performance Improvements" | ||
] | ||
|
||
[tool.commitizen.change_type_map] | ||
feat = "New Features" | ||
fix = "Bug Fixes" | ||
refactor = "Code Refactoring" | ||
perf = "Performance Improvements" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Build and release | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build_stubs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout ref commit | ||
uses: actions/checkout@master | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install esptool | ||
- name: Build stub | ||
run: | | ||
export TOOLCHAIN_DIR=$HOME/toolchain | ||
export ESP8266_BINDIR=$TOOLCHAIN_DIR/xtensa-lx106-elf/bin | ||
export ESP32_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32-elf/bin | ||
export ESP32S2_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32s2-elf/bin | ||
export ESP32S3_BINDIR=$TOOLCHAIN_DIR/xtensa-esp32s3-elf/bin | ||
export ESP32C3_BINDIR=$TOOLCHAIN_DIR/riscv32-esp-elf/bin | ||
export PATH=$PATH:$ESP8266_BINDIR:$ESP32_BINDIR:$ESP32S2_BINDIR:$ESP32S3_BINDIR:$ESP32C3_BINDIR | ||
./ci/setup_ci_build_env.sh | ||
make -C flasher_stub V=1 | ||
- name: Upload stub JSONs | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
path: flasher_stub/build/esp*.json | ||
if-no-files-found: error | ||
retention-days: 3 | ||
|
||
create_release: | ||
name: Create GitHub release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Get version | ||
id: get_version | ||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install --user commitizen | ||
- name: Generate changelog | ||
run: | | ||
cz changelog ${{ steps.get_version.outputs.VERSION }} --template ci/gh_changelog_template.md.j2 --file-name changelog_body.md | ||
cat changelog_body.md | ||
- name: Download stub JSONs | ||
uses: actions/download-artifact@v4 | ||
- name: Create release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
body_path: changelog_body.md | ||
name: Version ${{ steps.get_version.outputs.VERSION }} | ||
draft: true | ||
prerelease: false | ||
files: esp*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Checks | ||
|
||
on: [push] | ||
|
||
jobs: | ||
checks: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@master | ||
with: | ||
python-version: 3.12 | ||
|
||
- name: Run pre-commit hooks | ||
run: | | ||
pip install pre-commit | ||
pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
flasher_stub/build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
repos: | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.5 | ||
hooks: | ||
- id: codespell | ||
- repo: https://github.com/espressif/conventional-precommit-linter | ||
rev: v1.4.0 | ||
hooks: | ||
- id: conventional-precommit-linter | ||
stages: [commit-msg] | ||
default_stages: [commit] | ||
default_install_hook_types: [pre-commit, commit-msg] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{# This changelog template is used for automatically generated GH release notes. #} | ||
{# It is passed to commitizen's --template option in a GH Actions workflow run. #} | ||
|
||
{% for entry in tree %} | ||
|
||
{% for change_key, changes in entry.changes.items() %} | ||
|
||
{% if change_key %} | ||
### {{ change_key }} | ||
{% endif %} | ||
|
||
{% for change in changes %} | ||
{% if change.scope %} | ||
- **{{ change.scope }}**: {{ change.message }} | ||
{% elif change.message %} | ||
- {{ change.message }} | ||
{% endif %} | ||
{% endfor %} | ||
{% endfor %} | ||
{% endfor %} | ||
|
||
Thanks to <FILL OUT CONTRIBUTORS>, and others for contributing to this release! | ||
|
||
# Results of checking the release against common anti-virus SW | ||
|
||
<Upload the release binaries to VirusTotal and ADD a link to the report here> | ||
|
||
The failures are probably false positives. You can mark esptool as safe in your anti-virus SW, or [install esptool from source](https://docs.espressif.com/projects/esptool/en/latest/installation.html). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
set -exuo pipefail | ||
|
||
ESP8266_TOOLCHAIN_URL="https://dl.espressif.com/dl/xtensa-lx106-elf-linux64-1.22.0-92-g8facf4c-5.2.0.tar.gz" | ||
ESP32_TOOLCHAIN_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1/xtensa-esp32-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz" | ||
ESP32S2_TOOLCHAIN_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1/xtensa-esp32s2-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz" | ||
ESP32S3_TOOLCHAIN_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1/xtensa-esp32s3-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz" | ||
ESP32C3_TOOLCHAIN_URL="https://github.com/espressif/crosstool-NG/releases/download/esp-2022r1/riscv32-esp-elf-gcc11_2_0-esp-2022r1-linux-amd64.tar.xz" | ||
|
||
# Setup shell script to download & configure ESP8266 & ESP32 toolchains | ||
# for building the flasher stub program | ||
|
||
mkdir -p ${TOOLCHAIN_DIR} | ||
cd ${TOOLCHAIN_DIR} | ||
|
||
if ! [ -d ${ESP8266_BINDIR} ]; then | ||
wget --continue --no-verbose "${ESP8266_TOOLCHAIN_URL}" | ||
tar zxf $(basename ${ESP8266_TOOLCHAIN_URL}) | ||
fi | ||
|
||
if ! [ -d ${ESP32_BINDIR} ]; then | ||
# gitlab CI image may already have this file | ||
wget --continue --no-verbose "${ESP32_TOOLCHAIN_URL}" | ||
tar Jxf $(basename ${ESP32_TOOLCHAIN_URL}) | ||
fi | ||
|
||
if ! [ -d ${ESP32S2_BINDIR} ]; then | ||
# gitlab CI image may already have this file | ||
wget --continue --no-verbose "${ESP32S2_TOOLCHAIN_URL}" | ||
tar Jxf $(basename ${ESP32S2_TOOLCHAIN_URL}) | ||
fi | ||
|
||
if ! [ -d ${ESP32S3_BINDIR} ]; then | ||
# gitlab CI image may already have this file | ||
wget --continue --no-verbose "${ESP32S3_TOOLCHAIN_URL}" | ||
tar Jxf $(basename ${ESP32S3_TOOLCHAIN_URL}) | ||
fi | ||
|
||
if ! [ -d ${ESP32C3_BINDIR} ]; then | ||
# gitlab CI image may already have this file | ||
wget --continue --no-verbose "${ESP32C3_TOOLCHAIN_URL}" | ||
tar Jxf $(basename ${ESP32C3_TOOLCHAIN_URL}) | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.