From d60aec93b2050fc0c39622a052cffac8ff6aedd0 Mon Sep 17 00:00:00 2001 From: Vitali Haradkou <8816260+vitalics@users.noreply.github.com> Date: Sun, 1 Nov 2026 20:15:39 +0300 Subject: [PATCH 1/2] ci: build/test the component and run it through perfscale v0.30.0 Pinned actions, least privileges, SDK pinned to 522cfdd. --- .github/workflows/ci.yml | 76 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..8efefa2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,76 @@ +name: ci + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +env: + # Immutable SDK commit (Perfscale/sdk-libraries, feat/wasm-step-sdk): + # defineSteps + --kind steps build + settings delivery. + SDK_COMMIT: 522cfdd590062652c04337e6dfdcfc1c2c79389e + +jobs: + build-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + path: repo + # The SDK is a file: sibling dependency (../sdk-step-authoring/ts); + # pin it to an exact public commit. + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + repository: Perfscale/sdk-libraries + ref: feat/wasm-step-sdk + path: sdk-step-authoring + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 24 + - name: Verify the pinned SDK commit + working-directory: sdk-step-authoring + run: test "$(git rev-parse HEAD)" = "$SDK_COMMIT" + - name: Install SDK build tooling (jco) + working-directory: sdk-step-authoring/ts + run: npm ci + - name: Install, typecheck, unit-test + working-directory: repo + run: | + npm install + npm run typecheck + npm test + - name: Build the WASM component + working-directory: repo + run: npm run build + - name: Inspect component imports/exports + working-directory: repo + run: ../sdk-step-authoring/ts/node_modules/.bin/jco wit bash.wasm + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: bash-wasm + path: repo/bash.wasm + retention-days: 7 + + integration: + needs: build-test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4 + with: + name: bash-wasm + path: . + - uses: dtolnay/rust-toolchain@stable + - name: Build Perfscale v0.30.0 from source + run: | + git clone --depth 1 --branch v0.30.0 https://github.com/Perfscale/perfscale.git /tmp/perfscale-src + cargo build --release -p perfscale-cli --manifest-path /tmp/perfscale-src/Cargo.toml + cp /tmp/perfscale-src/target/release/perfscale "$GITHUB_WORKSPACE/perfscale" + "$GITHUB_WORKSPACE/perfscale" --version + - name: Run the example through the engine (settings-driven install + exec) + run: | + "$GITHUB_WORKSPACE/perfscale" run -f examples/bash.test.yaml -c examples/bash.config.yaml | tee run.log + grep -q 'hello world' run.log From 22a67d9237472d437018b9ef86a018bf9786057a Mon Sep 17 00:00:00 2001 From: Vitali Haradkou <8816260+vitalics@users.noreply.github.com> Date: Sun, 1 Nov 2026 20:23:00 +0300 Subject: [PATCH 2/2] ci: build the SDK (dist + d.ts) before repo typecheck --- .github/workflows/ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8efefa2..89b521f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,9 +33,11 @@ jobs: - name: Verify the pinned SDK commit working-directory: sdk-step-authoring run: test "$(git rev-parse HEAD)" = "$SDK_COMMIT" - - name: Install SDK build tooling (jco) + - name: Install and build SDK (dist + type declarations) working-directory: sdk-step-authoring/ts - run: npm ci + run: | + npm ci + npm run build - name: Install, typecheck, unit-test working-directory: repo run: |