Improve MicroPython compatibility #114
This file contains 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: CI | |
on: [push, pull_request] | |
jobs: | |
tests: | |
name: "Python ${{ matrix.python-version }}" | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | |
steps: | |
- name: Install dependencies | |
run: sudo apt-get install -y gcc-avr avr-libc simulavr | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Compile C library | |
run: | | |
gcc --std=c90 -pedantic -c -Wall -Werror -fpic -o src/secplus.o src/secplus.c | |
gcc --std=c90 -pedantic -shared -o libsecplus.so src/secplus.o | |
- name: Compile C library for AVR | |
run: avr-gcc -mmcu=attiny85 -Os -Wall -Werror -o test/avr_test.elf src/secplus.c test/avr_test.c | |
- name: Test | |
env: | |
TEST_CYCLES: 50000 | |
run: ./test_secplus.py |