Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing windows building recipe branch #74

Open
wants to merge 115 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
57f09b4
Introducing windows building recipe branch
myselfhimself Nov 4, 2020
ea9d243
#5 using msys2 github action with pacman in Path
myselfhimself Nov 4, 2020
7ec5f50
#5 pacman install attempts
myselfhimself Nov 4, 2020
204ffef
#5 fixing few packages mingw names
myselfhimself Nov 4, 2020
b7fad84
#5 autoconfirm pacman install + add zlib, openmp
myselfhimself Nov 4, 2020
68329ff
#5 pacman --noconfirm to skip CLI interactivity
myselfhimself Nov 4, 2020
f04d03e
#5 pkg-config instrospection
myselfhimself Nov 4, 2020
805180c
#5 openmp + python executable debugging
myselfhimself Nov 4, 2020
ba53c41
#5 using gcc openmp instead, executables lookup
myselfhimself Nov 4, 2020
d81630e
#5 fixing pip, starting libgmic src grabbing
myselfhimself Nov 4, 2020
702787f
#5 fix pip overkill build dependencies
myselfhimself Nov 4, 2020
bee0576
#5 adding python-dev for compiling
myselfhimself Nov 4, 2020
70288de
#5 splitting requirements into dev and test
myselfhimself Nov 4, 2020
95dff8a
#5 enabling openmp for windows
myselfhimself Nov 4, 2020
d36d031
#5 force cimg_OS==2 for msys/posix'ed windows
myselfhimself Nov 4, 2020
3660639
#5 using different gcc, add lib fftw
myselfhimself Nov 4, 2020
e30191b
#5 using different pip
myselfhimself Nov 4, 2020
e24683c
#5 using different python
myselfhimself Nov 4, 2020
dc7a95a
#5 adding toolchain
myselfhimself Nov 4, 2020
068b972
#5 change fftw package name
myselfhimself Nov 4, 2020
c9a84c7
#5 remove libfftw3_threads extra link for windows-like OS
myselfhimself Nov 4, 2020
4d44b7f
#5 adding build wheel step
myselfhimself Nov 4, 2020
a52c775
#5 adding pytest subsets, .dll .whl artifacts
myselfhimself Nov 4, 2020
939ec59
#5 adding pytest subsets, .dll .whl artifacts(2)
myselfhimself Nov 4, 2020
d5befcb
#5 disabling pytest
myselfhimself Nov 4, 2020
fac5ffa
#5 tentative ldd and pytest
myselfhimself Nov 4, 2020
7a338f2
#5 installing numpy through package instead of pip
myselfhimself Nov 4, 2020
f555750
#5 skip memfreeing test if psutil not found
myselfhimself Nov 4, 2020
64f5220
#5 different windows requirements to skip psutil install, filterable …
myselfhimself Nov 5, 2020
4d9e0cc
#5 build_tools.bash test_wheel and test_compiled_so fixes
myselfhimself Nov 5, 2020
0c0f7d5
#5 test_compiled_so pythonpath debug
myselfhimself Nov 5, 2020
f092a4c
#5 test_compiled_so pythonpath debug(2)
myselfhimself Nov 5, 2020
6bd5f29
#5 adding non-network samples in tests/ for mostly offline testing
myselfhimself Nov 5, 2020
909f9ac
#5 adding non-network samples in tests/ for mostly offline testing(2)
myselfhimself Nov 5, 2020
e36babb
#5 gmic own .dll paths debugging
myselfhimself Nov 5, 2020
9178312
#5 adding forgotten libcurl
myselfhimself Nov 5, 2020
8d3d5f1
#5 WIP dependent dlls debugging and wheel packing
myselfhimself Nov 5, 2020
df58472
#5 WIP dependent dlls debugging and wheel packing(2)
myselfhimself Nov 5, 2020
23ba811
#5 WIP dependent dlls debugging and wheel packing(3)
myselfhimself Nov 5, 2020
c06ffc4
#5 adding non-network samples in tests/ for mostly offline testing(4)
myselfhimself Nov 5, 2020
f56775a
#5 setup.py import fix (dll packing)
myselfhimself Nov 5, 2020
b2be06d
#5 libcurl headers compile hack
myselfhimself Nov 5, 2020
727bb2c
#5 libcurl headers compile hack(2)
myselfhimself Nov 5, 2020
648ba34
#5 libcurl headers compile hack(3)
myselfhimself Nov 5, 2020
a52447a
#5 libcurl headers compile hack(4)
myselfhimself Nov 5, 2020
0dc542d
#5 libcurl headers compile hack(5)
myselfhimself Nov 5, 2020
d5c1827
#5 libcurl headers compile hack(6)
myselfhimself Nov 5, 2020
9006bbe
#5 libcurl headers compile hack(7)
myselfhimself Nov 5, 2020
90a7f4f
#5 libcurl headers compile hack(7)
myselfhimself Nov 5, 2020
68ba704
#5 libcurl headers compile hack(8)
myselfhimself Nov 5, 2020
78b99ab
#5 libcurl headers compile hack(9)
myselfhimself Nov 5, 2020
e2a9434
#5 libcurl headers compile hack(10)
myselfhimself Nov 5, 2020
23fb9d6
#5 libcurl headers compile hack(11)
myselfhimself Nov 5, 2020
53c283e
#5 libcurl headers compile hack(12)
myselfhimself Nov 5, 2020
a8b5af9
#5 libcurl headers compile hack(13)
myselfhimself Nov 5, 2020
b6e3260
#5 libcurl headers compile hack(14)
myselfhimself Nov 5, 2020
40d7d41
#5 libcurl headers compile hack(15)
myselfhimself Nov 5, 2020
b391dd3
#5 libcurl headers compile hack(16)
myselfhimself Nov 6, 2020
78694d2
#5 wheel dll packing
myselfhimself Nov 6, 2020
4642628
#5 wheel dll packing(2)
myselfhimself Nov 6, 2020
d233371
#5 wheel dll packing(3)
myselfhimself Nov 6, 2020
9baa3d7
#5 license file fix
myselfhimself Nov 6, 2020
c4b97ea
#5 wheel dll packing(4)
myselfhimself Nov 6, 2020
463f217
#5 wheel dll packing(5)
myselfhimself Nov 6, 2020
c36ec87
#5 wheel dll packing(6)
myselfhimself Nov 6, 2020
5ee2b80
#5 wheel dll packing(7)
myselfhimself Nov 6, 2020
15d1dae
#5 wheel dll packing - adding .whl introspector(8)
myselfhimself Nov 6, 2020
c801ff2
#5 wheel dll packing (9)
myselfhimself Nov 6, 2020
a3c0c12
#5 wheel dll packing - adding missing unzip executable (10)
myselfhimself Nov 6, 2020
bbb309a
#5 wheel dll packing - unzip / reformat (11)
myselfhimself Nov 6, 2020
0013910
#5 dll packing attempt using @vinayak-mehta wheel_repair.py
myselfhimself Nov 9, 2020
6aeb0a3
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (2)
myselfhimself Nov 9, 2020
ae8ca3e
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (3)
myselfhimself Nov 9, 2020
c1ba3db
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (4)
myselfhimself Nov 9, 2020
6aee74b
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (5)
myselfhimself Nov 9, 2020
ebb8050
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (6)
myselfhimself Nov 9, 2020
15cae20
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (7)
myselfhimself Nov 9, 2020
13eacf8
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (8)
myselfhimself Nov 9, 2020
b4194a1
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (8)
myselfhimself Nov 10, 2020
8d37da1
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (9)
myselfhimself Nov 10, 2020
f7e1afc
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (10)
myselfhimself Nov 10, 2020
a187aff
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (11)
myselfhimself Nov 10, 2020
a15e799
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (12)
myselfhimself Nov 10, 2020
b316c73
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (13)
myselfhimself Nov 10, 2020
c8ae154
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (14)
myselfhimself Nov 10, 2020
6b39242
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (15)
myselfhimself Nov 10, 2020
55539bc
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (16)
myselfhimself Nov 11, 2020
dfbb4c5
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (17)
myselfhimself Nov 11, 2020
cb64621
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (18)
myselfhimself Nov 11, 2020
205abf4
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (19)
myselfhimself Nov 11, 2020
dbb9dde
#5 dll packing attempt using @vinayak-mehta wheel_repair.py (20)
myselfhimself Nov 11, 2020
5929af5
#5 attempting visual studio package install of dependencies
myselfhimself Nov 12, 2020
12187ff
#5 attempting visual studio package install of dependencies(2)
myselfhimself Nov 12, 2020
659fbf6
#5 attempting visual studio compatible setup.py
myselfhimself Nov 12, 2020
ceb4d77
#5 attempting visual studio compatiblewheel build
myselfhimself Nov 12, 2020
8b2d2f9
#5 attempting visual studio compatiblewheel build(2)
myselfhimself Nov 12, 2020
53c6587
#5 attempting visual studio compatiblewheel build(3)
myselfhimself Nov 13, 2020
d404082
#5 attempting visual studio compatiblewheel build(4)
myselfhimself Nov 13, 2020
89ec548
#5 attempting visual studio compatiblewheel build(5)
myselfhimself Nov 13, 2020
a2c0a69
#5 attempting visual studio compatiblewheel build(6)
myselfhimself Nov 13, 2020
5a5f15e
#5 attempting visual studio compatiblewheel build(7)
myselfhimself Nov 13, 2020
f1121a7
#5 attempting visual studio compatiblewheel build(8)
myselfhimself Nov 13, 2020
840ffd3
#5 #75 using gmic submodule
myselfhimself Nov 13, 2020
40fedef
#5 #75 using gmic submodule (2)
myselfhimself Nov 13, 2020
bbc85f4
#5 #75 using gmic submodule (3)
myselfhimself Nov 13, 2020
5d86295
#5 #75 using gmic submodule (4)
myselfhimself Nov 13, 2020
8bdb313
#5 #75 using gmic submodule (5)
myselfhimself Nov 13, 2020
804004e
#5 #75 using gmic submodule (7) 2.9.1
myselfhimself Nov 13, 2020
b0af498
#5 #75 using gmic submodule (8)
myselfhimself Nov 13, 2020
ea8abb7
#5 #75 using gmic submodule (9)
myselfhimself Nov 13, 2020
fb648cf
#5 #75 using gmic submodule (10)
myselfhimself Nov 13, 2020
f7c782e
#5 #75 using gmic submodule (11) older CImg
myselfhimself Nov 13, 2020
3db2ea9
#5 #75 using gmic submodule (12) cimglist_for
myselfhimself Nov 13, 2020
1b55e64
#5 #75 using gmic submodule (12) newer c++
myselfhimself Nov 13, 2020
3c4b441
#5 #75 using gmic submodule (13)
myselfhimself Nov 13, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/bak/cpythonlinuxIOnonregression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
python-version: [3.7]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -41,12 +43,10 @@ jobs:
- name: Build gmic-cli if needed
run: |
sudo apt-get install -y libfftw3-dev libcurl4-openssl-dev libpng-dev zlib1g-dev libomp5 libomp-dev
bash build_tools.bash 1b_clean_and_regrab_gmic_src_and_make_cli
if: steps.cache-gmic-cli.outputs.cache-hit != 'true'
- name: Build gmic-py if needed
run: |
sudo apt-get install -y libfftw3-dev libcurl4-openssl-dev libpng-dev zlib1g-dev libomp5 libomp-dev
bash build_tools.bash 1_clean_and_regrab_gmic_src
bash build_tools.bash 2_compile
if: steps.cache-gmic-py.outputs.cache-hit != 'true'
- name: run IO non regression tests using compiled gmic-py and gmic-cli
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/bak/cpythonmacosbuild_nosendpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true

