Skip to content

Commit

Permalink
Add accelerated test builds
Browse files Browse the repository at this point in the history
  • Loading branch information
homm committed Aug 11, 2024
1 parent 4d10b3c commit a410dcb
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,19 @@ jobs:
include:
- { python-version: "3.11", PYTHONOPTIMIZE: 1, REVERSE: "--reverse" }
- { python-version: "3.10", PYTHONOPTIMIZE: 2 }
# SIMD-accelerated builds for x86
- { os: "ubuntu-latest", python-version: "3.9", acceleration: "sse4"}
- { os: "ubuntu-latest", python-version: "3.12", acceleration: "avx2"}
# Free-threaded
- { os: "ubuntu-latest", python-version: "3.13-dev", disable-gil: true }
# M1 only available for 3.10+
- { os: "macos-13", python-version: "3.9" }
- { os: "macos-13", python-version: "3.9", acceleration: "avx2"}
exclude:
- { os: "macos-14", python-version: "3.9" }

runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }} ${{ matrix.disable-gil && 'free-threaded' || '' }}
name: ${{ matrix.os }} Python ${{ matrix.python-version }} ${{ matrix.acceleration }} ${{ matrix.disable-gil && 'free-threaded' || '' }}

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -108,7 +112,7 @@ jobs:
GHA_LIBIMAGEQUANT_CACHE_HIT: ${{ steps.cache-libimagequant.outputs.cache-hit }}

- name: Install macOS dependencies
if: startsWith(matrix.os, 'macOS')
if: startsWith(matrix.os, 'macos')
run: |
.github/workflows/macos-install.sh
env:
Expand All @@ -118,6 +122,11 @@ jobs:
if: "matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'"
run: echo "::add-matcher::.github/problem-matchers/gcc.json"

- name: Set compiler options for optimization
if: ${{ matrix.acceleration }}
run: |
echo "CC=cc -m${{ matrix.acceleration }}" >> $GITHUB_ENV
- name: Build
run: |
.ci/build.sh
Expand Down

0 comments on commit a410dcb

Please sign in to comment.