Skip to content

Commit

Permalink
Enable automatic build and release (#408)
Browse files Browse the repository at this point in the history
* Enable automatic release CI
* Use latest workflows
  • Loading branch information
eandersson authored Oct 11, 2024
1 parent ba8d0ee commit d3dd63c
Show file tree
Hide file tree
Showing 3 changed files with 121 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-target
name: Build Firmware
on: [push, pull_request]
jobs:
build:
Expand All @@ -9,9 +9,9 @@ jobs:
with:
submodules: 'recursive'
- name: Setup Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
- name: Build web dist
working-directory: ./main/http_server/axe-os
run: |
Expand All @@ -24,10 +24,10 @@ jobs:
target: esp32s3
command: GITHUB_ACTIONS="true" idf.py build
path: '.'
- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
cache: 'pip' # caching pip dependencies
python-version: '3.10'
cache: 'pip'
- run: pip install esptool
- name: "Create factory/merged image"
run: "./merge_bin.sh ./esp-miner-merged.bin"
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/release-factory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build & Release Factory Images
on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest
name: "Factory ${{ matrix.build_type }}"
strategy:
fail-fast: false
matrix:
build_type: ["102", "202", "204", "401", "402", "403", "601"]
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Build web dist
working-directory: ./main/http_server/axe-os
run: |
npm ci
npm run build
- name: esp-idf build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.3.1
target: esp32s3
command: GITHUB_ACTIONS="true" idf.py build
path: '.'
- name: "esp-idf build factory config for ${{ matrix.build_type }}"
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.3.1
target: esp32s3
command: /opt/esp/idf/components/nvs_flash/nvs_partition_generator/nvs_partition_gen.py generate config-${{ matrix.build_type }}.cvs config.bin 0x6000
path: '.'
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install esptool
- name: "Create factory image for ${{ matrix.build_type }}-${{ github.ref_name }}"
run: "./merge_bin.sh -c esp-miner-factory-${{ matrix.build_type }}-${{ github.ref_name }}.bin"
- name: Release esp-miner.bin
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: "esp-miner-factory-${{ matrix.build_type }}-${{ github.ref_name }}.bin"
61 changes: 61 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build & Release Firmware
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Build web dist
working-directory: ./main/http_server/axe-os
run: |
npm ci
npm run build
- name: esp-idf build
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.3.1
target: esp32s3
command: GITHUB_ACTIONS="true" idf.py build
path: '.'
- uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- run: pip install esptool
- name: "Create factory/merged image"
run: "./merge_bin.sh ./esp-miner-merged.bin"
- name: upload esp-miner-merged.bin
uses: actions/upload-artifact@v3
with:
name: esp-miner-factory.bin
path: ./esp-miner-merged.bin
- name: upload esp-miner.bin
uses: actions/upload-artifact@v3
with:
name: esp-miner.bin
path: ./build/esp-miner.bin
- name: upload www.bin
uses: actions/upload-artifact@v3
with:
name: www.bin
path: ./build/www.bin
- name: Release www.bin
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/www.bin
- name: Release esp-miner.bin
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./build/esp-miner.bin

0 comments on commit d3dd63c

Please sign in to comment.