# Prevent running this job on tag-based releases
- name: Check if Git tag exists
run: echo "HEAD_TAG=$(git tag --points-at HEAD)" >> $GITHUB_ENV
Expand Down Expand Up @@ -46,7 +49,6 @@ jobs:
# llvm 9 (latest) might cause issue with c++20 pre-support, see https://trac.macports.org/ticket/59575 and https://github.com/dtschump/gmic-py/commit/618d9d317d55aa7af3f85e92bfd07f06efea491f/checks?check_suite_id=368364476
# using llvm v6 instead
brew install pkg-config fftw libpng libomp llvm@6 coreutils
bash build_tools.bash 1_clean_and_regrab_gmic_src
MACOSX_DEPLOYMENT_TARGET=10.10 pip install git+https://github.com/mayeut/cibuildwheel.git
MACOSX_DEPLOYMENT_TARGET=10.10 python -m cibuildwheel --output-dir wheelhouse
echo "Mac OS wheelhouse after cibuildwheel looks like:"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/bak/cpythonmacosbuildandreleaseontag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ jobs:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -42,7 +45,6 @@ jobs:
# llvm 9 (latest) might cause issue with c++20 pre-support, see https://trac.macports.org/ticket/59575 and https://github.com/dtschump/gmic-py/commit/618d9d317d55aa7af3f85e92bfd07f06efea491f/checks?check_suite_id=368364476
# using llvm v6 instead
brew install pkg-config fftw libpng libomp llvm@6 coreutils
bash build_tools.bash 1_clean_and_regrab_gmic_src
MACOSX_DEPLOYMENT_TARGET=10.10 pip install git+https://github.com/mayeut/cibuildwheel.git
MACOSX_DEPLOYMENT_TARGET=10.10 python -m cibuildwheel --output-dir wheelhouse && bash build_tools.bash 11_send_to_pypi
echo "Mac OS wheelhouse after cibuildwheel and sending to pypi.org looks like:"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/bak/cpythonmanylinuxbuild_nosendpypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ jobs:
docker_image: 'quay.io/pypa/manylinux2014_x86_64:latest'
pre_cmd:
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true

