Skip to content

Commit a52656f

Browse files
committed
try full
1 parent 0a456ec commit a52656f

File tree

1 file changed

+87
-90
lines changed

1 file changed

+87
-90
lines changed

.github/workflows/ci.yml

Lines changed: 87 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -6,57 +6,57 @@ env:
66
RUSTDOCFLAGS: "-Dwarnings"
77

88
jobs:
9-
# pdfium:
10-
# name: PDFium
11-
# runs-on: ubuntu-latest
12-
# steps:
13-
# - name: Cache PDFium binary
14-
# id: cache-pdfium
15-
# uses: actions/cache@v4
16-
# with:
17-
# path: pdfium
18-
# key: pdfium-binary-v1
19-
# - name: Clone sitro repo
20-
# if: steps.cache-pdfium.outputs.cache-hit != 'true'
21-
# run: |
22-
# git clone https://github.com/LaurenzV/sitro
23-
# - name: Build pdfium
24-
# if: steps.cache-pdfium.outputs.cache-hit != 'true'
25-
# run: |
26-
# cd sitro/src/pdfium
27-
# cargo build --release
28-
# - name: Finish
29-
# if: steps.cache-pdfium.outputs.cache-hit != 'true'
30-
# run: mv sitro/target/release/pdfium pdfium
31-
#
32-
# mupdf:
33-
# name: MuPDF
34-
# runs-on: ubuntu-latest
35-
# steps:
36-
# - name: Cache MuPDF
37-
# id: cache-mupdf
38-
# uses: actions/cache@v4
39-
# with:
40-
# path: mutool
41-
# key: mupdf-binary-v1
42-
# - name: Download MuPDF
43-
# if: steps.cache-mupdf.outputs.cache-hit != 'true'
44-
# run: |
45-
# curl -LO https://mupdf.com/downloads/archive/mupdf-1.24.8-source.tar.gz
46-
# tar -xvzf ./mupdf-1.24.8-source.tar.gz
47-
# - name: Build MuPDF
48-
# if: steps.cache-mupdf.outputs.cache-hit != 'true'
49-
# run: |
50-
# cd mupdf-1.24.8-source
51-
# make HAVE_X11=no HAVE_GLUT=no
52-
# - name: Finish
53-
# if: steps.cache-mupdf.outputs.cache-hit != 'true'
54-
# run: mv mupdf-1.24.8-source/build/release/mutool mutool
9+
pdfium:
10+
name: PDFium
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Cache PDFium binary
14+
id: cache-pdfium
15+
uses: actions/cache@v4
16+
with:
17+
path: pdfium
18+
key: pdfium-binary-v1
19+
- name: Clone sitro repo
20+
if: steps.cache-pdfium.outputs.cache-hit != 'true'
21+
run: |
22+
git clone https://github.com/LaurenzV/sitro
23+
- name: Build pdfium
24+
if: steps.cache-pdfium.outputs.cache-hit != 'true'
25+
run: |
26+
cd sitro/src/pdfium
27+
cargo build --release
28+
- name: Finish
29+
if: steps.cache-pdfium.outputs.cache-hit != 'true'
30+
run: mv sitro/target/release/pdfium pdfium
31+
32+
mupdf:
33+
name: MuPDF
34+
runs-on: ubuntu-latest
35+
steps:
36+
- name: Cache MuPDF
37+
id: cache-mupdf
38+
uses: actions/cache@v4
39+
with:
40+
path: mutool
41+
key: mupdf-binary-v1
42+
- name: Download MuPDF
43+
if: steps.cache-mupdf.outputs.cache-hit != 'true'
44+
run: |
45+
curl -LO https://mupdf.com/downloads/archive/mupdf-1.24.8-source.tar.gz
46+
tar -xvzf ./mupdf-1.24.8-source.tar.gz
47+
- name: Build MuPDF
48+
if: steps.cache-mupdf.outputs.cache-hit != 'true'
49+
run: |
50+
cd mupdf-1.24.8-source
51+
make HAVE_X11=no HAVE_GLUT=no
52+
- name: Finish
53+
if: steps.cache-mupdf.outputs.cache-hit != 'true'
54+
run: mv mupdf-1.24.8-source/build/release/mutool mutool
5555

