test #258
Workflow file for this run
This file contains hidden or 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
name: Runtime Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: [opened, reopened, synchronize, labeled, unlabeled] | |
paths: | |
- '.github/workflows/tests.yml' | |
- '.github/workflows/build_tests.yml' | |
- '.github/workflows/hw.yml' | |
- '.github/workflows/qemu.yml' | |
- '.github/workflows/wokwi.yml' | |
- '.github/workflows/tests_publish.yml' | |
- '.github/scripts/*.sh' | |
- '!.github/scripts/check-cmakelists.sh' | |
- '!.github/scripts/find_*' | |
- '!.github/scripts/on-*.sh' | |
- '!.github/scripts/set_push_chunks.sh' | |
- '!.github/scripts/update-version.sh' | |
- '!.github/scripts/upload_py_tools.sh' | |
- 'tests/**' | |
- 'cores/**' | |
- 'libraries/**' | |
- '!libraries/**.md' | |
- '!libraries/**.txt' | |
- '!libraries/**.properties' | |
- 'package/**' | |
schedule: | |
- cron: '0 2 * * *' | |
concurrency: | |
group: tests-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
push-event-file: | |
name: Push event file | |
runs-on: ubuntu-latest | |
steps: | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: event_file | |
path: ${{ github.event_path }} | |
gen-matrix: | |
name: Generate matrix | |
runs-on: ubuntu-latest | |
outputs: | |
build-types: ${{ steps.set-matrix.outputs.build-types }} | |
hw-types: ${{ steps.set-matrix.outputs.hw-types }} | |
wokwi-types: ${{ steps.set-matrix.outputs.wokwi-types }} | |
qemu-types: ${{ steps.set-matrix.outputs.qemu-types }} | |
steps: | |
- name: Set matrix | |
id: set-matrix | |
run: | | |
build_types='["validation"' | |
hw_types='["validation"' | |
wokwi_types='["validation"' | |
qemu_types='["validation"' | |
is_pr=${{ github.event.pull_request.number != null }} | |
is_performance_enabled=${{ contains(github.event.pull_request.labels.*.name, 'perf_test') }} | |
if [[ $is_pr != 'true' ]] || [[ $is_performance_enabled == 'true' ]]; then | |
build_types+=',"performance"' | |
hw_types+=',"performance"' | |
#wokwi_types+=',"performance"' | |
#qemu_types+=',"performance"' | |
fi | |
echo "build-types=$build_types]" >> $GITHUB_OUTPUT | |
echo "hw-types=$hw_types]" >> $GITHUB_OUTPUT | |
echo "wokwi-types=$wokwi_types]" >> $GITHUB_OUTPUT | |
echo "qemu-types=$qemu_types]" >> $GITHUB_OUTPUT | |
call-build-tests: | |
name: Build | |
uses: ./.github/workflows/build_tests.yml | |
needs: gen-matrix | |
strategy: | |
matrix: | |
type: ${{ fromJson(needs.gen-matrix.outputs.build-types) }} | |
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'] | |
with: | |
type: ${{ matrix.type }} | |
chip: ${{ matrix.chip }} | |
# Wokwi tests are run after this workflow as it needs access to secrets | |
call-hardware-tests: | |
name: Hardware | |
uses: ./.github/workflows/hw.yml | |
needs: [gen-matrix, call-build-tests] | |
if: | | |
github.repository == 'espressif/arduino-esp32' && | |
(github.event_name != 'pull_request' || | |
contains(github.event.pull_request.labels.*.name, 'hil_test')) | |
strategy: | |
fail-fast: false | |
matrix: | |
type: ${{ fromJson(needs.gen-matrix.outputs.hw-types) }} | |
chip: ['esp32', 'esp32s2', 'esp32s3', 'esp32c3', 'esp32c6', 'esp32h2'] | |
with: | |
type: ${{ matrix.type }} | |
chip: ${{ matrix.chip }} | |
# This job is disabled for now | |
call-qemu-tests: | |
name: QEMU | |
uses: ./.github/workflows/qemu.yml | |
needs: [gen-matrix, call-build-tests] | |
if: false | |
strategy: | |
fail-fast: false | |
matrix: | |
type: ${{ fromJson(needs.gen-matrix.outputs.qemu-types) }} | |
chip: ['esp32', 'esp32c3'] | |
with: | |
type: ${{ matrix.type }} | |
chip: ${{ matrix.chip }} | |
# clean: | |
# name: Clean objects | |
# if: always() | |
# permissions: | |
# actions: write | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Clean up caches | |
# uses: actions/github-script@v7 | |
# with: | |
# script: | | |
# const ref = '${{ github.event.pull_request.number || github.ref }}'; | |
# const key_prefix = 'tests-' + ref + '-'; | |
# if ('${{ github.event_name }}' == 'pull_request_target' && '${{ github.event.action }}' != 'closed') { | |
# console.log('Skipping cache cleanup for open PR'); | |
# return; | |
# } | |
# await github.paginate(github.rest.actions.getActionsCacheList, { | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# per_page: 100, | |
# key: key_prefix | |
# }).then(caches => { | |
# if (caches) { | |
# for (const cache of caches) { | |
# console.log(`Deleting cache: ${cache.key}`); | |
# github.rest.actions.deleteActionsCacheById({ | |
# owner: context.repo.owner, | |
# repo: context.repo.repo, | |
# cache_id: cache.id | |
# }); | |
# } | |
# } | |
# }); |