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 Jul 16, 2024
1 parent 43bf980 commit 7fa8fb8
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
fail-fast: false
matrix:
os: [
"macos-14",
"macos-14-arm64",
"ubuntu-latest",
]
python-version: [
Expand All @@ -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" }
- { os: "macos-14-arm64", 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 7fa8fb8

Please sign in to comment.