aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows
diff options
context:
space:
mode:
authorJ08nY2023-03-30 10:35:00 +0200
committerJ08nY2023-03-30 12:05:06 +0200
commit0eb176e35702a87470f642bc4cc1158c61c66961 (patch)
tree3a5fffbaa80a81c5b7a0ce9033d0758d636b1e75 /.github/workflows
parent68a4698448f0d5c6b8d8af022c870b47dab8f1af (diff)
downloadpyecsca-codegen-0eb176e35702a87470f642bc4cc1158c61c66961.tar.gz
pyecsca-codegen-0eb176e35702a87470f642bc4cc1158c61c66961.tar.zst
pyecsca-codegen-0eb176e35702a87470f642bc4cc1158c61c66961.zip
Add github actions.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/test.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..82ccd60
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,54 @@
+name: Test
+
+on: [push, pull_request]
+
+env:
+ LLVM_CONFIG: /usr/bin/llvm-config-10
+ OTHER_PACKAGES: swig gcc libpcsclite-dev llvm-10 libllvm10 llvm-10-dev
+
+jobs:
+ test:
+ runs-on: ubuntu-20.04
+ strategy:
+ matrix:
+ python-version: ["3.8", "3.9", "3.10"]
+ env:
+ PYTHON: ${{ matrix.python-version }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - uses: actions/cache@v3
+ with:
+ path: ~/.cache/pip
+ key: pip-${{ runner.os }}-${{ matrix.gmp }}-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
+ restore-keys: |
+ pip-${{ runner.os }}-${{ matrix.gmp }}-${{ matrix.python-version }}-
+ pip-${{ runner.os }}-${{ matrix.gmp }}-
+ pip-${{ runner.os }}-
+ - name: Setup Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v3
+ 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 && 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: Code coverage
+ uses: codecov/codecov-action@v3
+ if: ${{ matrix.python-version == 3.9 }}