Skip to content

Commit

Permalink
Try vckg triplet overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
eustas committed Apr 26, 2024
1 parent 4da4b9a commit 166d0df
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 17 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/build_test_msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ concurrency:
jobs:
build_test:
name: Windows MSYS2 / ${{ matrix.msystem }}
if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
#if: ${{ !contains(github.event.pull_request.labels.*.name, 'CI:none') }}
runs-on: windows-latest
continue-on-error: ${{ matrix.faulty || false }}
strategy:
Expand Down Expand Up @@ -82,6 +82,8 @@ jobs:
run: |
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DJPEGXL_STATIC=ON \
-DCMAKE_INSTALL_PREFIX=`pwd`/prefix \
-DJPEGXL_ENABLE_JNI=OFF \
-DJPEGXL_ENABLE_MANPAGES=OFF \
-DJPEGXL_FORCE_SYSTEM_BROTLI=ON \
Expand All @@ -92,6 +94,18 @@ jobs:
- name: CMake build
run: cmake --build build

- name: CMake Install
shell: 'bash'
run: |
set -x
cmake --build build --target install
# TODO(eustas): giflib libjpeg-turbo libpng libwebp zlib
cp third_party/sjpeg/COPYING prefix/bin/LICENSE.sjpeg
cp third_party/skcms/LICENSE prefix/bin/LICENSE.skcms
cp third_party/highway/LICENSE prefix/bin/LICENSE.highway
cp third_party/brotli/LICENSE prefix/bin/LICENSE.brotli
cp LICENSE prefix/bin/LICENSE.libjxl
- name: Test
if: |
github.event_name == 'push' ||
Expand All @@ -108,3 +122,11 @@ jobs:
export TMPDIR=`pwd`/tmp
export PATH=$PATH:`pwd`/build/lib
BENCHMARK_NUM_THREADS=2 STORE_IMAGES=0 ./ci.sh fast_benchmark
- name: Upload artifacts
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: jxl-${{ matrix.msystem }}
path: |
prefix/bin/*
prefix/lib/*
47 changes: 32 additions & 15 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,23 +245,27 @@ jobs:
fail-fast: false
matrix:
include:
- triplet: x86-windows-static
arch: '-A Win32'
- triplet: x64-windows-static
arch: '-A x64'
run_benchmark: true
- triplet: x86-windows
arch: '-A Win32'
static: 'OFF'
tools: 'OFF'
- triplet: x64-windows
arch: '-A x64'
#- triplet: x86-windows-static
# arch: '-A Win32'
- triplet: x64-mingw-dynamic
static: 'OFF'
tools: 'OFF'
arch: ''
run_benchmark: true
#- triplet: x86-windows
# arch: '-A Win32'
# static: 'OFF'
# tools: 'OFF'
#- triplet: x64-windows
# arch: '-A x64'
# static: 'OFF'
# tools: 'OFF'

env:
VCPKG_VERSION: '2023.12.12'
VCPKG_VERSION: '2024.02.14'
VCPKG_ROOT: vcpkg
VCPKG_OVERLAY_TRIPLETS: ${{ github.workspace }}/vcpkg_triplets
VCPKG_DEFAULT_TRIPLET: ${{ matrix.triplet }}
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.triplet }}
VCPKG_DISABLE_METRICS: 1

steps:
Expand All @@ -276,6 +280,13 @@ jobs:
submodules: true
fetch-depth: 2

- name: Checkout Triplets
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: Neumann-A/my-vcpkg-triplets
ref: 197b1f3b40434a38d3901c08cba19a63eacf2be2
path: vcpkg_triplets

- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
id: cache-vcpkg
with:
Expand Down Expand Up @@ -304,33 +315,39 @@ jobs:
shell: 'bash'
run: |
set -x
${VCPKG_ROOT}/vcpkg --triplet ${{ matrix.triplet }} install \
${VCPKG_ROOT}/vcpkg install \
giflib \
libjpeg-turbo \
libpng \
libwebp \
pkgconf \
#
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@a283f9441d2d96eb62436dc46d7014f5d357ac22 # v3.17

- name: Configure
shell: 'bash'
run: |
set -x
rm -rf /c/Strawberry/perl
mkdir build
cmake -Bbuild -H. ${{ matrix.arch }} \
-DJPEGXL_STATIC=${{ matrix.static || 'ON'}} \
-DJPEGXL_ENABLE_TOOLS=${{ matrix.tools || 'ON'}} \
-DBUILD_TESTING=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=`pwd`/prefix \
-G "MinGW Makefiles" \
-DFOO="${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" \
-DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \
-DJPEGXL_ENABLE_JPEGLI_LIBJPEG=OFF \
-DJPEGXL_ENABLE_OPENEXR=OFF \
-DJPEGXL_ENABLE_PLUGINS=OFF \
-DJPEGXL_ENABLE_TCMALLOC=OFF \
-DJPEGXL_ENABLE_VIEWERS=OFF \
-DJPEGXL_ENABLE_DEVTOOLS=${{ matrix.tools || 'ON'}} \
-DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
#
- name: Build
shell: 'bash'
Expand Down
2 changes: 1 addition & 1 deletion tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ if(JPEGXL_ENABLE_BENCHMARK AND JPEGXL_ENABLE_TOOLS)
endif()

pkg_check_modules(AVIF IMPORTED_TARGET libavif)
if(AVIF_FOUND)
if(AVIF_FOUND AND NOT JPEGXL_STATIC)
target_sources(benchmark_xl PRIVATE
"${CMAKE_CURRENT_LIST_DIR}/benchmark/benchmark_codec_avif.cc"
"${CMAKE_CURRENT_LIST_DIR}/benchmark/benchmark_codec_avif.h"
Expand Down

0 comments on commit 166d0df

Please sign in to comment.