Skip to content

misc: Add support for secure elements on MicroPython. #187

misc: Add support for secure elements on MicroPython.

misc: Add support for secure elements on MicroPython. #187

Workflow file for this run

name: 'πŸ§ͺ Test Cloud Client'
on:
push:
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'
pull_request:
types:
- opened
- edited
- reopened
- synchronize
branches:
- 'main'
paths:
- '**.py'
- '.github/workflows/*.yml'
- '.github/workflows/*.json'
- '!**/README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: '⏳ Checkout repository'
uses: actions/checkout@v3
- name: 'β™» Caching dependencies'
uses: actions/[email protected]
id: cache
with:
path: ~/cache/bin/
key: 'micropython'
- name: '🐍 Set up Python'
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: "3.10"
- name: '🐍 Set up MicroPython'
if: steps.cache.outputs.cache-hit != 'true'
run: source tests/ci.sh && ci_install_micropython
- name: 'πŸ›  Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install build==0.10.0 cbor2==5.4.6 M2Crypto==0.38.0 micropython-senml==0.1.0
sudo apt-get install softhsm2 gnutls-bin libengine-pkcs11-openssl
- name: 'πŸ“¦ Build package'
run: python3 -m build
- name: 'πŸ›  Install package'
run: |
python3 -m build
pip install --user dist/arduino_iot_cloud-*.whl
pip install --target=${HOME}/.micropython/lib dist/arduino_iot_cloud-*.whl
- name: 'πŸ”‘ Configure soft crypto device'
env:
KEY_PEM: ${{ secrets.KEY_PEM }}
CERT_PEM: ${{ secrets.CERT_PEM }}
CA_PEM: ${{ secrets.CA_PEM }}
run: |
source tests/ci.sh && ci_configure_softhsm
- name: '☁️ Connect to IoT cloud (CPython / Basic Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --basic-auth
- name: '☁️ Connect to IoT cloud (CPython / Basic Auth / Sync)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --basic-auth --sync
- name: '☁️ Connect to IoT cloud (CPython / Key-Cert Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
python tests/ci.py --file-auth
- name: '☁️ Connect to IoT cloud (CPython / Crypto Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID2 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export SOFTHSM2_CONF="${HOME}/softhsm/tokens/softhsm2.conf"
python tests/ci.py --crypto-device
- name: '☁️ Connect to IoT cloud (MicroPython / Basic Auth / Async)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --basic-auth
- name: '☁️ Connect to IoT cloud (MicroPython / Basic Auth / Sync)'
env:
DEVICE_ID: ${{ secrets.DEVICE_ID1 }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
export PATH="${HOME}/cache/bin:${PATH}"
micropython -c "import sys; print(sys.path)"
micropython tests/ci.py --basic-auth --sync