Default to purecap kernels for CheriBSD #1618
Workflow file for this run
This file contains 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
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python application | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
RUFF_VERSION: 0.4.1 | |
jobs: | |
build-baseline: | |
runs-on: ubuntu-latest | |
container: | |
image: python:3.6.0 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
# Run as a non-root user to avoid cheribuild errors | |
adduser --disabled-password --gecos "Not Root" notroot | |
su -c "python -m pip install --user --upgrade pip pytest" notroot | |
- name: Run basic regression tests | |
run: su -c "tests/run_basic_tests.sh" notroot | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
# Use the system-provided python3 instead of actions/setup-python@v4 | |
python3 --version | |
python3 -m pip install --upgrade pip | |
python3 -m pip install --upgrade pre-commit ruff==${{ env.RUFF_VERSION }} | |
python3 -m pip install -r requirements.txt | |
- name: Lint with flake8 | |
run: flake8 | |
- name: Lint with ruff | |
run: ruff check . | |
- name: Run pre-commit checks | |
run: pre-commit run --all-files | |
- name: Run basic regression tests | |
run: tests/run_basic_tests.sh | |
build-latest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade pre-commit ruff==${{ env.RUFF_VERSION }} | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: flake8 | |
- name: Lint with ruff | |
run: ruff check . | |
- name: Run pre-commit checks | |
run: pre-commit run --all-files | |
- name: Run basic regression tests | |
run: tests/run_basic_tests.sh | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# Need at least python 3.8 to allow pytype to parse all the features we make use of | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
cache: 'pip' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade pytype | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Run pytype | |
run: | | |
pytype --config pytype.cfg --python-version 3.8 -j `nproc` |