Skip to content

Commit

Permalink
Merge branch 'master' into win_jit_poc
Browse files Browse the repository at this point in the history
  • Loading branch information
scoder authored Jan 9, 2025
2 parents 3c6c54e + e846e27 commit ef454ca
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 231 deletions.
57 changes: 8 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,16 @@ jobs:
matrix:
os:
- windows-2019
- ubuntu-20.04
- macos-12
- ubuntu-latest
- macos-latest
python-version:
- "2.7"
- "3.14-dev"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
- "3.7"
- "3.6"
- "pypy-2.7"
- "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
- "pypy-3.10"
Expand All @@ -36,10 +32,6 @@ jobs:
- "luajit-5.1"

exclude:
- os: windows-2019
python-version: "2.7"
- os: windows-2019
python-version: pypy-2.7
- os: windows-2019
lua-version: lua5.2
- os: windows-2019
Expand All @@ -49,25 +41,6 @@ jobs:
- os: windows-2019
lua-version: luajit-5.1

- os: macos-12
python-version: "2.7"
- os: macos-latest
python-version: "2.7"
- os: macos-latest
python-version: "3.6"
- os: macos-latest
python-version: "3.7"
- os: macos-latest
python-version: pypy-3.7

- os: macos-12
lua-version: lua5.2
- os: macos-12
lua-version: lua5.3
- os: macos-12
lua-version: lua5.4
- os: macos-12
lua-version: luajit-5.1
- os: macos-latest
lua-version: lua5.2
- os: macos-latest
Expand All @@ -92,25 +65,13 @@ jobs:
run: git submodule update --init --recursive

- name: Set up Python ${{ matrix.python-version }}
if: startsWith(matrix.python-version, '3.') || startsWith(matrix.python-version, 'pypy') || !startsWith(matrix.os, 'ubuntu')
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Set up Python2 (Linux)
if: matrix.python-version == '2.7' && startsWith(matrix.os, 'ubuntu')
run: |
sudo ln -fs python2 /usr/bin/python
sudo apt-get update
sudo apt-get install python-setuptools python2.7 python2.7-dev
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
sudo python2 get-pip.py
ls -l /usr/bin/pip* /usr/local/bin/pip*
which pip
- name: Set up Python packages
run: |
python -m pip install -U ${{ startsWith(matrix.python-version, '2.7') && '"pip<21" "setuptools<45"' || 'pip setuptools' }}
python -m pip install -U pip setuptools
python -m pip install -U wheel tox virtualenv -r requirements.txt
- name: Set up Lua ${{ matrix.lua-version }}
Expand All @@ -124,19 +85,17 @@ jobs:
arch: x64

- name: Build wheel
run: python setup.py sdist ${{ contains(matrix.python-version, '3.') && 'build_ext -j6' || '' }} bdist_wheel
run: python setup.py sdist build_ext -j6 bdist_wheel
env:
SETUP_OPTIONS: ${{ !contains(matrix.lua-version, 'luajit') && (contains(matrix.lua-version, 'bundle') && '--use-bundle' || '--no-luajit') || '' }}
CFLAGS: ${{ env.CFLAGS }} ${{ env.CFLAGS_LTO }}
LDFLAGS: ${{ env.CFLAGS_LTO }}

- name: Run tests
run: python setup.py test
run: |
bash -c "python -m pip install dist/lupa-*.whl"
python -m lupa.tests.__main__
continue-on-error: ${{ contains(matrix.python-version, 'pypy') }}
env:
SETUP_OPTIONS: ${{ !contains(matrix.lua-version, 'luajit') && (contains(matrix.lua-version, 'bundle') && '--use-bundle' || '--no-luajit') || '' }}
CFLAGS: ${{ env.CFLAGS }} ${{ env.CFLAGS_LTO }}
LDFLAGS: ${{ env.CFLAGS_LTO }}

- name: Upload wheels
if: matrix.lua-version == 'bundle' && matrix.os == 'macos-latest'
Expand Down
85 changes: 8 additions & 77 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ permissions: {}

jobs:
sdist:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

