diff options
| author | J08nY | 2024-07-11 17:23:31 +0200 |
|---|---|---|
| committer | J08nY | 2024-07-11 17:23:31 +0200 |
| commit | 63024fd9395f2e6a5712226773f012091ea85edb (patch) | |
| tree | 2518918f48155e5ae23115682b9f0390e4a5a4c9 /.github | |
| parent | 43e105655bd2de6b64ddb3c4ddf4b965bc196e6b (diff) | |
| download | pyecsca-63024fd9395f2e6a5712226773f012091ea85edb.tar.gz pyecsca-63024fd9395f2e6a5712226773f012091ea85edb.tar.zst pyecsca-63024fd9395f2e6a5712226773f012091ea85edb.zip | |
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/perf.yml | 23 | ||||
| -rw-r--r-- | .github/workflows/test.yml | 21 |
2 files changed, 25 insertions, 19 deletions
diff --git a/.github/workflows/perf.yml b/.github/workflows/perf.yml index 6211ea1..2b9b81c 100644 --- a/.github/workflows/perf.yml +++ b/.github/workflows/perf.yml @@ -6,6 +6,7 @@ env: LLVM_CONFIG: /usr/bin/llvm-config-10 PS_PACKAGES: libps4000 libps5000 libps6000 GMP_PACKAGES: libgmp-dev libmpfr-dev libmpc-dev + FLINT_PACKAGES: libflint-dev OTHER_PACKAGES: swig gcc libpcsclite-dev llvm-10 libllvm10 llvm-10-dev libpari-dev pari-gp pari-seadata jobs: @@ -14,10 +15,10 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10", "3.11"] - gmp: [0, 1] + mod: ["python", "gmp", "flint"] env: PYTHON: ${{ matrix.python-version }} - USE_GMP: ${{ matrix.gmp }} + MOD_IMPL: ${{ matrix.mod }} steps: - uses: actions/checkout@v4 with: @@ -25,10 +26,10 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/pip - key: pip-${{ runner.os }}-${{ matrix.gmp }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} + key: pip-${{ runner.os }}-${{ matrix.mod }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} restore-keys: | - pip-${{ runner.os }}-${{ matrix.gmp }}-${{ matrix.python-version }}- - pip-${{ runner.os }}-${{ matrix.gmp }}- + pip-${{ runner.os }}-${{ matrix.mod }}-${{ matrix.python-version }}- + pip-${{ runner.os }}-${{ matrix.mod }}- pip-${{ runner.os }}- - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -42,22 +43,24 @@ jobs: - name: Install system dependencies run: | sudo apt-get install -y $PS_PACKAGES $OTHER_PACKAGES - if [ $USE_GMP == 1 ]; then sudo apt-get install -y $GMP_PACKAGES; fi + if [ $MOD_IMPL == "gmp" ]; then sudo apt-get install -y $GMP_PACKAGES; fi + if [ $MOD_IMPL == "flint" ]; then sudo apt-get install -y $FLINT_PACKAGES; fi - name: Install picoscope bindings run: | python -m pip install -U pip setuptools wheel git clone https://github.com/colinoflynn/pico-python && cd pico-python && pip install . && cd .. git clone https://github.com/picotech/picosdk-python-wrappers && cd picosdk-python-wrappers && pip install . && cd .. - - name: Install dependencies + - name: Install run: | - if [ $USE_GMP == 1 ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, gmp, test, dev]"; fi - if [ $USE_GMP == 0 ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, test, dev]"; fi + if [ $MOD_IMPL == "gmp" ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, gmp, test, dev]"; fi + if [ $MOD_IMPL == "flint" ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, flint, test, dev]"; fi + if [ $MOD_IMPL == "python" ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, test, dev]"; fi - name: Perf run: | make perf - name: Archive perf results uses: actions/upload-artifact@v4 with: - name: perf-results-${{ matrix.gmp }}-${{ matrix.python-version }} + name: perf-results-${{ matrix.mod }}-${{ matrix.python-version }} path: .perf diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8a31b88..1134792 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,6 +6,7 @@ env: LLVM_CONFIG: /usr/bin/llvm-config-10 PS_PACKAGES: libps4000 libps5000 libps6000 GMP_PACKAGES: libgmp-dev libmpfr-dev libmpc-dev + FLINT_PACKAGES: libflint-dev OTHER_PACKAGES: swig gcc libpcsclite-dev llvm-10 libllvm10 llvm-10-dev libpari-dev pari-gp pari-seadata jobs: @@ -14,10 +15,10 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10", "3.11"] - gmp: [0, 1] + mod: ["python", "gmp", "flint"] env: PYTHON: ${{ matrix.python-version }} - USE_GMP: ${{ matrix.gmp }} + MOD_IMPL: ${{ matrix.mod }} steps: - uses: actions/checkout@v4 with: @@ -25,10 +26,10 @@ jobs: - uses: actions/cache@v4 with: path: ~/.cache/pip - key: pip-${{ runner.os }}-${{ matrix.gmp }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} + key: pip-${{ runner.os }}-${{ matrix.mod }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} restore-keys: | - pip-${{ runner.os }}-${{ matrix.gmp }}-${{ matrix.python-version }}- - pip-${{ runner.os }}-${{ matrix.gmp }}- + pip-${{ runner.os }}-${{ matrix.mod }}-${{ matrix.python-version }}- + pip-${{ runner.os }}-${{ matrix.mod }}- pip-${{ runner.os }}- - name: Setup Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -42,16 +43,18 @@ jobs: - name: Install system dependencies run: | sudo apt-get install -y $PS_PACKAGES $OTHER_PACKAGES - if [ $USE_GMP == 1 ]; then sudo apt-get install -y $GMP_PACKAGES; fi + if [ $MOD_IMPL == "gmp" ]; then sudo apt-get install -y $GMP_PACKAGES; fi + if [ $MOD_IMPL == "flint" ]; then sudo apt-get install -y $FLINT_PACKAGES; fi - name: Install picoscope bindings run: | python -m pip install -U pip setuptools wheel git clone https://github.com/colinoflynn/pico-python && cd pico-python && pip install . && cd .. git clone https://github.com/picotech/picosdk-python-wrappers && cd picosdk-python-wrappers && pip install . && cd .. - - name: Install dependencies + - name: Install run: | - if [ $USE_GMP == 1 ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, gmp, test, dev]"; fi - if [ $USE_GMP == 0 ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, test, dev]"; fi + if [ $MOD_IMPL == "gmp" ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, gmp, test, dev]"; fi + if [ $MOD_IMPL == "flint" ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, flint, test, dev]"; fi + if [ $MOD_IMPL == "python" ]; then pip install -e ".[picoscope_sdk, picoscope_alt, chipwhisperer, smartcard, pari, leia, test, dev]"; fi - name: Test run: | make test |
