Skip to content

Commit

Permalink
Calculate checksums of native deps and auto-update in repo.
Browse files Browse the repository at this point in the history
  • Loading branch information
skidder committed Nov 2, 2024
1 parent 9604962 commit 10f31dd
Show file tree
Hide file tree
Showing 36 changed files with 367 additions and 85 deletions.
122 changes: 114 additions & 8 deletions .github/workflows/deps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Install build tools
run: |
sudo apt-get update
sudo apt-get install nasm
sudo apt-get install nasm python3
- name: Build deps
run: |
Expand All @@ -48,14 +48,22 @@ jobs:
go build
go test -v
- name: Compress deps
run: tar -czf deps.tar.gz deps/linux
- name: Generate build info
run: |
./verify_deps.py generate \
--deps-dir deps/linux \
--platform linux \
--commit ${{ github.sha }}
- name: Create deps archive
run: |
tar -czf deps-linux.tar.gz deps/linux/
- name: Upload deps artifact
uses: actions/upload-artifact@v4
with:
name: deps-linux.tar.gz
path: deps.tar.gz
path: deps-linux.tar.gz

macos:
name: macOS
Expand All @@ -70,6 +78,7 @@ jobs:
brew install automake
brew install coreutils # for ffmpeg build
brew install libtool
python3 -m pip install --user --upgrade pip
- name: Build deps
run: |
Expand All @@ -90,12 +99,109 @@ jobs:
run: |
go build
go test -v
- name: Compress deps
run: tar -czf deps.tar.gz deps/osx
- name: Generate build info
run: |
./verify_deps.py generate \
--deps-dir deps/osx \
--platform macos \
--commit ${{ github.sha }}
- name: Create deps archive
run: |
tar -czf deps-macos.tar.gz deps/osx/
- name: Upload deps artifact
uses: actions/upload-artifact@v4
with:
name: deps-macos.tar.gz
path: deps.tar.gz
path: deps-macos.tar.gz

verify:
name: Verify Build Artifacts
needs: [linux, macos]
runs-on: ubuntu-latest
# Only run verification on PRs to avoid duplicate runs on pushes to main
if: github.event_name == 'pull_request'

steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: deps-linux.tar.gz
path: .

- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: deps-macos.tar.gz
path: .

- name: Extract artifacts
run: |
tar xzf deps-linux.tar.gz
tar xzf deps-macos.tar.gz
- name: Verify artifacts match checked-in deps
run: |
python3 ./verify_deps.py verify-artifact \
--artifact deps-linux.tar.gz \
--deps-dir deps/linux
python3 ./verify_deps.py verify-artifact \
--artifact deps-macos.tar.gz \
--deps-dir deps/osx
# This job updates the checked-in deps on main branch
update-deps:
name: Update Checked-in Dependencies
needs: [linux, macos]
runs-on: ubuntu-latest
# Only run on pushes to main, not on PRs
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')

steps:
- name: Check out repo
uses: actions/checkout@v4

- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: deps-linux.tar.gz
path: .

- name: Download macOS artifact
uses: actions/download-artifact@v4
with:
name: deps-macos.tar.gz
path: .

- name: Extract and update deps
run: |
# Remove existing deps directories to avoid stale files
rm -rf deps/linux/* deps/osx/*
tar xzf deps-linux.tar.gz
tar xzf deps-macos.tar.gz
- name: Commit updated deps
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
# Force add the deps directories to override gitignore
git add -f deps/linux/* deps/osx/*
# Only commit if there are changes
if ! git diff --cached --quiet; then
git commit -m "Update native dependencies from ${{ github.sha }} [skip ci]
Dependencies built by workflow run: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
git push
else
echo "No changes to checked-in dependencies"
fi
4 changes: 2 additions & 2 deletions deps/linux/include/opencv2/cvconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
/* #undef HAVE_GSTREAMER */

/* GTK+ 2.0 Thread support */
/* #undef HAVE_GTHREAD */
#define HAVE_GTHREAD

