Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
167 commits
Select commit Hold shift + click to select a range
7074523
refactor: establish 0.8 library module boundaries
das-Abroxas Aug 11, 2026
008de39
refactor: centralize private format codec
das-Abroxas Aug 11, 2026
74ef34c
test: add format fuzz harnesses
das-Abroxas Aug 11, 2026
26d8cf7
refactor: add validated immutable archive index
das-Abroxas Aug 11, 2026
72d6746
refactor: isolate crypto and block processing
das-Abroxas Aug 11, 2026
9325f7d
refactor: replace reader with positioned sources
das-Abroxas Aug 11, 2026
a14dc14
refactor: replace writer with streaming lifecycle
das-Abroxas Aug 11, 2026
f101b40
refactor: rebuild direct archive append
das-Abroxas Aug 11, 2026
4c17100
refactor: isolate filesystem and presentation adapters
das-Abroxas Aug 11, 2026
584a85d
refactor: migrate CLI to archive APIs
das-Abroxas Aug 11, 2026
7499a44
chore: finalize 0.8 release packaging
das-Abroxas Aug 11, 2026
f7a19cd
test: add benchmark harnesses for adapters, archive I/O, path operati…
das-Abroxas Aug 11, 2026
e8598fd
ci: separate correctness checks
das-Abroxas Aug 12, 2026
bf5e79f
ci: separate static checks
das-Abroxas Aug 12, 2026
a2a604c
ci: focus coverage targets
das-Abroxas Aug 12, 2026
91f4845
ci: add bounded fuzzing
das-Abroxas Aug 12, 2026
eca7a27
ci: align release validation
das-Abroxas Aug 12, 2026
7a6290e
docs: update workflow guidance
das-Abroxas Aug 12, 2026
0437144
docs: define common format encoding
das-Abroxas Sep 1, 2026
a39e627
docs: specify encoded data structures
das-Abroxas Sep 1, 2026
3c5e03e
docs: clarify directory encryption placement
das-Abroxas Sep 1, 2026
e4976ab
docs: define local block boundaries
das-Abroxas Sep 1, 2026
7b16173
docs: specify terminal directory lookup
das-Abroxas Sep 1, 2026
8aaed55
docs: specify optional encryption suite
das-Abroxas Sep 1, 2026
ed82f3b
docs: define compression flag semantics
das-Abroxas Sep 1, 2026
5a14e53
docs: define additive append semantics
das-Abroxas Sep 1, 2026
700465d
docs: define parent directory invariants
das-Abroxas Sep 1, 2026
0f9db1a
docs: define reference relationship semantics
das-Abroxas Sep 1, 2026
60e7530
docs: define optional capability behavior
das-Abroxas Sep 1, 2026
488f3c3
docs: define hash-only block identity
das-Abroxas Sep 1, 2026
c6f8c84
docs: improve specification navigation
das-Abroxas Sep 2, 2026
d73b4e1
docs: define archive entry validity
das-Abroxas Sep 2, 2026
ed629ad
docs: define block resolution boundaries
das-Abroxas Sep 2, 2026
87b1a3e
docs: clarify format security properties
das-Abroxas Sep 2, 2026
3ab02cc
docs: streamline specification presentation
das-Abroxas Sep 2, 2026
e3cc5ff
docs: add conformance vector appendix
das-Abroxas Sep 2, 2026
acfa413
test: verify draft conformance vectors
das-Abroxas Sep 4, 2026
9331fbd
docs: refine ULEB128 encoding rules and recipient-grant equivalence c…
das-Abroxas Sep 12, 2026
4c229ba
feat: adopt the Pithos 1.0 header codec
das-Abroxas Sep 12, 2026
1bfa638
feat: enforce directory record semantics
das-Abroxas Sep 12, 2026
1c34000
feat: enforce stored hierarchy ordering
das-Abroxas Sep 12, 2026
9eda18a
feat: validate effective local block regions
das-Abroxas Sep 13, 2026
f0a6b2b
feat: validate recipient grant identity
das-Abroxas Sep 13, 2026
9856118
feat: resolve direct block lists
das-Abroxas Sep 13, 2026
d56541e
feat: require external access policy
das-Abroxas Sep 13, 2026
5212a81
feat: add plain base archives
das-Abroxas Sep 13, 2026
fb45d2c
feat: restore stored extraction modes
das-Abroxas Sep 13, 2026
1e45e68
refactor: split format components
das-Abroxas Sep 13, 2026
cf0cfd8
refactor: enhance specification clarity with improved segment structu…
das-Abroxas Sep 30, 2026
5237899
merge: Merge pull request #36 from arunaengine/feat/spec-hardening
das-Abroxas Sep 30, 2026
09ba350
feat: add format version 1.1 with derived recipient grant keys
St4NNi Oct 3, 2026
7320575
feat: read block lists sealed in independent pieces
St4NNi Oct 3, 2026
ba41fc9
feat: encode sealed block list pieces
St4NNi Oct 3, 2026
312cc76
feat: compose pieces into an archive without opening keys
St4NNi Oct 3, 2026
7e4e5c3
feat: check archive metadata against a trusted digest
St4NNi Oct 3, 2026
1ad7886
feat: grant readers every piece key of a composed file
St4NNi Oct 3, 2026
78c05b5
feat: make the RO-Crate and Crypt4GH adapters optional features
St4NNi Oct 3, 2026
2f4b7af
test: add a version 1.1 conformance vector for sealed pieces
St4NNi Oct 3, 2026
7e4e77f
chore: add the grant key crates to the fuzz lockfile
St4NNi Oct 3, 2026
2e8c278
fix: correct the grant nonce collision scope in the spec
St4NNi Oct 3, 2026
61a0ef9
feat: add unique-key blocks to format version 1.1
St4NNi Oct 3, 2026
9ef1ded
test: cover unique-key blocks in archives, pieces and appends
St4NNi Oct 3, 2026
9c75501
feat: add AES-256-GCM block payloads to format version 1.1
St4NNi Oct 3, 2026
bd87e2d
test: cover AES-256-GCM payloads and mixed ciphers
St4NNi Oct 3, 2026
1ebb64d
chore: add the AES-256-GCM crates to the fuzz lockfile
St4NNi Oct 3, 2026
1552031
fix: limit direct block key use to ChaCha20-Poly1305 payloads in the …
St4NNi Oct 3, 2026
025e348
test: cover compressed and appended version 1.1 blocks
St4NNi Oct 3, 2026
fd1e87e
feat: write fixed 4 MiB blocks by default and keep FastCDC as an option
St4NNi Oct 3, 2026
588f87d
feat: split written piece content into fixed-size blocks
St4NNi Oct 3, 2026
ee17916
feat: admit 5 TiB objects in the default open limits
St4NNi Oct 3, 2026
7e3bd3d
feat: report the whole-file BLAKE3 of composed pieces
St4NNi Oct 3, 2026
7076f6e
test: cover content hashes of composed pieces
St4NNi Oct 3, 2026
2ee4a0d
chore: raise the minimum Rust version to 1.89
St4NNi Oct 3, 2026
e455971
fix: refuse block size changes after piece content started
St4NNi Oct 3, 2026
db71e73
fix: describe short blocks at the end of every piece in the spec
St4NNi Oct 3, 2026
38225b9
refactor: hold opened archive state in an archive view
St4NNi Oct 3, 2026
fccf375
chore: update the agent guide for format 1.1 and Rust 1.89
St4NNi Oct 3, 2026
39befd3
refactor: move post-chain open validation into the opener module
St4NNi Oct 3, 2026
e1e02fb
feat: add a sans-I/O archive opener
St4NNi Oct 3, 2026
8c712c1
feat: plan reads as lazy block tokens and decode them from one read
St4NNi Oct 3, 2026
4247cdb
feat: check block markers when blocks are read instead of at open
St4NNi Oct 3, 2026
3abd2c2
feat: coalesce contiguous local block reads into bounded batches
St4NNi Oct 3, 2026
a4085a7
test: cover the archive opener request sequence, feeds, limits and re…
St4NNi Oct 3, 2026
1b0e1e0
fix: admit the largest encrypted block in the default stored block limit
St4NNi Oct 3, 2026
e55229d
fix: resolve block list pieces without extra copies of the list
St4NNi Oct 3, 2026
894c011
feat: let the opener release each directory response after decoding
St4NNi Oct 3, 2026
55f046f
test: require the opener, view and plan types to be Send and Sync
St4NNi Oct 3, 2026
88b3c23
refactor: serialize the writer directory once at finish
St4NNi Oct 3, 2026
ccdf52a
feat: add cipher, unique key and block size options to the CLI
St4NNi Oct 3, 2026
3dfc01a
fix: validate an append before buffering the encoded directory
St4NNi Oct 3, 2026
f3778a3
test: fail the append directory hook after a partial directory write
St4NNi Oct 3, 2026
33055cb
test: check stored block flags and version 1.0 appends in the CLI
St4NNi Oct 3, 2026
ac7550d
test: add a conformance matrix for ciphers, key modes, flags and 1.0 …
St4NNi Oct 3, 2026
85ad8a9
test: cover content hash boundaries, block limits, piece grants and d…
St4NNi Oct 3, 2026
3609d98
fix: complete the version 1.1 tables and rules in the spec
St4NNi Oct 3, 2026
000800a
fix: index the version 1.1 vectors and conformance cases in the spec
St4NNi Oct 3, 2026
aeabf4f
fix: fail the open on an addressed grant that fails authentication in…
St4NNi Oct 3, 2026
05d5e5c
test: prove compression in the unique key and AES-256-GCM case
St4NNi Oct 3, 2026
d0dfebe
test: compare exact block regions instead of archive sizes
St4NNi Oct 3, 2026
03f351e
fix: limit the spec grant requirement to encrypted block lists
St4NNi Oct 3, 2026
ed09c40
fix: require version 1.0 appends to reject new flags before writing
St4NNi Oct 3, 2026
8e663e6
fix: reserve decrypted key lists once and wipe every buffer they leave
St4NNi Oct 3, 2026
3eb698e
fix: keep secret keys out of growing buffers and maps in the writer
St4NNi Oct 3, 2026
dd42046
fix: reject read requests issued by another opener
St4NNi Oct 3, 2026
4170806
fix: check the decoding view's block limits before copying a block
St4NNi Oct 3, 2026
e3b4ada
fix: move recovered block lists into the access state instead of copy…
St4NNi Oct 3, 2026
838b078
fix: convert block descriptors once while a directory is decoded
St4NNi Oct 3, 2026
5d99a0c
fix: move segment contents into the index instead of keeping copies
St4NNi Oct 3, 2026
715445f
test: bound open memory for distinct blocks in several pieces
St4NNi Oct 3, 2026
b18a37f
feat: start range plans at offset checkpoints instead of the first block
St4NNi Oct 3, 2026
353f942
feat: fetch a repeated adjacent block once
St4NNi Oct 3, 2026
88da8c4
fix: encode the piece key grant without a plain copy of the key
St4NNi Oct 3, 2026
93c6024
fix: cap the number of planned blocks in one read batch
St4NNi Oct 3, 2026
487ff1d
fix: skip the descriptor sort when a directory adds no descriptors
St4NNi Oct 3, 2026
8ca0b96
feat: add async source, resolver and blocking hook traits
St4NNi Oct 3, 2026
3bf0c14
feat: open archives and stream ranges from async sources
St4NNi Oct 3, 2026
891228c
test: cover async open, range bounds, cancellation and the blocking hook
St4NNi Oct 3, 2026
ff50d75
test: read external blocks through the async resolver
St4NNi Oct 3, 2026
f3b72cf
chore: describe the async feature in the library readme
St4NNi Oct 3, 2026
b732166
fix: split async read requests by their full decode reservation
St4NNi Oct 3, 2026
8ded1b0
test: gate async reads and decodes and check compressed read budgets
St4NNi Oct 3, 2026
5f5ed43
fix: fetch and reserve a repeated adjacent block once in async reads
St4NNi Oct 3, 2026
a8265e8
test: read repeated adjacent blocks through the async stream
St4NNi Oct 3, 2026
30bfeea
chore: rename the draft spec to version 1.1.0
St4NNi Oct 4, 2026
fd77e5f
test: check that secret buffers are wiped before they are freed
St4NNi Oct 4, 2026
6939619
fix: reuse a repeated adjacent block in Crypt4GH export
St4NNi Oct 4, 2026
1362755
chore: explain why repeated external blocks keep separate batches
St4NNi Oct 4, 2026
b3c801d
chore: list the format 1.1 and 0.8 API changes in the readme
St4NNi Oct 4, 2026
21eaf2b
fix: keep only the planned bytes of encrypted async outputs
St4NNi Oct 4, 2026
7463513
fix: release async read reservations after a terminal failure
St4NNi Oct 4, 2026
b539e25
test: drop an async stream while a worker thread decodes
St4NNi Oct 4, 2026
f3e043c
feat: add an owned async range stream
St4NNi Oct 4, 2026
46f42ad
test: compare owned and borrowed async range streams
St4NNi Oct 4, 2026
7688dbe
chore: describe the owned async range stream in the readme
St4NNi Oct 4, 2026
214d3b9
fix: fetch a repeated adjacent external block once
St4NNi Oct 4, 2026
a171fdd
fix: inspect only initialized blocks in the zeroization test allocator
St4NNi Oct 4, 2026
114909b
feat: report the format version and block-list form when listing
St4NNi Oct 4, 2026
3d8b190
fix: track a grown test allocation only when its source was initialized
St4NNi Oct 4, 2026
20c5d3e
test: run compile-fail checks only on the MSRV compiler
St4NNi Oct 4, 2026
f620458
feat: split piece content with FastCDC as an option
St4NNi Oct 4, 2026
8374e85
chore: present content-defined and fixed blocks as equal methods in t…
St4NNi Oct 4, 2026
c716893
chore: restore the CI job names that the main ruleset requires
St4NNi Oct 4, 2026
6271371
feat: read Pithos 0.7 archives without appending to them
St4NNi Oct 4, 2026
a3f95d0
chore: describe reading Pithos 0.7 archives in the spec
St4NNi Oct 4, 2026
4562aca
fix: wipe AEAD cipher keys on drop
St4NNi Oct 4, 2026
ab2302d
fix: wipe undelivered plaintext of async range streams
St4NNi Oct 4, 2026
db98af5
fix: cut content-defined writer blocks from a wiped buffer
St4NNi Oct 4, 2026
2d6f562
fix: export readable plain files to Crypt4GH
St4NNi Oct 4, 2026
729b001
chore: run the ignored 5 TiB block-count test in CI
St4NNi Oct 4, 2026
89b4ff4
chore: document that the library builds only on Linux
St4NNi Oct 4, 2026
3b6be76
fix: wipe partial plaintext when block decompression fails
St4NNi Oct 4, 2026
378de45
fix: stop reading content-defined input after its end
St4NNi Oct 4, 2026
59b105c
fix: wipe rejected async source and resolver responses
St4NNi Oct 4, 2026
b0264ef
feat: import and export raw X25519 keys
St4NNi Oct 4, 2026
af1076d
feat: replace the reader grants of an archive without re-encoding
St4NNi Oct 4, 2026
f4b97a3
fix: reject a grant replacement whose archive length overflows
St4NNi Oct 4, 2026
4505c71
fix: wipe failed and rejected synchronous block reads
St4NNi Oct 4, 2026
ebe6ae3
fix: stop reading fixed-size input after its end
St4NNi Oct 4, 2026
d89de59
fix: reject non-contributory keys in piece records
St4NNi Oct 4, 2026
9c7bce0
fix: compress blocks into a wiped buffer
St4NNi Oct 4, 2026
bf8673c
test: wipe a short async resolver response
St4NNi Oct 4, 2026
ac92e3b
chore: document grant replacement limits, raw key wiping and zstd buf…
St4NNi Oct 4, 2026
c4469b2
fix: read manifest sources from the start on every ingestion
St4NNi Oct 4, 2026
aeffe9e
chore: narrow the README statement about wiped buffers
St4NNi Oct 4, 2026
b76bce5
chore: qualify the key material statement of grant replacement
St4NNi Oct 4, 2026
05787fb
chore: update chacha20 to 0.10.2
St4NNi Oct 4, 2026
6491570
test: run planned ingestion again and after a sink failure
St4NNi Oct 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/actions-rs/grcov.yml

