Skip to content

Commit

Permalink
ml-kem: initial commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Nov 10, 2024
1 parent 1a166b4 commit bd2b8e8
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci_browser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ jobs:
cp -rf ../hybridkem-x25519-kyber768/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x25519-kyber768
mkdir test/runtimes/browsers/pages/hybridkem-x-wing
cp -rf ../hybridkem-x-wing/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x-wing
mkdir test/runtimes/browsers/pages/ml-kem
cp -rf ../ml-kem/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/ml-kem
mkdir test/runtimes/browsers/pages/dhkem-secp256k1
cp -rf ../dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
- name: Build docs for @hpke/common
Expand All @@ -57,6 +59,7 @@ jobs:
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/ml-kem/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-common.js
- name: Build docs for @hpke/core
working-directory: ./packages/core
Expand All @@ -68,6 +71,7 @@ jobs:
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/ml-kem/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-core.js
- name: Build docs for @hpke/chacha20poly1305
working-directory: ./packages/chacha20poly1305
Expand Down Expand Up @@ -99,6 +103,11 @@ jobs:
run: |
npx typedoc --name "@hpke/hybridkem-x-wing" --out ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-hybridkem-x-wing.js
- name: Build docs for @hpke/ml-kem
working-directory: ./packages/ml-kem
run: |
npx typedoc --name "@hpke/ml-kem" --out ../hpke-js/test/runtimes/browsers/pages/ml-kem/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/ml-kem/src/hpke-ml-kem.js
- name: Build docs for @hpke/hpke-js
working-directory: ./packages/hpke-js
run: |
Expand Down Expand Up @@ -128,6 +137,8 @@ jobs:
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hybridkem-x-wing/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/ml-kem/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/dhkem-secp256k1/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hpke-js/test/runtimes/browsers
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/ci_node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,11 @@ jobs:
- name: Publish to npm (dry) for /packages/hpke-js
working-directory: ./npm/packages/hpke-js
run: npm publish --dry-run
- name: Run dnt & minify for /packages/ml-kem
working-directory: ./packages/ml-kem
run: |
deno task dnt
deno task minify > ../../npm/packages/ml-kem/hpke-ml-kem.min.js
- name: Publish to npm (dry) for /packages/ml-kem
working-directory: ./npm/packages/ml-kem
run: npm publish --dry-run
7 changes: 7 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,10 @@ jobs:
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Publish @hpke/ml-kem to npm
continue-on-error: true
working-directory: ./npm/packages/ml-kem
run: npm publish --provenance
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

55 changes: 55 additions & 0 deletions npm/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bd2b8e8

Please sign in to comment.