-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (44 loc) · 1.49 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Continuous integration
on: [push, pull_request]
env:
RUSTFLAGS: "-Dwarnings"
RUSTDOCFLAGS: "-Dwarnings"
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Get Rust cache
uses: Swatinem/rust-cache@v2
- name: Get pdfium
run: |
curl -LO https://github.com/bblanchon/pdfium-binaries/releases/download/chromium%2F5880/pdfium-linux-x64.tgz
mkdir pdfium-linux-x64
tar -xvzf ./pdfium-linux-x64.tgz -C pdfium-linux-x64
sudo mv ./pdfium-linux-x64/lib/libpdfium.so /usr/lib
- name: Get xpdf
run: |
curl -LO https://dl.xpdfreader.com/xpdf-tools-linux-4.05.tar.gz
tar -xvzf ./xpdf-tools-linux-4.05.tar.gz
ls $(pwd)/xpdf-tools-linux-4.05/bin64
echo "XPDF_BIN=$(pwd)/xpdf-tools-linux-4.05/bin64/pdftopng" >> $GITHUB_ENV
- name: Clone sitro repository
run: |
git clone https://github.com/LaurenzV/sitro
- name: Build pdfium binary
run: |
cd sitro/src/pdfium
cargo build --release
- name: Set PDFIUM_BIN environment variable
run: echo "PDFIUM_BIN=$(pwd)/sitro/target/release/pdfium" >> $GITHUB_ENV
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test --release