This file was deleted.

86 changes: 86 additions & 0 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Checks

on:
push:
branches:
- main
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
fmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install stable rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Check formatting
run: cargo +stable fmt --all -- --check

clippy:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install stable clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy

- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2

- name: Run Clippy
run: cargo +stable clippy --locked --workspace --all-targets --all-features -- -D warnings

deny:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable

- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2

- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
tool: cargo-deny

- name: Check workspace dependency policy
run: cargo deny --locked check

- name: Check fuzz dependency policy
run: cargo deny --manifest-path fuzz/Cargo.toml --config deny.toml --locked check

actionlint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install actionlint
run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12

- name: Check workflows
run: |
"$(go env GOPATH)/bin/actionlint"
67 changes: 19 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: CI
on:
- push
- pull_request
push:
branches:
- main
pull_request:

permissions:
contents: read
Expand All @@ -11,20 +13,6 @@ concurrency:
cancel-in-progress: true

jobs:
actionlint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install actionlint
run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12

- name: Check workflows
run: |
"$(go env GOPATH)/bin/actionlint"

tests:
runs-on: ubuntu-latest
timeout-minutes: 20
Expand All @@ -38,56 +26,39 @@ jobs:
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2

- name: Run workspace tests
run: cargo test --locked --workspace --all-targets

