Skip to content

Commit db977cf

Browse files
authored
Merge pull request #77 from mufeedvh/release/v3.0.0
release: ship pdfrip v3.0.0
2 parents 66c71d4 + fff3739 commit db977cf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+9010
-536
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Keep PDF test fixtures byte-for-byte stable across platforms so xref offsets remain valid.
2+
*.pdf binary

.github/workflows/ci.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,21 @@ jobs:
2525
with:
2626
toolchain: ${{ matrix.rust-version }}
2727
- name: Build
28-
run: cargo build --all --verbose
28+
run: cargo build --workspace --locked --verbose
2929
- name: Test
30-
run: cargo test --all --verbose
30+
run: cargo test --workspace --locked --verbose
31+
install_smoke_test:
32+
name: Cargo install smoke test
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
- name: Install Rust
38+
uses: dtolnay/rust-toolchain@stable
39+
- name: Install from source
40+
run: cargo install --path . --locked --force --root "${{ runner.temp }}/pdfrip-install"
41+
- name: Verify installed binary
42+
run: '${{ runner.temp }}/pdfrip-install/bin/pdfrip --help'
3143
lint:
3244
name: Clippy and fmt
3345
runs-on: ubuntu-latest
@@ -41,4 +53,26 @@ jobs:
4153
- name: Check formatting
4254
run: cargo fmt --check
4355
- name: Check for clippy lints
44-
run: cargo clippy
56+
run: cargo clippy --workspace --all-targets --locked -- -D warnings
57+
benchmark_build:
58+
name: Benchmark harness build
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
- name: Install Rust
64+
uses: dtolnay/rust-toolchain@stable
65+
- name: Build benchmark harness
66+
run: cargo bench --bench throughput --no-run --locked --verbose
67+
qpdf_oracle_tests:
68+
name: qpdf oracle tests
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
- name: Install Rust
74+
uses: dtolnay/rust-toolchain@stable
75+
- name: Install qpdf
76+
run: sudo apt-get update && sudo apt-get install -y qpdf
77+
- name: Run qpdf-backed verifier agreement tests
78+
run: PDFRIP_QPDF_TESTS=1 cargo test -p cracker --test prepared_verifier --locked --verbose

.github/workflows/release.yml

Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,52 +7,54 @@ on:
77
jobs:
88
build-ubuntu:
99
runs-on: ubuntu-latest
10-
1110
steps:
1211
- name: Checkout
13-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1413

1514
- name: Install latest rust toolchain
16-
uses: actions-rs/toolchain@v1
17-
with:
18-
toolchain: stable
19-
default: true
20-
override: true
21-
15+
uses: dtolnay/rust-toolchain@stable
16+
17+
- name: Install qpdf
18+
run: sudo apt-get update && sudo apt-get install -y qpdf
19+
2220
- name: Test
23-
run: cargo test --all
21+
run: cargo test --workspace --locked --verbose
22+
23+
- name: Run qpdf-backed verifier agreement tests
24+
run: PDFRIP_QPDF_TESTS=1 cargo test -p cracker --test prepared_verifier --locked --verbose
25+
26+
- name: Build benchmark harness
27+
run: cargo bench --bench throughput --no-run --locked --verbose
2428

2529
- name: Build
26-
run: cargo build --all --release && strip target/release/pdfrip && mv target/release/pdfrip target/release/pdfrip_amd64
30+
run: cargo build --workspace --release --locked --verbose && strip target/release/pdfrip && mv target/release/pdfrip target/release/pdfrip_amd64
2731

2832
- name: Release
2933
uses: softprops/action-gh-release@v1
3034
if: startsWith(github.ref, 'refs/tags/')
3135
with:
3236
files: |
33-
target/release/pdfrip_amd64
37+
target/release/pdfrip_amd64
3438
env:
3539
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3640

3741
build-win:
3842
runs-on: windows-latest
39-
4043
steps:
4144
- name: Checkout
42-
uses: actions/checkout@v2
45+
uses: actions/checkout@v4
4346

4447
- name: Install latest rust toolchain
45-
uses: actions-rs/toolchain@v1
46-
with:
47-
toolchain: stable
48-
default: true
49-
override: true
48+
uses: dtolnay/rust-toolchain@stable
5049

5150
- name: Test
52-
run: cargo test --all
51+
run: cargo test --workspace --locked --verbose
52+
53+
- name: Build benchmark harness
54+
run: cargo bench --bench throughput --no-run --locked --verbose
5355

5456
- name: Build
55-
run: cargo build --all --release
57+
run: cargo build --workspace --release --locked --verbose
5658

5759
- name: Release
5860
uses: softprops/action-gh-release@v1
@@ -64,24 +66,23 @@ jobs:
6466

6567
build-mac:
6668
runs-on: macos-latest
67-
6869
steps:
6970
- name: Checkout
70-
uses: actions/checkout@v2
71+
uses: actions/checkout@v4
7172

7273
- name: Install latest rust toolchain
73-
uses: actions-rs/toolchain@v1
74+
uses: dtolnay/rust-toolchain@stable
7475
with:
75-
toolchain: stable
7676
target: x86_64-apple-darwin
77-
default: true
78-
override: true
7977

8078
- name: Test
81-
run: cargo test --all
79+
run: cargo test --workspace --locked --verbose
80+
81+
- name: Build benchmark harness
82+
run: cargo bench --bench throughput --no-run --locked --verbose
8283

8384
- name: Build for mac
84-
run: cargo build --all --release && strip target/release/pdfrip && mv target/release/pdfrip target/release/pdfrip_darwin
85+
run: cargo build --workspace --release --locked --verbose && strip target/release/pdfrip && mv target/release/pdfrip target/release/pdfrip_darwin
8586

8687
- name: Release
8788
uses: softprops/action-gh-release@v1

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
# will have compiled files and executables
33
/target/
44

5-
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
5+
# Track Cargo.lock for this executable workspace so locked CI and release builds stay reproducible.
66
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
7-
Cargo.lock
87

98
# These are backup files generated by rustfmt
109
**/*.rs.bk

0 commit comments

Comments
 (0)