Skip to content

Commit

Permalink
Add explicit python setup in ci workflows using python
Browse files Browse the repository at this point in the history
Signed-off-by: Nigel Jones <[email protected]>
  • Loading branch information
planetf1 committed May 7, 2024
1 parent 8625834 commit ffaf529
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 123 deletions.
111 changes: 0 additions & 111 deletions .github/workflows/requirements-3-9.txt

This file was deleted.

File renamed without changes.
24 changes: 14 additions & 10 deletions .github/workflows/unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Ensure code conventions are upheld
run: python3 -m pytest --verbose tests/test_code_conventions.py
- name: Check that doxygen can parse the documentation
Expand All @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Verify copy_from_upstream state
run: |
git config --global user.name "ciuser" && \
Expand All @@ -49,7 +49,7 @@ jobs:
SIG_NAME: dilithium_3
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Configure
run: |
mkdir build && \
Expand Down Expand Up @@ -107,7 +107,7 @@ jobs:
image: ${{ matrix.container }}
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Configure
run: mkdir build && cd build && cmake -GNinja ${{ matrix.CMAKE_ARGS }} .. && cmake -LA ..
- name: Build
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
# CMAKE_ARGS: -DOQS_ENABLE_SIG_SPHINCS=OFF -DOQS_USE_OPENSSL=OFF -DOQS_OPT_TARGET=generic
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Install the emulation handlers
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build in an x86_64 container
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
CMAKE_ARGS: -DCMAKE_TOOLCHAIN_FILE=../.CMake/toolchain_windows-amd64.cmake -DBUILD_SHARED_LIBS=ON
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Configure
run: mkdir build && cd build && cmake -GNinja ${{ matrix.CMAKE_ARGS }} .. && cmake -LA ..
- name: Build
Expand All @@ -212,10 +212,14 @@ jobs:
- -DBUILD_SHARED_LIBS=ON -DOQS_DIST_BUILD=OFF
runs-on: ${{ matrix.os }}
steps:
- name: Install Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # pin@v5
with:
python-version: '3.12'
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Install dependencies
run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja && pip3 install --break-system-packages --require-hashes -r .github/workflows/requirements-3-12.txt
run: env HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja && pip3 install --break-system-packages --require-hashes -r .github/workflows/requirements.txt
- name: Get system information
run: sysctl -a | grep machdep.cpu
- name: Configure
Expand All @@ -234,7 +238,7 @@ jobs:
image: openquantumsafe/ci-ubuntu-jammy:latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
- name: Retrieve OpenSSL330 from cache
id: cache-openssl330
uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # pin@v3
Expand All @@ -243,7 +247,7 @@ jobs:
key: ${{ runner.os }}-openssl330
- name: Checkout the OpenSSL v3.3.0 commit
if: steps.cache-openssl330.outputs.cache-hit != 'true'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@v4
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # pin@v4
with:
repository: 'openssl/openssl'
ref: 'openssl-3.3.0-beta1'
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- cron: "5 0 * * 0"

jobs:

constant-time-x64:
runs-on: ubuntu-latest
strategy:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,17 @@ jobs:
matrix:
toolchain: [ .CMake/toolchain_windows_x86.cmake, .CMake/toolchain_windows_amd64.cmake ]
steps:
- name: Install Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # pin@v5
with:
python-version: '3.12'
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3
- name: Generate Project
run: cmake -B build --toolchain ${{ matrix.toolchain }} .
- name: Build Project
run: cmake --build build
- name: Test dependencies
run: pip.exe install --require-hashes -r .github\workflows\requirements-3-9.txt
run: pip.exe install --require-hashes -r .github\workflows\requirements.txt
- name: Run tests
run: |
python -m pytest --numprocesses=auto -vv --maxfail=10 --ignore=tests/test_code_conventions.py --ignore=tests/test_kat_all.py --junitxml=build\test-results\pytest\test-results.xml

0 comments on commit ffaf529

Please sign in to comment.