Workflow update #31
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
name: Continuous Integration | |
on: [push, pull_request] | |
jobs: | |
build: | |
strategy: | |
# Allows for matrix sub-jobs to fail without canceling the rest | |
fail-fast: false | |
matrix: | |
os: | |
- windows-latest | |
- ubuntu-latest | |
# - macos-11 | |
- macos-latest | |
python-version: | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
lua-version: | |
- "bundle" | |
# exclude: | |
runs-on: ${{ matrix.os }} | |
env: | |
CFLAGS_LTO: ${{ contains(matrix.lua-version, 'bundle') && (contains(matrix.os, 'windows') && '/LTCG' || '-flto') || '' }} | |
CFLAGS: ${{ contains(matrix.os, 'windows') && '/O2' || '-O2 -fPIC' }} -g | |
MACOSX_DEPLOYMENT_TARGET: "11.0" | |
LUPA_WITH_LUA_DLOPEN: ${{ startsWith(matrix.os, 'windows') && 'false' || 'true' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
if: ${{ !startsWith(matrix.os, 'ubuntu') || startsWith(matrix.python-version, '3.') || startsWith(matrix.python-version, 'pypy') }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Set up Python packages | |
run: | | |
python -m pip install -U pip setuptools | |
python -m pip install -U wheel tox virtualenv -r requirements.txt | |
- name: Build wheel | |
run: python setup.py sdist ${{ contains(matrix.python-version, '3.') && 'build_ext -j6' || '' }} bdist_wheel | |
env: | |
SETUP_OPTIONS: --use-bundle --no-luajit | |
CFLAGS: ${{ env.CFLAGS }} ${{ env.CFLAGS_LTO }} | |
LDFLAGS: ${{ env.CFLAGS_LTO }} | |
- name: Run tests | |
run: python setup.py test | |
env: | |
SETUP_OPTIONS: --use-bundle --no-luajit | |
CFLAGS: ${{ env.CFLAGS }} ${{ env.CFLAGS_LTO }} | |
LDFLAGS: ${{ env.CFLAGS_LTO }} | |
- name: Upload wheels | |
if: ${{ contains(matrix.lua-version, 'bundle') }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-${{ matrix.python-version }}-${{ matrix.os }} | |
path: dist/*.whl | |
if-no-files-found: ignore |