name: Test on: schedule: # Run every Monday at noon - cron: '0 12 * * 1' push: pull_request: env: LLVM_CONFIG: /usr/bin/llvm-config-14 OTHER_PACKAGES: swig libpcsclite-dev llvm-14 libllvm14 llvm-14-dev valgrind gdb gcc gcc-arm-none-eabi binutils-arm-none-eabi libnewlib-arm-none-eabi jobs: test: runs-on: ubuntu-latest strategy: matrix: python-version: [ "3.9", "3.10", "3.11", "3.12" ] env: PYTHON: ${{ matrix.python-version }} steps: - uses: actions/checkout@v5 with: submodules: true - uses: actions/cache@v4 with: path: ~/.cache/pip key: pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} restore-keys: | pip-${{ runner.os }}-${{ matrix.python-version }}- pip-${{ runner.os }}- - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: Install system dependencies run: | sudo apt-get update sudo apt-get install -y $OTHER_PACKAGES - name: Build libtommath run: | cd ext && make host stm32f3 && cd .. - name: Install dependencies run: | pip install -U pip setuptools wheel - name: Install pyecsca run: | git clone https://github.com/J08nY/pyecsca pyecsca-upstream && cd pyecsca-upstream && git submodule update --init && pip install -e ".[chipwhisperer, test, dev]" && cd .. - name: Install pyecsca-codegen run: | pip install -e ".[test, dev]" - name: Test run: | make test - name: Test (C) run: | cd test && make test && cd .. - name: Code coverage uses: codecov/codecov-action@v5 if: ${{ matrix.python-version == 3.9 }} with: token: ${{ secrets.CODECOV_TOKEN }}