Skip to content

Commit

Permalink
ci(qemu): Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed May 9, 2024
1 parent 48cc4b7 commit bfb3a38
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/on-push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ elif [ "$CHUNK_INDEX" -eq "$CHUNKS_CNT" ]; then
BUILD_PIO=1
fi

if [ "$BUILD_LOG" -le 0 ]; then
if [ -z "$BUILD_LOG" ] || [ "$BUILD_LOG" -le 0 ]; then
BUILD_LOG=0
fi

Expand Down
17 changes: 7 additions & 10 deletions .github/workflows/hil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,9 @@ jobs:
~/.arduino/tests/**/build*.tmp/*.elf
~/.arduino/tests/**/build*.tmp/*.json
wokwi-test:
qemu-test:
needs: [gen_chunks, build]
if: github.event_name == 'schedule'
name: ${{matrix.chip}}-Wokwi_Test#${{matrix.chunks}}
name: ${{matrix.chip}}-QEMU_Test#${{matrix.chunks}}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -118,7 +117,7 @@ jobs:
path: |
~/qemu
~/.cache/pip
key: ${{ steps.get-qemu-version.outputs.release }}-${{ hashFiles('.github/workflows/hil.yml') }}
key: qemu-${{ steps.get-qemu-version.outputs.release }}-${{ hashFiles('.github/workflows/hil.yml') }}

- name: Install dependencies
run: |
Expand Down Expand Up @@ -154,11 +153,10 @@ jobs:
name: qemu_results-${{matrix.chip}}-${{matrix.chunks}}
path: tests/*/*.xml

hardware-test:
wokwi-test:
needs: [gen_chunks, build]
name: ${{matrix.chip}}-Hardware_Test#${{matrix.chunks}}
if: |
contains(github.event.pull_request.labels.*.name, 'hil_test') || github.event_name == 'schedule'
if: github.event_name == 'schedule'
name: ${{matrix.chip}}-Wokwi_Test#${{matrix.chunks}}
strategy:
fail-fast: false
matrix:
Expand All @@ -174,7 +172,7 @@ jobs:
with:
name: ${{matrix.chip}}-${{matrix.chunks}}.artifacts
path: ~/

- name: Install Wokwi CLI
run: curl -L https://wokwi.com/ci/install.sh | sh

Expand Down Expand Up @@ -274,4 +272,3 @@ jobs:
with:
name: Event File
path: ${{github.event_path}}

8 changes: 1 addition & 7 deletions platform.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,8 @@ recipe.hooks.objcopy.postobjcopy.1.pattern.windows=cmd /c if exist "{build.path}
recipe.hooks.objcopy.postobjcopy.2.pattern=/usr/bin/env bash -c "[ ! -d "{build.path}"/libraries/ESP_SR ] || [ ! -f "{compiler.sdk.path}"/esp_sr/srmodels.bin ] || cp -f "{compiler.sdk.path}"/esp_sr/srmodels.bin "{build.path}"/srmodels.bin"
recipe.hooks.objcopy.postobjcopy.2.pattern.windows=cmd /c if exist "{build.path}\libraries\ESP_SR" if exist "{compiler.sdk.path}\esp_sr\srmodels.bin" COPY /y "{compiler.sdk.path}\esp_sr\srmodels.bin" "{build.path}\srmodels.bin"

## Create flash_args file
flash_args.path={build.path}/flash_args
recipe.hooks.objcopy.postobjcopy.3.pattern_args=(echo --fill-flash-size {build.flash_size} --flash_mode keep --flash_freq keep --flash_size keep; echo {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin"; echo 0x8000 "{build.path}/{build.project_name}.partitions.bin"; echo 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin"; echo 0x10000 "{build.path}/{build.project_name}.bin") > "{flash_args.path}"
recipe.hooks.objcopy.postobjcopy.3.pattern=/usr/bin/env bash -c "{recipe.hooks.objcopy.postobjcopy.3.pattern_args}"
recipe.hooks.objcopy.postobjcopy.3.pattern.windows=cmd /c {recipe.hooks.objcopy.postobjcopy.3.pattern_args}

# Create merged binary
recipe.hooks.objcopy.postobjcopy.4.pattern_args=--chip {build.mcu} merge_bin -o "{build.path}/{build.project_name}.merged.bin" "@{flash_args.path}"
recipe.hooks.objcopy.postobjcopy.4.pattern_args=--chip {build.mcu} merge_bin -o "{build.path}/{build.project_name}.merged.bin" --fill-flash-size {build.flash_size} --flash_mode keep --flash_freq keep --flash_size keep {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0x10000 "{build.path}/{build.project_name}.bin"
recipe.hooks.objcopy.postobjcopy.4.pattern="{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.hooks.objcopy.postobjcopy.4.pattern_args}
recipe.hooks.objcopy.postobjcopy.4.pattern.linux=python3 "{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.hooks.objcopy.postobjcopy.4.pattern_args}

Expand Down

0 comments on commit bfb3a38

Please sign in to comment.