# Prevent running this job on tag-based releases
- name: Check if Git tag exists
run: echo "HEAD_TAG::$(git tag --points-at HEAD)" >> $GITHUB_ENV
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ jobs:
docker_image: 'quay.io/pypa/manylinux2014_x86_64:latest'
pre_cmd:
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true

# Detect G'MIC target version from VERSION file
- name: Detect G'MIC target version
run: echo "GHA_GMIC_VERSION=$(GHA_QUIET=1 bash build_tools.bash __get_py_package_version)" >> $GITHUB_ENV
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/bak/cpythonpythonpackageoptimized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
bash build_tools.bash 21_check_c_style # should stop this script on style error
bash build_tools.bash 23_check_python_style # should stop this script on style error

bash build_tools.bash 1_clean_and_regrab_gmic_src
bash build_tools.bash 2_compile #2b_compile_debug
bash build_tools.bash 3_test_compiled_so
# && bash build_tools.bash 11_send_to_pypi #Note that most probably nothing will be sent to PyPI because of too modern linked libraries
Expand Down
75 changes: 53 additions & 22 deletions .github/workflows/bak/cpythonwindowsbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,62 @@ on: [push]
jobs:
build-windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.7']
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- uses: actions/checkout@v2
with:
python-version: ${{ matrix.python-version }}
- name: build on macos
submodules: true

