Skip to content

Commit

Permalink
#5 #75 using gmic submodule
Browse files Browse the repository at this point in the history
  • Loading branch information
myselfhimself committed Nov 13, 2020
1 parent f1121a7 commit 840ffd3
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 17 deletions.
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
6 changes: 4 additions & 2 deletions .github/workflows/bak/cpythonwindowsbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ jobs:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v2
with:
submodules: true

# Using https://github.com/marketplace/actions/setup-msys2
- name: Using "Setup MSYS2" contrib
uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -42,7 +45,6 @@ jobs:
which pip
pip --version
pip install -r dev-requirements.txt
bash build_tools.bash 1_clean_and_regrab_gmic_src
bash build_tools.bash 2b_compile_debug
ldd $(find -name *.dll)
bash build_tools.bash 3_test_compiled_so format
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/cpythonpythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ jobs:
runs-on: ubuntu-latest

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
Expand Down Expand Up @@ -41,7 +44,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 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*
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "gmic"]
path = gmic
url = https://github.com/dtschump/gmic
3 changes: 2 additions & 1 deletion build_tools.bash
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function __get_py_package_version () {

function 00_all_steps () {
# See related but defunct Dockerfile at https://github.com/myselfhimself/gmic-py/blob/fc12cb74f4b02fbfd83e9e9fba44ba7a4cee0d93/Dockerfile
21_check_c_style && 23_check_python_style && 1_clean_and_regrab_gmic_src && 2_compile && 3_test_compiled_so && 4_build_wheel && 5_test_wheel && 6_build_sdist && 7_test_sdist
21_check_c_style && 23_check_python_style && 2_compile && 3_test_compiled_so && 4_build_wheel && 5_test_wheel && 6_build_sdist && 7_test_sdist
echo "This is the final file tree:"
find .
}
Expand Down Expand Up @@ -110,6 +110,7 @@ function 11_send_to_pypi () {
set +x
}

# Now replaced by git submodule, kept for legacy
function 1_clean_and_regrab_gmic_src () {
set -x
GMIC_ARCHIVE_GLOB=gmic_${GMIC_VERSION}.tar.gz
Expand Down
1 change: 1 addition & 0 deletions gmic
Submodule gmic added at e6159b
2 changes: 1 addition & 1 deletion gmicpy.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "src/gmic/src/gmic.h"
#include "gmic/src/gmic.h"

// Set T be a float if not platform-overridden
#ifndef T
Expand Down

0 comments on commit 840ffd3

Please sign in to comment.