/* GTK+ 2.x toolkit */
/* #undef HAVE_GTK */
Expand All @@ -103,7 +103,7 @@
#define HAVE_JPEG

/* libpng/png.h needs to be included */
/* #undef HAVE_LIBPNG_PNG_H */
#define HAVE_LIBPNG_PNG_H

/* GDCM DICOM codec */
/* #undef HAVE_GDCM */
Expand Down
Binary file modified deps/linux/lib/libavcodec.a
Binary file not shown.
Binary file modified deps/linux/lib/libavdevice.a
Binary file not shown.
Binary file modified deps/linux/lib/libavfilter.a
Binary file not shown.
Binary file modified deps/linux/lib/libavformat.a
Binary file not shown.
Binary file modified deps/linux/lib/libavutil.a
Binary file not shown.
Binary file modified deps/linux/lib/libbz2.a
Binary file not shown.
Binary file modified deps/linux/lib/libgif.a
Binary file not shown.
Binary file modified deps/linux/lib/libjpeg.a
Binary file not shown.
Binary file modified deps/linux/lib/libopencv_core.a
Binary file not shown.
Binary file modified deps/linux/lib/libopencv_imgcodecs.a
Binary file not shown.
Binary file modified deps/linux/lib/libopencv_imgproc.a
Binary file not shown.
Binary file modified deps/linux/lib/libpng16.a
Binary file not shown.
4 changes: 2 additions & 2 deletions deps/linux/lib/libpng16.la
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ old_library='libpng16.a'
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' -L/src/deps/linux/lib -lz -lm'
dependency_libs=' -L/home/runner/work/lilliput/lilliput/deps/linux/lib -lz -lm'

# Names of additional weak libraries provided by this library
weak_library_names=''
Expand All @@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/src/deps/linux/lib'
libdir='/home/runner/work/lilliput/lilliput/deps/linux/lib'
Binary file modified deps/linux/lib/libsharpyuv.a
Binary file not shown.
6 changes: 3 additions & 3 deletions deps/linux/lib/libsharpyuv.la
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# libsharpyuv.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
Expand All @@ -14,7 +14,7 @@ library_names=''
old_library='libsharpyuv.a'

# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' -pthread'
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' -lm'
Expand All @@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/src/deps/linux/lib'
libdir='/home/runner/work/lilliput/lilliput/deps/linux/lib'
Binary file modified deps/linux/lib/libswresample.a
Binary file not shown.
Binary file modified deps/linux/lib/libswscale.a
Binary file not shown.
Binary file modified deps/linux/lib/libturbojpeg.a
Binary file not shown.
Binary file modified deps/linux/lib/libwebp.a
Binary file not shown.
8 changes: 4 additions & 4 deletions deps/linux/lib/libwebp.la
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# libwebp.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
Expand All @@ -14,10 +14,10 @@ library_names=''
old_library='libwebp.a'

# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' -pthread'
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' /src/deps/linux/lib/libsharpyuv.la -lm'
dependency_libs=' /home/runner/work/lilliput/lilliput/deps/linux/lib/libsharpyuv.la -lm'

# Names of additional weak libraries provided by this library
weak_library_names=''
Expand All @@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/src/deps/linux/lib'
libdir='/home/runner/work/lilliput/lilliput/deps/linux/lib'
Binary file modified deps/linux/lib/libwebpdemux.a
Binary file not shown.
8 changes: 4 additions & 4 deletions deps/linux/lib/libwebpdemux.la
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# libwebpdemux.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
Expand All @@ -14,10 +14,10 @@ library_names=''
old_library='libwebpdemux.a'

# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' -pthread'
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' /src/deps/linux/lib/libwebp.la /src/deps/linux/lib/libsharpyuv.la -lm'
dependency_libs=' /home/runner/work/lilliput/lilliput/deps/linux/lib/libwebp.la /home/runner/work/lilliput/lilliput/deps/linux/lib/libsharpyuv.la -lm'

