Skip to content

Commit b2c2e29

Browse files
committed
merge: master into claude/vibrant-cerf-0RpFz + rename reference CI workflow
ci-pcf-sig.yml on master covers tools/pcf-sig (CLI); moved the reference implementation workflow to ci-pcf-sig-reference.yml to avoid the name clash. https://claude.ai/code/session_01DWrMLmDMJLUCUoJD5MvDjf
2 parents 910eba6 + 975660e commit b2c2e29

19 files changed

Lines changed: 2144 additions & 93 deletions

File tree

.github/workflows/build-binaries.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
run: |
8989
cargo build --release --target ${{ matrix.target }} -p pcf-debug
9090
cargo build --release --target ${{ matrix.target }} -p pcf-compact
91+
cargo build --release --target ${{ matrix.target }} -p pcf-sig-cli --bin pcf-sig
9192
cargo build --release --target ${{ matrix.target }} -p pfs-ms --bin pfs
9293
9394
- name: Build (macOS universal2)
@@ -97,6 +98,7 @@ jobs:
9798
for t in ${{ matrix.macos-targets }}; do
9899
cargo build --release --target "$t" -p pcf-debug
99100
cargo build --release --target "$t" -p pcf-compact
101+
cargo build --release --target "$t" -p pcf-sig-cli --bin pcf-sig
100102
cargo build --release --target "$t" -p pfs-ms --bin pfs
101103
done
102104
mkdir -p target/universal2-apple-darwin/release
@@ -106,11 +108,15 @@ jobs:
106108
lipo -create -output target/universal2-apple-darwin/release/pcf-compact \
107109
target/x86_64-apple-darwin/release/pcf-compact \
108110
target/aarch64-apple-darwin/release/pcf-compact
111+
lipo -create -output target/universal2-apple-darwin/release/pcf-sig \
112+
target/x86_64-apple-darwin/release/pcf-sig \
113+
target/aarch64-apple-darwin/release/pcf-sig
109114
lipo -create -output target/universal2-apple-darwin/release/pfs \
110115
target/x86_64-apple-darwin/release/pfs \
111116
target/aarch64-apple-darwin/release/pfs
112117
file target/universal2-apple-darwin/release/pcf-debug
113118
file target/universal2-apple-darwin/release/pcf-compact
119+
file target/universal2-apple-darwin/release/pcf-sig
114120
file target/universal2-apple-darwin/release/pfs
115121
116122
- name: Stage and archive (unix)
@@ -120,7 +126,7 @@ jobs:
120126
VERSION='${{ needs.resolve-version.outputs.version }}'
121127
TARGET='${{ matrix.target }}'
122128
mkdir -p staging
123-
for bin in pcf-debug pcf-compact pfs; do
129+
for bin in pcf-debug pcf-compact pcf-sig pfs; do
124130
STAGE="staging/${bin}-${VERSION}-${TARGET}"
125131
mkdir -p "$STAGE"
126132
cp "target/${TARGET}/release/${bin}" "$STAGE/${bin}"
@@ -136,7 +142,7 @@ jobs:
136142
$version = '${{ needs.resolve-version.outputs.version }}'
137143
$target = '${{ matrix.target }}'
138144
New-Item -ItemType Directory -Force staging | Out-Null
139-
foreach ($bin in @('pcf-debug', 'pcf-compact', 'pfs')) {
145+
foreach ($bin in @('pcf-debug', 'pcf-compact', 'pcf-sig', 'pfs')) {
140146
$stage = "staging/$bin-$version-$target"
141147
New-Item -ItemType Directory -Force $stage | Out-Null
142148
Copy-Item "target/$target/release/$bin.exe" "$stage/$bin.exe"
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
name: CI / Rust (PCF-SIG Reference)
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
RUSTFLAGS: "-D warnings"
12+
13+
defaults:
14+
run:
15+
working-directory: reference/PCF-SIG-v1.0
16+
17+
jobs:
18+
fmt:
19+
name: rustfmt
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@stable
24+
with:
25+
components: rustfmt
26+
- run: cargo fmt --all -- --check
27+
28+
clippy:
29+
name: clippy
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: dtolnay/rust-toolchain@stable
34+
with:
35+
components: clippy
36+
- uses: Swatinem/rust-cache@v2
37+
with:
38+
workspaces: reference/PCF-SIG-v1.0
39+
- run: cargo clippy --all-targets --all-features -- -D warnings
40+
41+
test:
42+
name: test (${{ matrix.os }})
43+
runs-on: ${{ matrix.os }}
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
os: [ubuntu-latest, macos-latest, windows-latest]
48+
steps:
49+
- uses: actions/checkout@v4
50+
- uses: dtolnay/rust-toolchain@stable
51+
- uses: Swatinem/rust-cache@v2
52+
with:
53+
workspaces: reference/PCF-SIG-v1.0
54+
- run: cargo build --verbose
55+
- run: cargo test --all-targets --verbose
56+
- run: cargo test --doc --verbose
57+
58+
test-vector:
59+
name: regenerate spec test vector
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: dtolnay/rust-toolchain@stable
64+
- uses: Swatinem/rust-cache@v2
65+
with:
66+
workspaces: reference/PCF-SIG-v1.0
67+
- name: Build and run the test-vector example
68+
run: cargo run --example gen_testvector -- pcfsig_testvector.bin
69+
- name: Inspect generated test vector
70+
run: |
71+
ls -l pcfsig_testvector.bin
72+
test "$(wc -c < pcfsig_testvector.bin)" = "966"
73+
- uses: actions/upload-artifact@v4
74+
with:
75+
name: pcf-sig-testvector
76+
path: reference/PCF-SIG-v1.0/pcfsig_testvector.bin
77+
78+
coverage:
79+
name: code coverage
80+
runs-on: ubuntu-latest
81+
steps:
82+
- uses: actions/checkout@v4
83+
- uses: dtolnay/rust-toolchain@stable
84+
with:
85+
components: llvm-tools-preview
86+
- uses: Swatinem/rust-cache@v2
87+
with:
88+
workspaces: reference/PCF-SIG-v1.0
89+
- name: Install cargo-llvm-cov
90+
uses: taiki-e/install-action@cargo-llvm-cov
91+
- name: Generate coverage report (lcov)
92+
run: cargo llvm-cov --all-features --package pcf-sig --lcov --output-path lcov.info
93+
- name: Print coverage summary
94+
run: cargo llvm-cov report
95+
- name: Enforce minimum library coverage
96+
run: |
97+
cargo llvm-cov report --summary-only \
98+
--ignore-filename-regex 'bin/|examples/' \
99+
--fail-under-lines 90 \
100+
--fail-under-functions 90
101+
- uses: actions/upload-artifact@v4
102+
with:
103+
name: pcf-sig-coverage-lcov
104+
path: reference/PCF-SIG-v1.0/lcov.info

.github/workflows/ci-pcf-sig.yml

Lines changed: 4 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI / Rust (PCF-SIG Reference)
1+
name: CI / Rust (pcf-sig CLI)
22

33
on:
44
push:
@@ -12,7 +12,7 @@ env:
1212

1313
defaults:
1414
run:
15-
working-directory: reference/PCF-SIG-v1.0
15+
working-directory: tools/pcf-sig
1616

1717
jobs:
1818
fmt:
@@ -35,7 +35,7 @@ jobs:
3535
components: clippy
3636
- uses: Swatinem/rust-cache@v2
3737
with:
38-
workspaces: reference/PCF-SIG-v1.0
38+
workspaces: tools/pcf-sig
3939
- run: cargo clippy --all-targets --all-features -- -D warnings
4040

4141
test:
@@ -50,55 +50,6 @@ jobs:
5050
- uses: dtolnay/rust-toolchain@stable
5151
- uses: Swatinem/rust-cache@v2
5252
with:
53-
workspaces: reference/PCF-SIG-v1.0
53+
workspaces: tools/pcf-sig
5454
- run: cargo build --verbose
5555
- run: cargo test --all-targets --verbose
56-
- run: cargo test --doc --verbose
57-
58-
test-vector:
59-
name: regenerate spec test vector
60-
runs-on: ubuntu-latest
61-
steps:
62-
- uses: actions/checkout@v4
63-
- uses: dtolnay/rust-toolchain@stable
64-
- uses: Swatinem/rust-cache@v2
65-
with:
66-
workspaces: reference/PCF-SIG-v1.0
67-
- name: Build and run the test-vector example
68-
run: cargo run --example gen_testvector -- pcfsig_testvector.bin
69-
- name: Inspect generated test vector
70-
run: |
71-
ls -l pcfsig_testvector.bin
72-
test "$(wc -c < pcfsig_testvector.bin)" = "966"
73-
- uses: actions/upload-artifact@v4
74-
with:
75-
name: pcf-sig-testvector
76-
path: reference/PCF-SIG-v1.0/pcfsig_testvector.bin
77-
78-
coverage:
79-
name: code coverage
80-
runs-on: ubuntu-latest
81-
steps:
82-
- uses: actions/checkout@v4
83-
- uses: dtolnay/rust-toolchain@stable
84-
with:
85-
components: llvm-tools-preview
86-
- uses: Swatinem/rust-cache@v2
87-
with:
88-
workspaces: reference/PCF-SIG-v1.0
89-
- name: Install cargo-llvm-cov
90-
uses: taiki-e/install-action@cargo-llvm-cov
91-
- name: Generate coverage report (lcov)
92-
run: cargo llvm-cov --all-features --package pcf-sig --lcov --output-path lcov.info
93-
- name: Print coverage summary
94-
run: cargo llvm-cov report
95-
- name: Enforce minimum library coverage
96-
run: |
97-
cargo llvm-cov report --summary-only \
98-
--ignore-filename-regex 'bin/|examples/' \
99-
--fail-under-lines 90 \
100-
--fail-under-functions 90
101-
- uses: actions/upload-artifact@v4
102-
with:
103-
name: pcf-sig-coverage-lcov
104-
path: reference/PCF-SIG-v1.0/lcov.info

0 commit comments

Comments
 (0)