5656
tests:
5757
name: Tests
5858
runs-on: ubuntu-latest
59-
# needs: [pdfium, mupdf]
59+
needs: [pdfium, mupdf]
6060
defaults:
6161
run:
6262
shell: bash
@@ -92,46 +92,43 @@ jobs:
9292
- name: Install poppler-utils
9393
run: |
9494
sudo apt-get install -y poppler-utils
95-
where pdftoppm
96-
97-
#
98-
# - name: Download the pdfium library
99-
# run: |
100-
# curl -LO https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5880/pdfium-linux-x64.tgz
101-
# mkdir pdfium-linux-x64
102-
# tar -xvzf ./pdfium-linux-x64.tgz -C pdfium-linux-x64
103-
# sudo mv ./pdfium-linux-x64/lib/libpdfium.so /usr/lib
104-
# rm -r pdfium-linux-x64.tgz
105-
# rm -r pdfium-linux-x64
106-
#
107-
# - name: Get pdfbox
108-
# run: |
109-
# curl -LO https://dlcdn.apache.org/pdfbox/3.0.3/pdfbox-app-3.0.3.jar
110-
# mv pdfbox-app-3.0.3.jar pdfbox.jar
111-
# ls .
112-
#
113-
# - name: Clone sitro
114-
# run: |
115-
# git clone https://github.com/LaurenzV/sitro
116-
#
117-
# - name: npm install
118-
# run: |
119-
# cd sitro/src/pdfjs
120-
# npm i
121-
#
122-
# - name: Setup
123-
# run: |
124-
# sudo chmod +x pdftopng
125-
# sudo chmod +x pdfium
126-
# sudo chmod +x mutool
127-
# echo "XPDF_BIN=$(pwd)/pdftopng" >> $GITHUB_ENV
128-
# echo "PDFIUM_BIN=$(pwd)/pdfium" >> $GITHUB_ENV
129-
# echo "PDFBOX_BIN=$(pwd)/pdfbox.jar" >> $GITHUB_ENV
130-
# echo "PDFJS_BIN=$(pwd)/sitro/src/pdfjs/pdfjs_render.mjs" >> $GITHUB_ENV
131-
# echo "MUPDF_BIN=$(pwd)/mutool" >> $GITHUB_ENV
132-
#
133-
# - name: Build
134-
# run: cargo build --release
135-
#
136-
# - name: Run tests
137-
# run: cargo test --release
95+
96+
- name: Download the pdfium library
97+
run: |
98+
curl -LO https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5880/pdfium-linux-x64.tgz
99+
mkdir pdfium-linux-x64
100+
tar -xvzf ./pdfium-linux-x64.tgz -C pdfium-linux-x64
101+
sudo mv ./pdfium-linux-x64/lib/libpdfium.so /usr/lib
102+
rm -r pdfium-linux-x64.tgz
103+
rm -r pdfium-linux-x64
104+
105+
- name: Get pdfbox
106+
run: |
107+
curl -LO https://dlcdn.apache.org/pdfbox/3.0.3/pdfbox-app-3.0.3.jar
108+
mv pdfbox-app-3.0.3.jar pdfbox.jar
109+
ls .
110+
111+
- name: Clone sitro
112+
run: |
113+
git clone https://github.com/LaurenzV/sitro
114+
115+
- name: npm install
116+
run: |
117+
cd sitro/src/pdfjs
118+
npm i
119+
120+
- name: Setup
121+
run: |
122+
sudo chmod +x pdfium
123+
sudo chmod +x mutool
124+
echo "POPPLER_BIN=$(pwd)/pdftoppm" >> $GITHUB_ENV
125+
echo "PDFIUM_BIN=$(pwd)/pdfium" >> $GITHUB_ENV
126+
echo "PDFBOX_BIN=$(pwd)/pdfbox.jar" >> $GITHUB_ENV
127+
echo "PDFJS_BIN=$(pwd)/sitro/src/pdfjs/pdfjs_render.mjs" >> $GITHUB_ENV
128+
echo "MUPDF_BIN=$(pwd)/mutool" >> $GITHUB_ENV
129+
130+
- name: Build
131+
run: cargo build --release
132+
133+
- name: Run tests
134+
run: cargo test --release

0 commit comments

Comments
 (0)