Skip to content

Test

Test #192

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]
architecture: ['x64']
include:
- os: macos-10.15
python-version: 3.11
architecture: 'x64'
- os: macos-11.0
python-version: 3.11
architecture: 'x64'
- name: Windows
os: windows-latest
python-version: 3.11
architecture: 'x64'
- name: Windows 32-bit
os: windows-latest
python-version: 3.11
architecture: 'x86'
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Cache pip cached wheels
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
path: pip-cache
key: restore-key
restore-keys: restore-key
- name: Install
run: |
pip install --cache-dir=pip-cache wheel
pip install --cache-dir=pip-cache psutil
pip install --cache-dir=pip-cache -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-9
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. Only the
# macOS 11 images have a new enough Xcode to do this.
- run: ./test && ls packaging/contains-slugs/dist
if: ${{ matrix.os == 'macos-11.0' }}
env:
MACOS_ARCHITECTURE: universal2