File: build.yml

package info (click to toggle)
numexpr 2.14.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 784 kB
  • sloc: cpp: 4,250; python: 3,985; ansic: 369; makefile: 203
file content (85 lines) | stat: -rw-r--r-- 2,271 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build

on: [push, pull_request]

permissions:
  contents: read

jobs:
  build_wheels:
    name: Build and test on ${{ matrix.os }}${{ matrix.numpy-version && format(' (numpy {0})', matrix.numpy-version) || '' }} for ${{ matrix.arch }}
    runs-on: ${{ matrix.runs-on || matrix.os }}
    permissions:
      contents: write
    env:
      CIBW_ARCHS_LINUX: ${{ matrix.arch }}
      CIBW_ARCHS_MACOS: "x86_64 arm64"
      CIBW_ENABLE: cpython-freethreading
    strategy:
      fail-fast: false
      matrix:
        include:
          # Linux x86_64 builds
          - os: ubuntu-latest
            arch: x86_64
            artifact_name: "linux-x86_64"

            # Linux x86_64 with numpy 1.23
          - os: ubuntu-latest
            arch: x86_64
            artifact_name: "linux-x86_64_numpy1_23"
            numpy-version: "1.26"

          # Linux ARM64 builds (native runners)
          - os: ubuntu-24.04-arm
            arch: aarch64
            artifact_name: "linux-aarch64"

          # Windows builds
          - os: windows-latest
            arch: x86_64
            artifact_name: "windows-x86_64"

          # macOS builds (universal2)
          - os: macos-latest
            arch: x86_64
            artifact_name: "macos-universal2"
    steps:
      - uses: actions/checkout@v3

      - uses: actions/setup-python@v3
        name: Install Python
        with:
          python-version: '3.12'

      - name: Install specific numpy version
        if: matrix.numpy-version
        run: pip install "numpy==${{ matrix.numpy-version }}.*"

      - name: Local Build
        run: pip install -e .

      - name: Test
        run: |
          pip install pytest
          python -m pytest

      - name: Build wheels
        uses: pypa/cibuildwheel@v3.1.3

      - name: Make sdist
        if: ${{ matrix.os == 'windows-latest' }}
        run: |
          python -m pip install build
          python -m build --sdist --outdir wheelhouse .

      - uses: actions/upload-artifact@v4
        with:
          name: ${{ matrix.artifact_name }}
          path: ./wheelhouse/*

      - name: Upload to GitHub Release
        uses: softprops/action-gh-release@v1
        if: startsWith(github.ref, 'refs/tags/')
        with:
          files: wheelhouse/*