diff options
author | Ancyker <[email protected]> | 2024-06-02 11:56:08 -0400 |
---|---|---|
committer | Ancyker <[email protected]> | 2024-06-02 11:56:08 -0400 |
commit | 2b01f7fc4dbbd66f3575c02fd8cf899c7aad50fe (patch) | |
tree | 97e5dfc17881c51a4cfd6a060d3c8529cf05ddba /.github/workflows | |
parent | 740c2698bccb22d2840ab925a2bd21f8c025e9e1 (diff) | |
download | cartreader-2b01f7fc4dbbd66f3575c02fd8cf899c7aad50fe.tar.gz cartreader-2b01f7fc4dbbd66f3575c02fd8cf899c7aad50fe.zip |
Add checks for unsafe configurations
* Fixes #929
* Updated `ci.yml` to define `GITHUB_CI`
* Compilation will now error if VSELECT is enabled on hardware versions that don't support it (any version other than HW5).
* HW4 and SERIAL might work but are untested. The error message for these versions reflects this.
* Erroring when unsafe configurations are defined can be overridden by defining `ALLOW_UNSAFE_CONFIG` which will throw a warning instead.
* This should only be done if trying to implement or test on a currently unsupported platform.
* If both `GITHUB_CI` and `ALLOW_UNSAFE_CONFIG` are defined an error will be thrown causing the CI tests to fail. This is just in case someone makes a commit with it defined.
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/ci.yml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9217980..bdda3e0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,4 +47,4 @@ jobs: cd Cart_Reader/ # Select hardware version by uncommenting it (using regular expression) sed -i 's/^\/\/[\t ]*#define ${{ matrix.hwVersion }}/#define ${{ matrix.hwVersion }}/g' Config.h - arduino-cli compile --fqbn arduino:avr:mega --warnings all + arduino-cli compile --fqbn arduino:avr:mega --warnings all --build-property compiler.cpp.extra_flags="-DGITHUB_CI" |