Merge branch 'main' of github.com:ralienpp/cmp-test-suite #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Development Pipeline | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| - pq_migration | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| - pq_migration | ||
| jobs: | ||
| install_dependencies: | ||
| name: Install Dependencies | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Check out repo | ||
| uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: "3.11.2" | ||
| - name: Cache APT packages | ||
| id: cache-apt | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: /var/cache/apt | ||
| key: ${{ runner.os }}-apt-${{ hashFiles('scripts/setup_pq.sh') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-apt- | ||
| - name: Update APT and install dependencies | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libssl-dev cmake | ||
| - name: Ensure venv directory exists | ||
| run: mkdir -p .venv | ||
| - name: Cache venv | ||
| id: cache-venv | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: .venv | ||
| key: ${{ runner.os }}-venv-${{ hashFiles('requirements.txt') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-venv- | ||
| - name: Install dependencies | ||
| run: | | ||
| python -m venv .venv | ||
| source .venv/bin/activate | ||
| pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| - name: Ensure build directory exists | ||
| run: mkdir -p build | ||
| - name: Cache build artifacts | ||
| id: cache-build | ||
| uses: actions/cache@v3 | ||
| with: | ||
| path: build/ | ||
| key: ${{ runner.os }}-build-${{ hashFiles('./scripts/setup_pq.sh') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-build- | ||
| - name: Make script executable | ||
| run: chmod +x ./scripts/setup_pq.sh | ||
| - name: Build and install liboqs-python | ||
| run: | | ||
| git clone --depth=1 https://github.com/open-quantum-safe/liboqs-python | ||
| cd liboqs-python | ||
| pip install . | ||
| cd .. | ||
| basics: | ||
| name: Code Style Check | ||
| runs-on: ubuntu-latest | ||
| needs: unit_tests | ||
|
Check failure on line 85 in .github/workflows/main.yml
|
||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.11.2 | ||
| - name: Run Ruff | ||
| run: ruff check | ||
| license_check: | ||
| name: License Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.11.2 | ||
| - name: Install Dependencies | ||
| run: | | ||
| pip install reuse | ||
| - name: Run REUSE | ||
| run: reuse lint | ||
| robot_framework: | ||
| name: Robot Framework Code Style | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - pylint | ||
| - license_check | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.11.2 | ||
| - name: Install Robot Framework Robocop | ||
| run: pip install robotframework-robocop==5.5.0 | ||
| - name: Run Robocop | ||
| run: robocop --report rules_by_error_type | ||
| pylint: | ||
| name: Static Analysis with Pylint | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - unit_tests | ||
| - license_check | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: 3.11.2 | ||
| - name: Install Dependencies | ||
| run: | | ||
| pip install -r requirements-dev.txt | ||
| - name: Run Pylint | ||
| run: pylint --fail-under=9.70 --disable=W0511 resources | ||
| pyright: | ||
| name: Static Analysis with Pyright | ||
| runs-on: ubuntu-latest | ||
| needs: | ||
| - install_dependencies | ||
| - unit_tests | ||
| - license_check | ||
| - pylint | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v3 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v3 | ||
| with: | ||
| python-version: 3.11.2 | ||
| - name: Install Pyright | ||
| run: pip install pyright==1.1.389 | ||
| - name: Run Pyright | ||
| run: | | ||
| export ERRORS=$(PYTHONPATH=./resources pyright ./resources | tail -n 1 | grep -o '^[0-9]*') | ||
| [ -z "$ERRORS" ] && ERRORS=0 | ||
| [ "$ERRORS" -lt 150 ] 2>/dev/null && echo "Success." || (echo "Failure. Error count:" && exit 1) | ||