Skip to content

Commit 242f983

Browse files
committed
Restructure implementations into per-library subfolders with shared multi-package infrastructure
Move each language's PCF library into a pcf/ subfolder so additional libraries (e.g. PFS, built on PCF) can live alongside it, mirroring the Rust reference layout. - ts: add a private npm-workspaces root (single hoisted lockfile); run package scripts via -w @kduma-oss/pcf in CI/release. - dotnet: add shared Directory.Build.props holding common metadata and the single lockstep <Version>, trimmed from Pcf.csproj. - php: pcf/ is a self-contained Composer package; split workflow targets it. - Update CI/release workflows (working dirs, path filters, artifact paths, version-bump targets) and READMEs; document the PFS->PCF dependency recipe in implementations/README.md.
1 parent 6625848 commit 242f983

79 files changed

Lines changed: 189 additions & 114 deletions

Some content is hidden

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

.github/workflows/dotnet-ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,19 @@ on:
44
push:
55
branches: [master]
66
paths:
7-
- 'implementations/dotnet/**'
7+
- 'implementations/dotnet/pcf/**'
8+
- 'implementations/dotnet/Directory.Build.props'
89
- '.github/workflows/dotnet-ci.yml'
910
pull_request:
1011
branches: [master]
1112
paths:
12-
- 'implementations/dotnet/**'
13+
- 'implementations/dotnet/pcf/**'
14+
- 'implementations/dotnet/Directory.Build.props'
1315
- '.github/workflows/dotnet-ci.yml'
1416

1517
defaults:
1618
run:
17-
working-directory: implementations/dotnet
19+
working-directory: implementations/dotnet/pcf
1820

1921
jobs:
2022
test:

.github/workflows/php-split.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [master]
66
paths:
7-
- 'implementations/php/**'
7+
- 'implementations/php/pcf/**'
88
- '.github/workflows/php-split.yml'
99
workflow_dispatch:
1010
inputs:
@@ -22,7 +22,7 @@ on:
2222

2323
jobs:
2424
split:
25-
name: split implementations/php → kduma-OSS-splits/PHP-PCF-lib
25+
name: split implementations/php/pcf → kduma-OSS-splits/PHP-PCF-lib
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v4
@@ -78,7 +78,7 @@ jobs:
7878
env:
7979
PAT: x-access-token:${{ steps.app-token.outputs.token }}
8080
with:
81-
package_directory: 'implementations/php'
81+
package_directory: 'implementations/php/pcf'
8282
repository_organization: 'kduma-OSS-splits'
8383
repository_name: 'PHP-PCF-lib'
8484
branch: 'master'
@@ -92,7 +92,7 @@ jobs:
9292
PAT: x-access-token:${{ steps.app-token.outputs.token }}
9393
with:
9494
tag: ${{ steps.resolve-tag.outputs.tag }}
95-
package_directory: 'implementations/php'
95+
package_directory: 'implementations/php/pcf'
9696
repository_organization: 'kduma-OSS-splits'
9797
repository_name: 'PHP-PCF-lib'
9898
branch: 'master'

.github/workflows/php.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
defaults:
1010
run:
11-
working-directory: implementations/php
11+
working-directory: implementations/php/pcf
1212

1313
jobs:
1414
test:
@@ -66,4 +66,4 @@ jobs:
6666
- uses: actions/upload-artifact@v4
6767
with:
6868
name: pcf-testvector-php
69-
path: implementations/php/pcf_testvector.bin
69+
path: implementations/php/pcf/pcf_testvector.bin

.github/workflows/release-prepare.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,16 +82,16 @@ jobs:
8282
sed -i 's|pcf = { path = "\.\./\.\./reference/PCF-v1.0", version = "[^"]*" }|pcf = { path = "../../reference/PCF-v1.0", version = "'"$NEW"'" }|' tools/pcf-debug/Cargo.toml
8383
sed -i 's|pcf = { path = "\.\./\.\./reference/PCF-v1.0", version = "[^"]*" }|pcf = { path = "../../reference/PCF-v1.0", version = "'"$NEW"'" }|' tools/pcf-compact/Cargo.toml
8484
85-
- name: Bump TypeScript package
85+
- name: Bump TypeScript packages
8686
shell: bash
8787
working-directory: implementations/ts
88-
run: npm version '${{ steps.version.outputs.version }}' --no-git-tag-version --allow-same-version
88+
run: npm version '${{ steps.version.outputs.version }}' -ws --no-git-tag-version --allow-same-version
8989

