100 lines (93 loc) · 3.39 KB
/
build.yml
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Automatically build binary wheels and source packages.
# Adapted from https://github.com/vinayak-mehta/pdftopng/blob/main/.github/workflows/build.yml
name: cibuildwheel
on: [push]
env:
CIBW_BUILD: "cp3?-manylinux_x86_64 cp3?-macosx_x86_64"
CIBW_SKIP: "cp35-*"
CIBW_BEFORE_BUILD_LINUX: "sh scripts/build_linux.sh"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=$(pwd)/lib/poppler/build/:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}"
CIBW_BEFORE_BUILD_MACOS: "sh scripts/build_macos.sh"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=$(pwd)/lib/poppler/build:$DYLD_LIBRARY_PATH delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: "call scripts/wheel_repair.bat {wheel} {dest_dir}"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: 3.8
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
- name: Build dependencies & wheels (Windows / x86)
if: runner.os == 'Windows'
shell: cmd
run: |
REM call scripts\build_win_x86.bat
cd gmic
git fetch --all --tags
git checkout v.2.9.1
cd ..
C:\msys64\usr\bin\wget.exe -P gmic\src https://gmic.eu/gmic_stdlib.h
C:\msys64\usr\bin\wget.exe -P gmic\src https://github.com/dtschump/CImg/raw/v.2.9.1/CImg.h
vcpkg install libpng:x64-windows libjpeg-turbo:x64-windows zlib:x64-windows curl:x64-windows tiff:x64-windows fftw3:x64-windows
vcpkg list
python -m pip --disable-pip-version-check install cibuildwheel==1.6.1 wheel
python setup.py bdist_wheel
REM python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: "cp3?-win32"
CIBW_SKIP: "cp35-*"
DISTUTILS_USE_SDK: 1
MSSdk: 1
# - uses: ilammy/msvc-dev-cmd@v1
# with:
# arch: amd64
#
# - name: Build dependencies & wheels (Windows / amd64)
# if: runner.os == 'Windows'
# shell: cmd
# run: |
# call scripts\build_win_x64.bat
# python -m pip --disable-pip-version-check install cibuildwheel==1.6.1
# python -m cibuildwheel --output-dir wheelhouse
# env:
# CIBW_BUILD: "cp3?-win_amd64"
# CIBW_SKIP: "cp35-*"
# DISTUTILS_USE_SDK: 1
# MSSdk: 1
#
# - name: Install cibuildwheel & build wheels (Linux & MacOS)
# if: runner.os != 'Windows'
# run: |
# python -m pip --disable-pip-version-check install cibuildwheel==1.6.1
# python -m cibuildwheel --output-dir wheelhouse
#
# - uses: actions/upload-artifact@v2
# with:
# path: ./wheelhouse/*.whl
#
# upload_pypi:
# needs: [build_wheels]
# runs-on: ubuntu-latest
# # upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
# steps:
# - uses: actions/download-artifact@v2
# with:
# name: artifact
# path: dist
#
# - uses: pypa/gh-action-pypi-publish@master
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}