Update .gitea/workflows/ci.yml #8
+22
-6
@@ -13,11 +13,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- name: Install host toolchain
|
||||||
|
if: hashFiles('tests/host/CMakeLists.txt') != ''
|
||||||
|
run: |
|
||||||
|
export DEBIAN_FRONTEND=noninteractive && \
|
||||||
|
if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" -ne 0 ]; then SUDO=sudo; else SUDO=; fi && \
|
||||||
|
$SUDO apt-get update && \
|
||||||
|
$SUDO apt-get install -y --no-install-recommends cmake gcc g++ make
|
||||||
- name: Host unit tests
|
- name: Host unit tests
|
||||||
if: hashFiles('tests/host/CMakeLists.txt') != ''
|
if: hashFiles('tests/host/CMakeLists.txt') != ''
|
||||||
run: |
|
run: |
|
||||||
cmake -S tests/host -B build/host
|
cmake -S tests/host -B build/host && \
|
||||||
cmake --build build/host
|
cmake --build build/host && \
|
||||||
ctest --test-dir build/host --output-on-failure
|
ctest --test-dir build/host --output-on-failure
|
||||||
|
|
||||||
firmware:
|
firmware:
|
||||||
@@ -36,17 +43,25 @@ jobs:
|
|||||||
target: esp32s3
|
target: esp32s3
|
||||||
sdkconfig: sdkconfig.s3
|
sdkconfig: sdkconfig.s3
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install Node.js
|
||||||
|
run: |
|
||||||
|
export DEBIAN_FRONTEND=noninteractive && \
|
||||||
|
if command -v sudo >/dev/null 2>&1 && [ "$(id -u)" -ne 0 ]; then SUDO=sudo; else SUDO=; fi && \
|
||||||
|
$SUDO apt-get update && \
|
||||||
|
$SUDO apt-get install -y --no-install-recommends curl ca-certificates && \
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x | $SUDO bash - && \
|
||||||
|
$SUDO apt-get install -y --no-install-recommends nodejs
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
if: hashFiles('CMakeLists.txt') != ''
|
if: hashFiles('CMakeLists.txt') != ''
|
||||||
run: |
|
run: |
|
||||||
git config --global --add safe.directory '*'
|
git config --global --add safe.directory '*' && \
|
||||||
idf.py -B build/${{ matrix.board }} set-target ${{ matrix.target }}
|
idf.py -B build/${{ matrix.board }} set-target ${{ matrix.target }} && \
|
||||||
idf.py -B build/${{ matrix.board }} \
|
idf.py -B build/${{ matrix.board }} \
|
||||||
-D SDKCONFIG_DEFAULTS="sdkconfig.defaults;${{ matrix.sdkconfig }}" \
|
-D SDKCONFIG_DEFAULTS="sdkconfig.defaults;${{ matrix.sdkconfig }}" \
|
||||||
-D AUTOFILM_BOARD=${{ matrix.board }} \
|
-D AUTOFILM_BOARD=${{ matrix.board }} \
|
||||||
build
|
build && \
|
||||||
idf.py -B build/${{ matrix.board }} size | tee size-${{ matrix.board }}.txt
|
idf.py -B build/${{ matrix.board }} size | tee size-${{ matrix.board }}.txt && \
|
||||||
python $IDF_PATH/components/esptool_py/esptool/esptool.py \
|
python $IDF_PATH/components/esptool_py/esptool/esptool.py \
|
||||||
--chip ${{ matrix.target }} merge_bin \
|
--chip ${{ matrix.target }} merge_bin \
|
||||||
-o autofilm-${{ matrix.board }}-${{ gitea.sha }}.bin \
|
-o autofilm-${{ matrix.board }}-${{ gitea.sha }}.bin \
|
||||||
@@ -63,3 +78,4 @@ jobs:
|
|||||||
build/${{ matrix.board }}/flasher_args.json
|
build/${{ matrix.board }}/flasher_args.json
|
||||||
build/${{ matrix.board }}/sdkconfig
|
build/${{ matrix.board }}/sdkconfig
|
||||||
size-${{ matrix.board }}.txt
|
size-${{ matrix.board }}.txt
|
||||||
|
|
||||||
Reference in New Issue
Block a user