Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wokwi CI - esp32-simtest.yaml #1308

Open
wants to merge 1 commit into
base: release-0.6
Choose a base branch
from

Conversation

petermm
Copy link
Contributor

@petermm petermm commented Oct 9, 2024

NB:
The WOKWI_CLI_TOKEN (obtained here https://wokwi.com/dashboard/ci) needs to be set in the Repository secrets eg: Settings -> Actions secrets and variables.

Runs the esp32 tests across 7 targets/models and 3 esp-idf versions.

A limited test scope (latest esp-idf only) is the default unless the PR title contains "full_sim_test" or the last commit message contains it in title or body.

Includes the wifi_example test on boards with wifi.
The esp32 board has a SPI SD card attached and tests are run against it ("test_file.beam").
For PR brevity the test_mount (sdmmc test), is not yet adapted for sdspi testing.
Likewise each board has potentiometer attached, for ADC testing - for PR brevity tests are not included.
One can easily implement uart/i2c etc tests in the future, and massively improve CI coverage.

Requires a WOKWI_CLI_TOKEN obtained here: https://wokwi.com/dashboard/ci - will gracefully handle it's absence.

Includes readme for running from local install.

Exercises the release build config, for largest coverage:

CONFIG_COMPILER_OPTIMIZATION_PERF=y
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y

full_sim_test: https://github.com/petermm/AtomVM/actions/runs/11274530437
Screenshot 2024-10-09 at 23 10 50

These changes are made under both the "Apache 2.0" and the "GNU Lesser General
Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

@petermm petermm force-pushed the wokwi-ci branch 5 times, most recently from c190107 to 89dabf4 Compare October 10, 2024 12:59
Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer keeping a new line at the end of files to avoid annoying warnings + just few other minor comments.

src/platforms/esp32/test/sdkconfig.ci.wokwi Outdated Show resolved Hide resolved
.github/workflows/esp32-simtest.yaml Show resolved Hide resolved
.github/workflows/esp32-simtest.yaml Outdated Show resolved Hide resolved
@petermm petermm force-pushed the wokwi-ci branch 2 times, most recently from a4f3f4b to 3551c67 Compare October 11, 2024 06:16
@petermm
Copy link
Contributor Author

petermm commented Oct 11, 2024

All resolved, @bettio you just need to add the WOKWI_CLI_TOKEN to repository secrets (Settings -> Actions secrets and variables.) (get token here https://wokwi.com/dashboard/ci) so the job is not skipped ;-)

https://github.com/atomvm/AtomVM/actions/runs/11287326708/job/31393099478?pr=1308

@bettio
Copy link
Collaborator

bettio commented Oct 11, 2024

I'm not sure it is working.
Screenshot_20241011_215933

Also let's make sure that the token will not be displayed on CI output.

Copy link
Collaborator

@bettio bettio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll leave this on hold. I'm not yet 100% sure it will work, I will defer this after v0.6.5.

@petermm
Copy link
Contributor Author

petermm commented Oct 12, 2024

No rush..

Should just work if WOKWI_CLI_TOKEN is set here https://github.com/atomvm/AtomVM/settings/secrets/actions (Repository secrets)

And the token is not displayed during CI see https://github.com/petermm/AtomVM/actions/runs/11274530437/job/31353894949

runs the esp32 tests across 7 targets/models and 3 esp-idf versions. Includes the wifi_example test.

A limited test scope (latest esp-idf only) is the default unless the PR title contains "full_sim_test" or the last commit message contains it in title or body.

Signed-off-by: Peter M <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants