Skip to content

add includes

add includes #33

Workflow file for this run

name: Build
on: [push, pull_request]
env:
PYICU_VERSION: "2.14"
_ICU_URL: https://github.com/unicode-org/icu/releases/download/release-76-1/icu4c-76_1-src.tgz
jobs:
linux:
name: Build wheels on Linux (${{ matrix.platform }}-${{ matrix.arch }})
runs-on: ubuntu-latest
strategy:
matrix:
arch:
- "x86_64"
# - "aarch64"
# - "i686"
# - "ppc64le"
cpy:
- "cp313"
platform:
- "manylinux"
# - musllinux
steps:
- uses: actions/checkout@v4
# - name: Install build dependencies
# run: |
# sudo apt-get update
# sudo apt-get install -y pkg-config
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
# Note: 6.2.0 is buggy: make sure to avoid it.
# See https://github.com/pypa/cibuildwheel/issues/1250
image: tonistiigi/binfmt:qemu-v7.0.0
- name: Cache libicu
id: cache-libicu
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.ci/out
key: ${{ runner.os }}-temp-1
- name: Download libicu
if: steps.cache-libicu.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/.ci/build
run: |
wget -q -O icu.tgz ${_ICU_URL}
gunzip -d < icu.tgz | tar xvf -
- name: Build libicu
if: steps.cache-libicu.outputs.cache-hit != 'true'
working-directory: ${{ github.workspace }}/.ci/build/icu/source
run: |
chmod +x runConfigureICU configure install-sh
./runConfigureICU Linux --prefix=${{ github.workspace }}/.ci/out --enable-static
gmake
gmake install
- name: Check libicu
run: |
echo "out:"
ls -la ${{ github.workspace }}/.ci/out
echo "out/lib:"
ls -la ${{ github.workspace }}/.ci/out/lib
echo "out/lib/pkgconfig:"
ls -la ${{ github.workspace }}/.ci/out/lib/pkgconfig
- name: Fetch pyicu source
run: git clone --branch=v${PYICU_VERSION} --depth=1 https://gitlab.pyicu.org/main/pyicu.git
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: pyicu
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BEFORE_ALL_LINUX: ./scripts/ci/before-all-linux.sh
CIBW_BUILD: ${{ matrix.cpy }}-${{ matrix.platform }}_${{ matrix.arch }}
# TODO: fix
CIBW_ARCHS_LINUX: auto
CIBW_ENVIRONMENT: >-
PKG_CONFIG_PATH="/project/.ci/out/lib/pkgconfig"
PYICU_INCLUDES="/project/.ci/out/include"
- uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.cpy }}-${{ matrix.platform }}_${{ matrix.arch }}
path: ./wheelhouse/*.whl
macos-intel:
if: false
name: Build wheels on macOS (x86_64)
# macos-13 is an intel runner, macos-14 is apple silicon
runs-on: macos-13
strategy:
matrix:
arch:
- "x86_64"
cpy:
- "cp310"
env:
LIBICU_VERSION: "76"
steps:
- uses: actions/checkout@v4
- name: Fetch source
run: git clone --branch=v${PYICU_VERSION} --depth=1 https://gitlab.pyicu.org/main/pyicu.git
- name: Install build dependencies
run: |
brew update
brew install pkgconf icu4c@${LIBICU_VERSION}
- name: Build wheels
uses: pypa/cibuildwheel@v2.22.0
with:
package-dir: pyicu
env:
CIBW_BUILD: ${{matrix.cpy}}-macosx_${{matrix.arch}}
CIBW_ARCHS_MACOS: ${{matrix.arch}}
CIBW_ENVIRONMENT: >-
MACOSX_DEPLOYMENT_TARGET=13.0
PKG_CONFIG_PATH="/usr/local/opt/icu4c@${LIBICU_VERSION}/lib/pkgconfig"
# with:
# package-dir: .
# output-dir: wheelhouse
# config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v4
with:
name: macos-13-${{matrix.cpy}}-macosx_${{matrix.arch}}
path: ./wheelhouse/*.whl