# Names of additional weak libraries provided by this library
weak_library_names=''
Expand All @@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/src/deps/linux/lib'
libdir='/home/runner/work/lilliput/lilliput/deps/linux/lib'
Binary file modified deps/linux/lib/libwebpmux.a
Binary file not shown.
8 changes: 4 additions & 4 deletions deps/linux/lib/libwebpmux.la
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# libwebpmux.la - a libtool library file
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-2
# Generated by libtool (GNU libtool) 2.4.6 Debian-2.4.6-15build2
#
# Please DO NOT delete this file!
# It is necessary for linking the library.
Expand All @@ -14,10 +14,10 @@ library_names=''
old_library='libwebpmux.a'

# Linker flags that cannot go in dependency_libs.
inherited_linker_flags=' -pthread'
inherited_linker_flags=''

# Libraries that this one depends upon.
dependency_libs=' /src/deps/linux/lib/libwebp.la /src/deps/linux/lib/libsharpyuv.la -lm'
dependency_libs=' /home/runner/work/lilliput/lilliput/deps/linux/lib/libwebp.la /home/runner/work/lilliput/lilliput/deps/linux/lib/libsharpyuv.la -lm'

# Names of additional weak libraries provided by this library
weak_library_names=''
Expand All @@ -38,4 +38,4 @@ dlopen=''
dlpreopen=''

# Directory that this library needs to be installed in:
libdir='/src/deps/linux/lib'
libdir='/home/runner/work/lilliput/lilliput/deps/linux/lib'
Binary file modified deps/linux/lib/libz.a
Binary file not shown.
8 changes: 4 additions & 4 deletions deps/linux/lib/pkgconfig/libjpeg.pc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=/src/deps/linux
exec_prefix=/src/deps/linux
libdir=/src/deps/linux/lib
includedir=/src/deps/linux/include
prefix=/home/runner/work/lilliput/lilliput/deps/linux
exec_prefix=/home/runner/work/lilliput/lilliput/deps/linux
libdir=/home/runner/work/lilliput/lilliput/deps/linux/lib
includedir=/home/runner/work/lilliput/lilliput/deps/linux/include

Name: libjpeg
Description: A SIMD-accelerated JPEG codec that provides the libjpeg API
Expand Down
2 changes: 1 addition & 1 deletion deps/linux/lib/pkgconfig/libpng16.pc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=/src/deps/linux
prefix=/home/runner/work/lilliput/lilliput/deps/linux
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include/libpng16
Expand Down
8 changes: 4 additions & 4 deletions deps/linux/lib/pkgconfig/libturbojpeg.pc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
prefix=/src/deps/linux
exec_prefix=/src/deps/linux
libdir=/src/deps/linux/lib
includedir=/src/deps/linux/include
prefix=/home/runner/work/lilliput/lilliput/deps/linux
exec_prefix=/home/runner/work/lilliput/lilliput/deps/linux
libdir=/home/runner/work/lilliput/lilliput/deps/linux/lib
includedir=/home/runner/work/lilliput/lilliput/deps/linux/include

Name: libturbojpeg
Description: A SIMD-accelerated JPEG codec that provides the TurboJPEG API
Expand Down
4 changes: 2 additions & 2 deletions deps/linux/lib/pkgconfig/libwebp.pc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=/src/deps/linux
prefix=/home/runner/work/lilliput/lilliput/deps/linux
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
Expand All @@ -9,4 +9,4 @@ Version: 1.3.1
Requires.private: libsharpyuv
Cflags: -I${includedir}
Libs: -L${libdir} -lwebp
Libs.private: -lm -pthread
Libs.private: -lm
4 changes: 2 additions & 2 deletions deps/linux/lib/pkgconfig/opencv.pc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package Information for pkg-config