fmt:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install stable rustfmt
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run stable workspace tests
run: cargo +stable test --locked --workspace --all-features --lib --bins --tests

- name: Check formatting
run: cargo fmt --all -- --check

clippy:
msrv:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install stable clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install Rust 1.89.0
uses: dtolnay/rust-toolchain@1.89.0

- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2

- name: Run clippy
run: cargo clippy --locked --workspace --all-targets -- -D warnings
- name: Run MSRV workspace tests
run: cargo +1.89.0 test --locked --workspace --all-features

deny:
block-count:
runs-on: ubuntu-latest
timeout-minutes: 10
timeout-minutes: 40
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install stable Rust
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2

- name: Check dependency policy
run: cargo deny check
- name: Run the ignored 5 TiB block-count test in release mode
run: >-
cargo +stable test --locked --release -p pithos_lib --test pieces
a_composition_with_the_block_count_of_5_tib_opens_with_default_limits -- --ignored --exact
11 changes: 10 additions & 1 deletion .github/workflows/codecov.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@ on:
push:
branches: [main]
pull_request:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

name: coverage
jobs:
report:
name: Report
runs-on: ubuntu-latest
timeout-minutes: 20

steps:
- name: Checkout repository
Expand All @@ -31,7 +40,7 @@ jobs:
name: Generate Coverage Report
run: |
mkdir -p .coverage
cargo llvm-cov --locked --workspace --all-targets --lcov --output-path=./.coverage/lcov.info
cargo llvm-cov --locked --workspace --lib --bins --tests --lcov --output-path=./.coverage/lcov.info