# Using https://github.com/marketplace/actions/setup-msys2
- name: Using "Setup MSYS2" contrib
uses: msys2/setup-msys2@v2
with:
update: true
install: make git
- run: git describe --dirty
- name: build on windows
working-directory: ./
env:
TWINE_PASSWORD_GITHUB_SECRET: ${{ secrets.TWINE_PASSWORD_GITHUB_SECRET }} # For build_tools.bash 11_send_to_pypi
PYTHON3: python
PIP3: pip
CIBW_BUILD: cp3*-*win*
# CIBW_ENVIRONMENT: "CC='/usr/local/opt/llvm@6/bin/clang' CXX='/usr/local/opt/llvm@6/bin/clang++' COMPILER_INDEX_STORE_ENABLE='NO'"
CIBW_BEFORE_BUILD: pip install -r dev-requirements.txt
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: python -W default -m pytest {project}/tests/test_gmic_py.py -vvv -rxXs
CIBW_BUILD_VERBOSITY: 3
run: |
# brew install pkg-config fftw libpng libomp llvm@6
bash build_tools.bash 1_clean_and_regrab_gmic_src
pip install git+https://github.com/joerick/cibuildwheel.git
python -m cibuildwheel --output-dir wheelhouse
#echo "Mac OS wheelhouse after cibuildwheel looks like:"
#bash build_tools.bash 11_send_to_pypi
pacman --noconfirm -S unzip wget mingw-w64-x86_64-curl mingw-w64-x86_64-python-pip mingw-w64-x86_64-python python-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-zlib mingw-w64-x86_64-libjpeg-turbo mingw64/mingw-w64-x86_64-pkgconf mingw-w64-x86_64-libpng mingw-w64-x86_64-libtiff mingw64/mingw-w64-x86_64-fftw
pacman --noconfirm -S mingw-w64-x86_64-python-numpy # used by unit tests, safer to install so than through pip on-the-fly source compilation
# Add complementary pkg-config .pc lookup path
export PKG_CONFIG_PATH=/usr/lib/pkgconfig/:$PKG_CONFIG_PATH
pkg-config --list-all
pkg-config libjpeg --libs --cflags
pkg-config libpng --libs --cflags
pkg-config libtiff-4 --libs --cflags
pkg-config zlib --libs --cflags
pkg-config libcurl --libs --cflags
pkg-config libcurl --libs --cflags
which python
python --version
gcc --version
g++ --version
which pip
pip --version
pip install -r dev-requirements.txt
bash build_tools.bash 2b_compile_debug
ldd $(find -name *.dll)
bash build_tools.bash 3_test_compiled_so format
bash build_tools.bash 4b_build_windows_portable_wheel
bash build_tools.bash 5_test_wheel format
bash build_tools.bash 5b_test_wheel_dlls_repaired
- name: upload .whl debug build dir as artifact
uses: actions/upload-artifact@v2
with:
name: gmic-py-windows-debug-dist-dir
path: dist/
- name: upload .whl repaired build dir as artifact
uses: actions/upload-artifact@v2
with:
name: gmic-py-windows-repaired-dist-dir
path: wheelhouse/
- name: upload .dll debug build dir as artifact
uses: actions/upload-artifact@v2
with:
name: gmic-py-windows-debug-build-dir
path: build/
100 changes: 100 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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 }}
13 changes: 11 additions & 2 deletions .github/workflows/cpythonpythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1


