comparison mupdf-source/thirdparty/leptonica/.github/workflows/cmake-win64.yml @ 2:b50eed0cc0ef upstream

ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4. The directory name has changed: no version number in the expanded directory now.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 15 Sep 2025 11:43:07 +0200
parents
children
comparison
equal deleted inserted replaced
1:1d09e1dec1d9 2:b50eed0cc0ef
1 name: cmake-win64
2
3 on:
4 push:
5 branches: [ "master" ]
6 pull_request:
7 branches: [ "master" ]
8 workflow_dispatch:
9
10 env:
11 ILOC: d:/a/local
12
13 jobs:
14 build:
15 name: cmake-win64
16 runs-on: windows-latest
17 steps:
18 - uses: ilammy/setup-nasm@v1
19 - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
20 uses: actions/checkout@v4
21 with:
22 submodules: recursive
23 - run: git fetch --prune --unshallow --tags
24 - name: Get the version
25 id: get_version
26 run: |
27 $git_info=$(git describe --tags HEAD)
28 echo "version=${git_info}" >> $env:GITHUB_OUTPUT
29 - name: Setup Installation Location
30 run: |
31 mkdir ${{env.ILOC}}
32 - name: Uninstall Perl
33 run: |
34 choco uninstall strawberryperl
35
36 - name: Build and Install zlib-ng
37 shell: cmd
38 run: |
39 git clone --depth 1 https://github.com/zlib-ng/zlib-ng.git
40 cd zlib-ng
41 cmake -Bbuild -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DBUILD_SHARED_LIBS=OFF -DZLIB_COMPAT=ON -DZLIB_ENABLE_TESTS=OFF -DINSTALL_UTILS=OFF
42 cmake --build build --config Release --target install
43 cd ..
44
45 - name: Build and Install libpng
46 shell: cmd
47 run: |
48 curl -sSL https://download.sourceforge.net/libpng/lpng1643.zip -o lpng1643.zip
49 unzip.exe -qq lpng1643.zip
50 cd lpng1643
51 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DPNG_TESTS=OFF -DPNG_SHARED=OFF
52 cmake --build build --config Release --target install
53 cd ..
54
55 - name: Build and Install giflib
56 shell: cmd
57 run: |
58 git clone --depth 1 https://github.com/xbmc/giflib.git
59 cd giflib
60 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}}
61 cmake --build build --config Release --target install
62 cd ..
63
64 - name: Build and Install libjpeg
65 shell: cmd
66 run: |
67 git clone --depth 1 https://github.com/libjpeg-turbo/libjpeg-turbo.git
68 cd libjpeg-turbo
69 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DWITH_TURBOJPEG=OFF
70 cmake --build build --config Release --target install
71 cd ..
72
73 - name: Build and Install openjpeg
74 shell: cmd
75 run: |
76 git clone --depth 1 https://github.com/uclouvain/openjpeg.git
77 cd openjpeg
78 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}}
79 cmake --build build --config Release --target install
80 cd ..
81
82 - name: Build and Install webp
83 shell: cmd
84 run: |
85 git clone --depth 1 https://chromium.googlesource.com/webm/libwebp
86 cd libwebp
87 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DWEBP_BUILD_WEBP_JS=OFF -DWEBP_BUILD_ANIM_UTILS=OFF -DWEBP_BUILD_CWEBP=OFF -DWEBP_BUILD_DWEBP=OFF -DWEBP_BUILD_GIF2WEBP=OFF -DWEBP_BUILD_IMG2WEBP=OFF -DWEBP_BUILD_VWEBP=OFF -DWEBP_BUILD_WEBPMUX=OFF -DWEBP_BUILD_EXTRAS=OFF -DWEBP_BUILD_WEBP_JS=OFF
88 cmake --build build --config Release --target install
89 cd ..
90
91 - name: Build and Install jbigkit
92 shell: cmd
93 run: |
94 git clone --depth 1 https://github.com/zdenop/jbigkit.git
95 cd jbigkit
96 cmake -Bbuild -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DBUILD_PROGRAMS=OFF -DBUILD_TOOLS=OFF -DCMAKE_WARN_DEPRECATED=OFF
97 cmake --build build --config Release --target install
98 cd ..
99
100 - name: Build and Install zstd
101 shell: cmd
102 run: |
103 git clone --depth 1 https://github.com/facebook/zstd.git
104 cd zstd\build\cmake
105 cmake -Bbuild -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}}
106 cmake --build build --config Release --target install
107 cd ..
108
109 - name: Build and Install lzma
110 shell: cmd
111 run: |
112 curl -sSL https://sourceforge.net/projects/lzmautils/files/xz-5.4.3.tar.zst/download -o xz-5.4.5.tar.zst
113 zstd -d xz-5.4.5.tar.zst
114 tar xf xz-5.4.5.tar
115 cd xz-5.4.5
116 ; git clone --depth 1 https://github.com/tukaani-project/xz.git
117 ; cd xz
118 ; cmake -Bbuild -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON
119 ; cmake --build build --config Release --target install
120 ; cd ..
121
122 - name: Build and Install libtiff
123 shell: cmd
124 run: |
125 git clone --depth 1 https://gitlab.com/libtiff/libtiff.git
126 cd libtiff
127 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -Dtiff-tools=OFF -Dtiff-tests=OFF -Dtiff-contrib=OFF -Dtiff-docs=OFF
128 cmake --build build --config Release --target install
129 cd ..
130
131 - name: Build and Install leptonica
132 shell: cmd
133 run: |
134 cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${{env.ILOC}} -DCMAKE_INSTALL_PREFIX=${{env.ILOC}} -DSW_BUILD=OFF -DBUILD_PROG=OFF -DBUILD_SHARED_LIBS=ON -DBUILD_PROG=ON
135 cmake --build build --config Release --target install
136
137 - name: Test leptonica
138 shell: cmd
139 run: |
140 echo "Testing leptonica..."
141 ${{env.ILOC}}/bin/fileinfo prog/test-rgb.png
142
143 - name: Remove not needed tools
144 shell: cmd
145 run: >
146 rm -Rf ${{env.ILOC}}/bin/*.exe
147
148 - name: Upload Build Results
149 uses: actions/upload-artifact@v4
150 with:
151 name: leptonica-${{ steps.get_version.outputs.version }}-VS2019_win64
152 path: ${{env.ILOC}}
153 retention-days: 5