Skip to content

Test

Test #195

Workflow file for this run

---
name: Test
on:
workflow_dispatch:
env:
FORCE_COLOR: 1
defaults:
run:
shell: bash
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.9, 3.8, '3.10', 3.11, 3.12]
architecture: ['x64']
include:
- os: macos-latest
python-version: 3.11
architecture: 'x64'
- os: windows-latest
python-version: 3.11
architecture: 'x64'
- os: windows-latest
python-version: 3.11
architecture: 'x86'
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- run: pip install wheel psutil
- run: pip install -e .[test]
- name: Show gcc
run: gcc -v
- name: Test native compiler
if: ${{ matrix.architecture == 'x64' }}
run: ./test
- uses: bwoodsend/setup-winlibs-action@v1
if: ${{ runner.os == 'Windows' }}
with:
architecture: ${{ matrix.architecture }}
with_clang: true
- name: Test Winlibs gcc
if: ${{ runner.os == 'Windows' }}
run: ./test
- name: Test Clang
env:
CC: clang
run: ./test
# Just gcc is an alias for clang on modern macOSs. Use gcc-[version] to
# get a genuine gcc.
- name: Test gcc macOS
if: ${{ runner.os == 'macOS' }}
env:
CC: gcc-13
MACOS_DEPLOYMENT_TARGET: '10.10'
run: ./test
- name: Install TinyCC
if: ${{ runner.os == 'Linux' }}
run: sudo apt-get install tcc
- name: Install TinyCC
if: ${{ runner.os == 'Windows' }}
run: |
curl -L https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27-win64-bin.zip --create-dirs -o ./tcc.zip
unzip -d "%ProgramFiles%/tcc" ./tcc.zip
shell: cmd
- name: Test TinyCC
if: ${{ runner.os == 'linux' }}
env:
CC: tcc
run: ./test
- name: Test TinyCC
if: ${{ runner.os == 'windows' && matrix.architecture == 'x64' }}
run: set CC=%ProgramFiles%/tcc/tcc/tcc && bash ./test
shell: cmd
- name: Test TinyCC
if: ${{ runner.os == 'windows' && matrix.architecture == 'x86' }}
run: set CC=%ProgramFiles%/tcc/tcc/i386-win32-tcc && bash ./test
shell: cmd
- name: Show wheel suffix
run: ls packaging/contains-slugs/dist/
# Test running the whole test suite, compiling everything fat.
- run: ./test && ls packaging/contains-slugs/dist
if: runner.os == 'macOS'
env:
MACOS_ARCHITECTURE: universal2