Skip to content

Commit

Permalink
Fix linux and windows release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
szabadka committed Aug 2, 2024
1 parent 73b1bf8 commit 7330bc8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,27 +89,27 @@ jobs:
-DJPEGXL_ENABLE_VIEWERS=OFF \
-DJPEGXL_ENABLE_PLUGINS=OFF \
-DJPEGXL_ENABLE_OPENEXR=OFF \
-DJPEGXL_ENABLE_DEVTOOLS=ON \
-DJPEGXL_ENABLE_DEVTOOLS=OFF \
- name: Package release tarball
run: |
cd build
tar -zcvf ${{ runner.workspace }}/release_file.tar.gz \
LICENSE* tools/{cjxl,djxl,benchmark_xl,cjpegli,djpegli,jxlinfo,butteraugli_main,ssimulacra2}
LICENSE* tools/{cjpegli,djpegli}
ln -s ${{ runner.workspace }}/release_file.tar.gz \
${{ runner.workspace }}/jxl-linux-x86_64-static-${{ github.event.release.tag_name }}.tar.gz
${{ runner.workspace }}/jpegli-linux-x86_64-static-${{ github.event.release.tag_name }}.tar.gz
- name: Upload artifacts
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: jxl-linux-x86_64-static
name: jpegli-linux-x86_64-static
path: ${{ runner.workspace }}/release_file.tar.gz

- name: Upload binaries to release
if: github.event_name == 'release'
uses: AButler/upload-release-assets@3d6774fae0ed91407dc5ae29d576b166536d1777 # v3.0
with:
files: ${{ runner.workspace }}/jxl-linux-x86_64-static-${{ github.event.release.tag_name }}.tar.gz
files: ${{ runner.workspace }}/jpegli-linux-x86_64-static-${{ github.event.release.tag_name }}.tar.gz
repo-token: ${{ secrets.GITHUB_TOKEN }}


Expand Down Expand Up @@ -350,8 +350,7 @@ jobs:
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
cp LICENSE prefix/bin/LICENSE.jpegli
- name: Fast benchmark ${{ matrix.triplet }}
shell: 'bash'
Expand All @@ -367,7 +366,7 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
with:
name: jxl-${{matrix.triplet}}
name: jpegli-${{matrix.triplet}}
path: |
prefix/bin/*
prefix/lib/*
Expand All @@ -377,11 +376,11 @@ jobs:
shell: 'powershell'
run: |
Compress-Archive -Path prefix\bin\*, prefix\lib\* `
-DestinationPath jxl-${{matrix.triplet}}.zip
-DestinationPath jpegli-${{matrix.triplet}}.zip
- name: Upload binaries to release
if: github.event_name == 'release'
uses: AButler/upload-release-assets@3d6774fae0ed91407dc5ae29d576b166536d1777 # v3.0
with:
files: jxl-${{matrix.triplet}}.zip
files: jpegli-${{matrix.triplet}}.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}
11 changes: 7 additions & 4 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,13 @@ endif() # JPEGXL_ENABLE_TOOLS

# Other developer tools.
if(JPEGXL_ENABLE_DEVTOOLS)
list(APPEND INTERNAL_TOOL_BINARIES
ssimulacra2
)

add_executable(ssimulacra2 ssimulacra2_main.cc ssimulacra2.cc)
target_link_libraries(ssimulacra2 jxl_gauss_blur)

list(APPEND FUZZER_CORPUS_BINARIES jpegli_dec_fuzzer_corpus)
add_executable(jpegli_dec_fuzzer_corpus jpegli_dec_fuzzer_corpus.cc)
target_link_libraries(jpegli_dec_fuzzer_corpus
Expand All @@ -97,7 +104,6 @@ endif() # JPEGXL_ENABLE_DEVTOOLS
if(JPEGXL_ENABLE_BENCHMARK AND JPEGXL_ENABLE_TOOLS)
list(APPEND INTERNAL_TOOL_BINARIES
benchmark_xl
ssimulacra2
)

add_executable(benchmark_xl
Expand All @@ -116,9 +122,6 @@ if(JPEGXL_ENABLE_BENCHMARK AND JPEGXL_ENABLE_TOOLS)
target_link_libraries(benchmark_xl Threads::Threads)
target_link_libraries(benchmark_xl jxl_gauss_blur) # for ssimulacra

add_executable(ssimulacra2 ssimulacra2_main.cc ssimulacra2.cc)
target_link_libraries(ssimulacra2 jxl_gauss_blur)

if(MINGW)
# MINGW doesn't support glob.h.
target_compile_definitions(benchmark_xl PRIVATE "-DHAS_GLOB=0")
Expand Down

0 comments on commit 7330bc8

Please sign in to comment.