Viewing is open to everyone. Downloading and starring need a GitHub sign-in.
Sign in with GitHub
sdk-web.yml
v0.1.0-build.85
Latest
Commit ede38f5
Sign in with GitHub to download. Each download is recorded with your GitHub username.
| 1 | # Web SDK (npm package `openckey`): the C core compiled to WebAssembly with |
| 2 | # Emscripten, plus the JavaScript wrapper. Maintainers: pin these actions to |
| 3 | # commit SHAs (as ci.yml does) before relying on this workflow. |
| 4 | name: SDK Web |
| 5 | on: |
| 6 | push: |
| 7 | paths: |
| 8 | - 'sdk/web/**' |
| 9 | - 'src/**' |
| 10 | - 'include/**' |
| 11 | - 'VERSION' |
| 12 | - '.github/workflows/sdk-web.yml' |
| 13 | pull_request: |
| 14 | paths: |
| 15 | - 'sdk/web/**' |
| 16 | - 'src/**' |
| 17 | - 'include/**' |
| 18 | - 'VERSION' |
| 19 | - '.github/workflows/sdk-web.yml' |
| 20 | workflow_dispatch: |
| 21 | workflow_call: # the release workflow builds release packages with this file |
| 22 | permissions: |
| 23 | contents: read |
| 24 | defaults: |
| 25 | run: |
| 26 | working-directory: sdk/web |
| 27 | jobs: |
| 28 | js-and-bridge: |
| 29 | name: JS units + native bridge |
| 30 | runs-on: ubuntu-24.04 |
| 31 | steps: |
| 32 | - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 |
| 33 | - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 34 | with: |
| 35 | node-version: 22 |
| 36 | - name: Package version matches VERSION |
| 37 | run: test "$(node -p "require('./package.json').version")" = "$(cat ../../VERSION)" |
| 38 | - name: node --check |
| 39 | run: npm run check |
| 40 | - name: Unit tests (no WebAssembly) |
| 41 | run: npm test |
| 42 | - name: Native bridge test (g++, sanitizers) |
| 43 | env: |
| 44 | CXXFLAGS: -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=all |
| 45 | run: npm run test:native |
| 46 | |
| 47 | wasm: |
| 48 | name: Emscripten build + tests |
| 49 | runs-on: ubuntu-24.04 |
| 50 | steps: |
| 51 | - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 |
| 52 | - uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14 |
| 53 | with: |
| 54 | version: 4.0.10 |
| 55 | actions-cache-folder: emsdk-cache |
| 56 | - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 |
| 57 | with: |
| 58 | node-version: 22 |
| 59 | - name: Build (emcmake + em++) |
| 60 | run: npm run build |
| 61 | - name: Tests against the built wasm |
| 62 | env: |
| 63 | CKEY_REQUIRE_WASM: '1' |
| 64 | run: npm test |
| 65 | - name: Package |
| 66 | run: npm pack |
| 67 | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
| 68 | with: |
| 69 | name: ckey-npm |
| 70 | path: sdk/web/openckey-*.tgz |
| 71 | if-no-files-found: error |
| 72 | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 |
| 73 | with: |
| 74 | name: ckey-web-dist |
| 75 | path: sdk/web/dist |
| 76 | if-no-files-found: error |