- id: upload
name: Upload Coverage Report
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/fuzz.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Fuzzing

on:
pull_request:
branches:
- main
schedule:
- cron: "30 2 * * 0" # Sundays at 02:30 UTC.
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
dependency-policy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
tool: cargo-deny

- name: Check fuzz dependency policy
run: cargo deny --manifest-path fuzz/Cargo.toml --config deny.toml --locked check

fuzz:
name: Fuzz ${{ matrix.target }}
needs: dependency-policy
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
target:
- header_decode
- directory_decode
- crypt4gh_decode
- chain_validation
env:
FUZZ_MAX_TOTAL_TIME: ${{ github.event_name == 'pull_request' && '60' || '900' }}
FUZZ_TIMEOUT: ${{ github.event_name == 'pull_request' && '5' || '10' }}
FUZZ_RSS_LIMIT_MB: ${{ github.event_name == 'pull_request' && '1024' || '1536' }}
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install nightly Rust
uses: dtolnay/rust-toolchain@nightly

- name: Install cargo-fuzz 0.13.2
run: cargo +nightly install cargo-fuzz --version 0.13.2 --locked

- name: Run ${{ matrix.target }}
id: fuzz
run: |
cargo +nightly fuzz run "${{ matrix.target }}" -- \
-max_total_time="$FUZZ_MAX_TOTAL_TIME" \
-timeout="$FUZZ_TIMEOUT" \
-rss_limit_mb="$FUZZ_RSS_LIMIT_MB"