prefix=/src/deps/linux
prefix=/home/runner/work/lilliput/lilliput/deps/linux
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv
Expand All @@ -10,5 +10,5 @@ Name: OpenCV
Description: Open Source Computer Vision Library
Version: 3.2.0
Libs: -L${exec_prefix}/lib -lopencv_imgcodecs -lopencv_imgproc -lopencv_core
Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -lippicv -L/src/deps/linux/lib -ljpeg -lwebp -lpng -lz -lstdc++ -ldl -lm -lpthread -lrt
Libs.private: -L${exec_prefix}/share/OpenCV/3rdparty/lib -lippicv -L/usr/lib/x86_64-linux-gnu -ljpeg -L/home/runner/work/lilliput/lilliput/deps/linux/lib -lwebp -lpng -lz -lstdc++ -ldl -lm -lpthread -lrt
Cflags: -I${includedir_old} -I${includedir_new}
2 changes: 1 addition & 1 deletion deps/linux/lib/pkgconfig/zlib.pc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
prefix=/src/deps/linux
prefix=/home/runner/work/lilliput/lilliput/deps/linux
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
sharedlibdir=${libdir}
Expand Down
16 changes: 8 additions & 8 deletions deps/linux/share/OpenCV/OpenCVModules-release.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ set(CMAKE_IMPORT_FILE_VERSION 1)
set_property(TARGET opencv_core APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(opencv_core PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/src/deps/linux/lib/libz.a;stdc++;dl;m;pthread;rt;ippicv"
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "/usr/lib/x86_64-linux-gnu/libz.so;stdc++;dl;m;pthread;rt;ippicv"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libopencv_core.a"
)

list(APPEND _IMPORT_CHECK_TARGETS opencv_core )
list(APPEND _IMPORT_CHECK_FILES_FOR_opencv_core "${_IMPORT_PREFIX}/lib/libopencv_core.a" )
list(APPEND _cmake_import_check_targets opencv_core )
list(APPEND _cmake_import_check_files_for_opencv_core "${_IMPORT_PREFIX}/lib/libopencv_core.a" )

# Import target "opencv_imgproc" for configuration "Release"
set_property(TARGET opencv_imgproc APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
Expand All @@ -24,19 +24,19 @@ set_target_properties(opencv_imgproc PROPERTIES
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libopencv_imgproc.a"
)

list(APPEND _IMPORT_CHECK_TARGETS opencv_imgproc )
list(APPEND _IMPORT_CHECK_FILES_FOR_opencv_imgproc "${_IMPORT_PREFIX}/lib/libopencv_imgproc.a" )
list(APPEND _cmake_import_check_targets opencv_imgproc )
list(APPEND _cmake_import_check_files_for_opencv_imgproc "${_IMPORT_PREFIX}/lib/libopencv_imgproc.a" )

# Import target "opencv_imgcodecs" for configuration "Release"
set_property(TARGET opencv_imgcodecs APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(opencv_imgcodecs PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "CXX"
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "opencv_core;opencv_imgproc;stdc++;dl;m;pthread;rt;ippicv;/src/deps/linux/lib/libz.a;/src/deps/linux/lib/libjpeg.a;/src/deps/linux/lib/libwebp.a;/src/deps/linux/lib/libpng.a;/src/deps/linux/lib/libz.a"
IMPORTED_LINK_INTERFACE_LIBRARIES_RELEASE "opencv_core;opencv_imgproc;stdc++;dl;m;pthread;rt;ippicv;/usr/lib/x86_64-linux-gnu/libz.so;/usr/lib/x86_64-linux-gnu/libjpeg.so;/home/runner/work/lilliput/lilliput/deps/linux/lib/libwebp.a;/usr/lib/x86_64-linux-gnu/libpng.so;/usr/lib/x86_64-linux-gnu/libz.so"
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libopencv_imgcodecs.a"
)

list(APPEND _IMPORT_CHECK_TARGETS opencv_imgcodecs )
list(APPEND _IMPORT_CHECK_FILES_FOR_opencv_imgcodecs "${_IMPORT_PREFIX}/lib/libopencv_imgcodecs.a" )
list(APPEND _cmake_import_check_targets opencv_imgcodecs )
list(APPEND _cmake_import_check_files_for_opencv_imgcodecs "${_IMPORT_PREFIX}/lib/libopencv_imgcodecs.a" )

# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
Loading

0 comments on commit 10f31dd

Please sign in to comment.