# Prevent running this job on tag-based releases
- name: Check if Git tag exists
Expand All @@ -28,20 +28,29 @@ jobs:
with:
python-version: 3.7

- uses: actions/checkout@v2
with:
submodules: true

- name: Compile and run tests on .so, .whl and source distribution of gmic-py ${{ env.GHA_GMIC_VERSION }}
working-directory: ./
env:
# TWINE_PASSWORD_GITHUB_SECRET: ${{ secrets.TWINE_PASSWORD_GITHUB_SECRET }} # For build_tools.bash 11_send_to_pypi
PYTHON3: python3
PIP3: pip3
run: |
cd gmic
git fetch --all --tags
git checkout v.2.9.1
cd ..
for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done
sudo apt-get update; sudo apt-get install -y libfftw3-dev libcurl4-openssl-dev libpng-dev zlib1g-dev libomp5 libomp-dev
sudo apt-get install clang-format
bash build_tools.bash 21_check_c_style # should stop this script on style error
bash build_tools.bash 23_check_python_style # should stop this script on style error
wget -P gmic/src https://gmic.eu/gmic_stdlib.h
wget -P gmic/src https://github.com/dtschump/CImg/raw/v.2.9.1/CImg.h

bash build_tools.bash 1_clean_and_regrab_gmic_src
bash build_tools.bash 2b_compile_debug
ldd build/lib.linux-x86_64-3.*/gmic.cpython-3*-x86_64-linux-gnu.so
# bash build_tools.bash 3_test_compiled_so # TODO tests exceptionnally disabled for remote testing
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ src/
out.json
build/
dist/
gmic
docs/_build/
wheelhouse/*
*.egg-info*
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "gmic"]
path = gmic
url = https://github.com/dtschump/gmic
branch = tags/2.9.1
Loading