Skip to content

Commit 8c23ad8

Browse files
committed
Move C to c_components, resume use of pkg-config fork
1 parent ec635a2 commit 8c23ad8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+61
-39
lines changed

Cargo.lock

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
[workspace]
22
members = ["imageflow_serde", "imageflow_core", "imageflow_cdylib", "imageflow_tool", "imageflow_server"]
3+
4+
[replace]
5+
"pkg-config:0.3.8" = { git = "https://github.com/imazen/pkg-config-rs", branch="master"}

appveyor.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ test_script:
3838
- rustc -V
3939
- cargo -V
4040
- nasm -v
41+
- cd c_components
4142
- mkdir build
4243
- cd build
4344
- if "%PLATFORM%"=="x86" set CONAN_ARCH=x86
@@ -47,6 +48,7 @@ test_script:
4748
- conan build ../
4849
- cd ..
4950
- conan export imazen/testing
51+
- cd ..
5052
- cd imageflow_core
5153
- conan install --build missing -s build_type=Release -s arch=%CONAN_ARCH%
5254
- cargo test

build.sh

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -117,49 +117,53 @@ BUILD_VARS=(
117117

118118
echo "build.sh sees these relevant variables: ${BUILD_VARS[*]}"
119119

120-
[[ -d build ]] || mkdir build
120+
(
121+
cd c_components
122+
[[ -d build ]] || mkdir build
121123

122-
echo "================================== C/C++ =========================== [build.sh]"
124+
echo "================================== C/C++ =========================== [build.sh]"
123125

124-
if [[ "$TEST_C" == 'True' ]]; then
125-
echo "Testing C/C++ components of Imageflow "
126-
echo "(and fetching and compiling dependencies)"
127-
echo
128-
echo
126+
if [[ "$TEST_C" == 'True' ]]; then
127+
echo "Testing C/C++ components of Imageflow "
128+
echo "(and fetching and compiling dependencies)"
129+
echo
130+
echo
129131

130-
(
131-
cd build
132-
eval "$COPY_VALGRINDRC"
133-
conan install --scope build_tests=True --scope "debug_build=${TEST_C_DEBUG_BUILD:-False}" --scope "coverage=${COVERAGE:-False}" --scope "skip_test_run=${VALGRIND:-False}" --build missing -u ../
134-
conan build ../
135-
if [[ "$VALGRIND" == 'True' ]]; then
136-
#Sync to build/CTestTestfile.cmake
137-
$VALGRIND_COMMAND ./bin/test_imageflow
138-
$VALGRIND_COMMAND ./bin/test_variations
139-
$VALGRIND_COMMAND ./bin/test_fastscaling
140-
#echo "This next test is slow; it's a quickcheck running under valgrind"
141-
#$VALGRIND_COMMAND ./bin/test_theft_render
142-
fi
143-
)
144-
if [[ "$COVERAGE" == 'True' ]]; then
132+
(
133+
cd build
134+
eval "$COPY_VALGRINDRC"
135+
conan install --scope build_tests=True --scope "debug_build=${TEST_C_DEBUG_BUILD:-False}" --scope "coverage=${COVERAGE:-False}" --scope "skip_test_run=${VALGRIND:-False}" --build missing -u ../
136+
conan build ../
137+
if [[ "$VALGRIND" == 'True' ]]; then
138+
#Sync to build/CTestTestfile.cmake
139+
$VALGRIND_COMMAND ./bin/test_imageflow
140+
$VALGRIND_COMMAND ./bin/test_variations
141+
$VALGRIND_COMMAND ./bin/test_fastscaling
142+
#echo "This next test is slow; it's a quickcheck running under valgrind"
143+
#$VALGRIND_COMMAND ./bin/test_theft_render
144+
fi
145+
)
146+
if [[ "$COVERAGE" == 'True' ]]; then
145147

146-
echo "==================================================================== [build.sh]"
147-
echo "Process coverage information with lcov"
148-
lcov -q --directory ./build --capture --output-file coverage.info
149-
lcov -q --remove coverage.info 'tests/*' '.conan/*' '/usr/*' --output-file coverage.info
148+
echo "==================================================================== [build.sh]"
149+
echo "Process coverage information with lcov"
150+
lcov -q --directory ./build --capture --output-file coverage.info
151+
lcov -q --remove coverage.info 'tests/*' '.conan/*' '/usr/*' --output-file coverage.info
152+
fi
150153
fi
151-
fi
152154

153-
echo "==================================================================== [build.sh]"
154-
echo "Build C/C++ parts of Imageflow & dependencies as needed"
155-
echo
156-
if [[ "$REBUILD_C" == 'True' ]]; then
157-
conan remove imageflow/* -f
158-
fi
159-
conan export imazen/testing
160-
(
161-
cd imageflow_core
162-
conan install --build missing
155+
156+
echo "==================================================================== [build.sh]"
157+
echo "Build C/C++ parts of Imageflow & dependencies as needed"
158+
echo
159+
if [[ "$REBUILD_C" == 'True' ]]; then
160+
conan remove imageflow/* -f
161+
fi
162+
conan export imazen/testing
163+
(
164+
cd ../imageflow_core
165+
conan install --build missing
166+
)
163167
)
164168

165169
echo
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

clean_dotfiles.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
rm ./{imageflow_core,imageflow_server,imageflow_tool}/*.{dot,dot.png}
3+
rm ./{c_components,imageflow_core,imageflow_server,imageflow_tool}/*.{dot,dot.png}

imageflow_core/buildc.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ set -x
55

66
cd ..
77

8+
cd c_components
89
conan remove imageflow/* -f
910
conan export imazen/testing
1011

11-
cd imageflow_core
12+
cd ../imageflow_core
1213

1314
conan install --build missing # Will build imageflow package with your current settings
1415
cargo test

rebuild.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
rm -rf artifacts
55
rm -rf build
6+
rm -rf c_components/build
67
rm -rf target
78
rm libimageflow.so
89
rm conaninfo.txt

win_build_c.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmd.exe /c "win_verify_tools.bat"
22

3+
cd c_components
34
mkdir build
45
cd build
56

@@ -8,6 +9,7 @@ set CONAN_ARCH=x86_64
89
conan install --scope build_tests=True -o shared=True --build missing -s build_type=Release -s arch=%CONAN_ARCH% -u ../
910
conan build ../
1011
cd ..
12+
cd ..
1113

1214
echo Clearing cached C component
1315
conan remove imageflow/* -f

win_build_rust.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ REM set CONAN_ARCH=x86
44
set CONAN_ARCH=x86_64
55
SET RUST_TARGET=x86_64-pc-windows-msvc
66

7+
cd c_components
78
conan export imazen/testing
9+
cd ..
810
cd imageflow_core
911
conan install --build missing -s build_type=Release -s arch=%CONAN_ARCH%
1012
cargo test

0 commit comments

Comments
 (0)