Resolves #142 #31
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To run locally using act, use command: | |
# act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:rust-latest | |
# See: https://github.com/nektos/act/issues/297 | |
name: Auto-build pdfium-render | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
PDFIUM_RELEASE_TAG: 6281 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build | |
run: cargo build --verbose | |
- name: Download Pdfium | |
run: curl -L -o "pdfium.tgz" "https://github.com/bblanchon/pdfium-binaries/releases/download/chromium/${PDFIUM_RELEASE_TAG}/pdfium-linux-x64.tgz" | |
- name: Unpack Pdfium | |
run: mkdir pdfium && tar -xvzf pdfium.tgz -C pdfium | |
- name: Install Pdfium | |
run: cp pdfium/lib/libpdfium.so . | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Verify static linking compatibility | |
run: cargo check --features="static" | |
- name: Verify WASM compatibility | |
run: cargo install wasm-pack && wasm-pack build examples/ --target no-modules |