- name: Upload fuzz artifacts
if: failure() && steps.fuzz.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: fuzz-artifacts-${{ matrix.target }}-${{ github.run_id }}
path: fuzz/artifacts/
if-no-files-found: ignore
retention-days: 14
38 changes: 21 additions & 17 deletions .github/workflows/tag_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ jobs:
}

for package in pithos_lib pithos; do
package_id="$(cargo pkgid -p "$package")"
package_version="${package_id##*@}"
package_id="$(cargo +stable pkgid -p "$package")"
package_version="${package_id##*#}"
package_version="${package_version##*@}"
if [[ "$package_version" != "$RELEASE_VERSION" ]]; then
printf '%s version %s does not match release tag %s.\n' "$package" "$package_version" "$RELEASE_VERSION" >&2
exit 1
Expand All @@ -65,40 +66,43 @@ jobs:

printf 'RELEASE_VERSION=%s\n' "$RELEASE_VERSION" >> "$GITHUB_ENV"

- name: Run workspace tests
run: cargo test --locked --workspace --all-targets
- name: Run stable workspace tests
run: cargo +stable test --locked --workspace --all-features --lib --bins --tests

- name: Check formatting
run: cargo fmt --all -- --check
run: cargo +stable fmt --all -- --check

- name: Run Clippy
run: cargo clippy --locked --workspace --all-targets -- -D warnings
run: cargo +stable clippy --locked --workspace --all-targets --all-features -- -D warnings