permissions:
contents: write # to create GitHub release (softprops/action-gh-release)
Expand Down Expand Up @@ -68,12 +68,6 @@ jobs:
name: sdist
path: dist/*.tar.gz

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/*.tar.gz

generate-wheels-matrix:
# Create a matrix of all architectures & versions to build.
# This enables the next step to run cibuildwheel in parallel.
Expand All @@ -86,7 +80,7 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install cibuildwheel
# Nb. keep cibuildwheel version pin consistent with job below
run: pipx install cibuildwheel==2.16.5
run: pipx install cibuildwheel==2.22.0
- id: set-matrix
run: |
MATRIX=$(
Expand Down Expand Up @@ -147,7 +141,7 @@ jobs:
arch: x86

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.22.0
with:
only: ${{ matrix.only }}

Expand All @@ -158,7 +152,7 @@ jobs:

upload_release_assets:
name: Upload Release Wheels
needs: [ build_wheels, Linux, non-Linux ]
needs: [ build_wheels, Linux ]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags')

Expand All @@ -183,7 +177,9 @@ jobs:
- name: Release
uses: softprops/action-gh-release@v2
with:
files: ./bdist_downloads/*.whl
files: |
./bdist_downloads/*.whl
./bdist_downloads/*.tar.gz
Linux:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -211,7 +207,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
with:
python-version: "3.9"
python-version: "3.12"

- name: Install dependencies
run: python -m pip install -r requirements.txt
Expand All @@ -226,68 +222,3 @@ jobs:
name: wheels-${{ matrix.image }}
path: wheelhouse_*/*-m*linux*.whl # manylinux / musllinux
if-no-files-found: ignore

non-Linux:
strategy:
# Allows for matrix sub-jobs to fail without canceling the rest
fail-fast: false

matrix:
os:
- macos-12
#- windows-2019
pyversion:
- "2.7"
- "3.6"
#- "pypy-3.7-v7.3.7"
#- "pypy-3.8-v7.3.7"
#- "pypy-3.9-v7.3.11"
#- "pypy-3.10-v7.3.13"

exclude:
# outdated compilers and probably not worth supporting anymore
- os: windows-2019
pyversion: "2.7"

runs-on: ${{ matrix.os }}
env:
USE_BUNDLE: "true"
MACOSX_DEPLOYMENT_TARGET: "11.0"
LUPA_WITH_LUA_DLOPEN: ${{ startsWith(matrix.os, 'windows') && 'false' || 'true' }}
PYTHON_BIN_DIR: ${{ startsWith(matrix.pyversion, '2.') && '/Library/Frameworks/Python.framework/Versions/2.7/bin' || '' }}

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Check out recursively
run: git submodule update --init --recursive

- name: Set up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.0
# macOS has Py2.7 installed system wide
if: matrix.pyversion != '2.7'
with:
python-version: ${{ matrix.pyversion }}

- name: Install MacOS dependencies
if: startsWith(matrix.os, 'mac')
run: |
brew install automake libtool
ln -s /usr/local/bin/glibtoolize /usr/local/bin/libtoolize
- name: Install dependencies
run: |
export PATH=$PYTHON_BIN_DIR:$PATH
python -m pip install wheel -r requirements.txt
- name: Build wheels
run: |
export PATH=$PYTHON_BIN_DIR:$PATH
python setup.py --with-cython sdist ${{ contains(matrix.pyversion, '3.') && 'build_ext -j6' || '' }} bdist_wheel
- name: Upload wheels
uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
name: wheels-${{ matrix.pyversion }}-${{ matrix.os }}
path: dist/*.whl
if-no-files-found: ignore
12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Lupa change log
===============

2.3 (2025-01-09)
----------------

* The bundled LuaJIT versions were updated to the latest git branches.

* The bundled Lua 5.4 was updated to 5.4.7.

* Removed support for Python 2.x.

* Built with Cython 3.0.11.


2.2 (2024-06-02)
----------------

Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ build_script:

test: off
test_script:
- python -u setup.py test
- python -u -m lupa.tests.__main__

artifacts:
- path: dist/*.whl
Expand Down
Loading

0 comments on commit ef454ca

Please sign in to comment.