Skip to content

Fix GitHub workflows #29

Fix GitHub workflows

Fix GitHub workflows #29

Workflow file for this run

name: Tests of codes
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test:
name: Test
strategy:
matrix:
os:
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-15
- macos-15-intel
python-version:
- '3.11'
- '3.12'
- '3.13'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build cython
python -m pip install auditwheel
python -m pip install flake8 mypy pytest
- name: Build wheel and source tarball
run: |
python -m build
auditwheel repair dist/softfloatpy-*.whl
- name: Install built wheel
run: |
python -m pip install wheelhouse/softfloatpy-*.whl
- name: Check coding style with flake8
run: |
python -m flake8 --doctests ./python
- name: Check data types with mypy
run: |
python -m mypy --strict ./python
- name: Test code with pytest
run: |
python -m pytest ./python --doctest-modules
test-on-windows:
name: Test on Windows
strategy:
matrix:
os:
- windows-2025
python-version:
- '3.11'
- '3.12'
- '3.13'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build cython
python -m pip install auditwheel
python -m pip install flake8 mypy pytest
- name: Setup MSYS2 environment
uses: msys2/setup-msys2@v2
with:
msystem: ucrt64
update: true
install: mingw-w64-ucrt-x86_64-gcc
- name: Build wheel and source tarball
shell: msys2 {0}
run: |
python -m build
auditwheel repair dist/softfloatpy-*.whl
- name: Install built wheel
run: |
python -m pip install wheelhouse/softfloatpy-*.whl
- name: Check coding style with flake8
run: |
python -m flake8 --doctests ./python
- name: Check data types with mypy
run: |
python -m mypy --strict ./python
- name: Test code with pytest
run: |
python -m pytest ./python --doctest-modules