90-
- name: Bump .NET Pcf.csproj
90+
- name: Bump .NET Directory.Build.props
9191
shell: bash
9292
run: |
9393
NEW='${{ steps.version.outputs.version }}'
94-
sed -i 's|<Version>[^<]*</Version>|<Version>'"$NEW"'</Version>|' implementations/dotnet/src/Pcf/Pcf.csproj
94+
sed -i 's|<Version>[^<]*</Version>|<Version>'"$NEW"'</Version>|' implementations/dotnet/Directory.Build.props
9595
9696
- name: Show diff
9797
run: git --no-pager diff --stat && git --no-pager diff

.github/workflows/release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,13 @@ jobs:
162162
- name: Ensure npm >= 11.5.1 (trusted publishing support)
163163
run: npm install -g npm@latest
164164
- run: npm ci
165-
- run: npm run build
165+
- run: npm run build -w @kduma-oss/pcf
166166
- name: npm publish (OIDC trusted publishing, auto-provenance)
167167
run: |
168168
if [ "${{ needs.resolve.outputs.dry_run }}" = "true" ]; then
169-
npm publish --access public --dry-run
169+
npm publish -w @kduma-oss/pcf --access public --dry-run
170170
else
171-
npm publish --access public
171+
npm publish -w @kduma-oss/pcf --access public
172172
fi
173173
174174
publish-nuget:
@@ -180,7 +180,7 @@ jobs:
180180
contents: read
181181
defaults:
182182
run:
183-
working-directory: implementations/dotnet
183+
working-directory: implementations/dotnet/pcf
184184
steps:
185185
- uses: actions/checkout@v4
186186
- uses: actions/setup-dotnet@v4
@@ -212,7 +212,7 @@ jobs:
212212
- uses: actions/upload-artifact@v4
213213
with:
214214
name: nuget-package
215-
path: implementations/dotnet/out/*.nupkg
215+
path: implementations/dotnet/pcf/out/*.nupkg
216216

217217
split-php:
218218
name: Split PHP to packagist source repo

.github/workflows/ts-ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
cache: npm
2323
cache-dependency-path: implementations/ts/package-lock.json
2424
- run: npm ci
25-
- run: npm run build
25+
- run: npm run build -w @kduma-oss/pcf
2626

2727
test:
2828
name: test (${{ matrix.os }})
@@ -39,7 +39,7 @@ jobs:
3939
cache: npm
4040
cache-dependency-path: implementations/ts/package-lock.json
4141
- run: npm ci
42-
- run: npm test
42+
- run: npm test -w @kduma-oss/pcf
4343

4444
test-vector:
4545
name: regenerate spec test vector
@@ -53,15 +53,15 @@ jobs:
5353
cache-dependency-path: implementations/ts/package-lock.json
5454
- run: npm ci
5555
- name: Build and run the test-vector example
56-
run: npm run gen-testvector -- pcf_testvector.bin
56+
run: npm run gen-testvector -w @kduma-oss/pcf -- pcf_testvector.bin
5757
- name: Inspect generated test vector
5858
run: |
59-
ls -l pcf_testvector.bin
60-
test "$(wc -c < pcf_testvector.bin)" = "395"
59+
ls -l pcf/pcf_testvector.bin
60+
test "$(wc -c < pcf/pcf_testvector.bin)" = "395"
6161
- uses: actions/upload-artifact@v4
6262
with:
6363
name: pcf-testvector-ts
64-
path: implementations/ts/pcf_testvector.bin
64+
path: implementations/ts/pcf/pcf_testvector.bin
6565

6666
coverage:
6767
name: code coverage
@@ -75,8 +75,8 @@ jobs:
7575
cache-dependency-path: implementations/ts/package-lock.json
7676
- run: npm ci
7777
- name: Generate coverage report (enforces >=95% line / 100% function)
78-
run: npm run coverage
78+
run: npm run coverage -w @kduma-oss/pcf
7979
- uses: actions/upload-artifact@v4
8080
with:
8181
name: coverage-lcov-ts
82-
path: implementations/ts/coverage/lcov.info
82+
path: implementations/ts/pcf/coverage/lcov.info

implementations/README.md

Lines changed: 48 additions & 0 deletions
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project>
2+
3+
<!-- Shared metadata for every .NET library under implementations/dotnet/
4+
(pcf/, and future libraries such as pfs/). Lockstep version lives here. -->
5+
<PropertyGroup>
6+
<Version>0.0.5</Version>
7+
<Authors>Krystian Duma</Authors>
8+
<Company>kduma-OSS</Company>
9+
<Product>Partitioned Container Format</Product>
10+
<Copyright>Copyright (c) Krystian Duma</Copyright>
11+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
12+
<PackageProjectUrl>https://github.com/kduma-OSS/Partitioned-Container-Format</PackageProjectUrl>
13+
<RepositoryUrl>https://github.com/kduma-OSS/Partitioned-Container-Format</RepositoryUrl>
14+
<RepositoryType>git</RepositoryType>
15+
</PropertyGroup>
16+
17+
</Project>
Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)