- name: Check dependency policy
run: cargo deny check
- name: Check root dependency policy
run: cargo deny --locked check

- name: Check fuzz dependency policy
run: cargo deny --manifest-path fuzz/Cargo.toml --config deny.toml --locked check

- name: Package library
run: cargo package -p pithos_lib --locked
run: cargo +stable package -p pithos_lib --locked

- name: Dry-run library publish
run: cargo publish -p pithos_lib --dry-run --locked
run: cargo +stable publish -p pithos_lib --dry-run --locked

- name: Publish or verify library
shell: bash
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
run: |
if cargo publish -p pithos_lib --locked; then
if cargo +stable publish -p pithos_lib --locked; then
exit 0
fi

cargo info "pithos_lib@$RELEASE_VERSION" --registry crates-io >/dev/null
cargo +stable info "pithos_lib@$RELEASE_VERSION" --registry crates-io >/dev/null

- name: Wait for library to reach crates.io
shell: bash
run: |
for _ in {1..30}; do
if cargo info "pithos_lib@$RELEASE_VERSION" --registry crates-io >/dev/null 2>&1; then
if cargo +stable info "pithos_lib@$RELEASE_VERSION" --registry crates-io >/dev/null 2>&1; then
exit 0
fi

Expand All @@ -109,18 +113,18 @@ jobs:
exit 1

- name: Package CLI
run: cargo package -p pithos --locked
run: cargo +stable package -p pithos --locked

- name: Dry-run CLI publish
run: cargo publish -p pithos --dry-run --locked
run: cargo +stable publish -p pithos --dry-run --locked

- name: Publish or verify CLI
shell: bash
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_TOKEN }}
run: |
if cargo publish -p pithos --locked; then
if cargo +stable publish -p pithos --locked; then
exit 0
fi

cargo info "pithos@$RELEASE_VERSION" --registry crates-io >/dev/null
cargo +stable info "pithos@$RELEASE_VERSION" --registry crates-io >/dev/null
Loading
Loading