Skip to content

Commit

Permalink
Update all paths for bindings/wasm/identity_wasm in al GH workflows f…
Browse files Browse the repository at this point in the history
…iles and add clippy + format steps for bindings/wasm/iota_interaction_ts
  • Loading branch information
chrisgitiota committed Jan 8, 2025
1 parent 59f02b9 commit db8fe86
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 35 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
- '**.toml'
- 'bindings/**'
- '!bindings/**.md'
- 'bindings/wasm/README.md' # the Readme contain txm tests
- 'bindings/wasm/identity_wasm/README.md' # the Readme contain txm tests

env:
RUST_BACKTRACE: full
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
# run examples only on ubuntu for now
if: matrix.os == 'ubuntu-24.04'
run: |
cd bindings/wasm
cd bindings/wasm/identity_wasm
npm ci
npm run test:readme:rust
Expand Down Expand Up @@ -211,20 +211,20 @@ jobs:

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

- name: Download bindings/wasm artifacts
- name: Download bindings/wasm/identity_wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
path: bindings/wasm/identity_wasm

- name: Start iota sandbox
uses: './.github/actions/iota-rebase-sandbox/setup'

- name: Run Wasm examples
run: npm run test:readme && npm run test:node
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

test-wasm-firefox:
needs: build-wasm
Expand All @@ -247,22 +247,22 @@ jobs:

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

- name: Download bindings/wasm artifacts
- name: Download bindings/wasm/identity_wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
path: bindings/wasm/identity_wasm

- name: Start iota sandbox
uses: './.github/actions/iota-rebase-sandbox/setup'

- name: Build Docker image
uses: docker/[email protected]
with:
context: bindings/wasm/
file: bindings/wasm/cypress/Dockerfile
context: bindings/wasm/identity_wasm/
file: bindings/wasm/identity_wasm/cypress/Dockerfile
push: false
tags: cypress-test:latest
load: true
Expand Down Expand Up @@ -291,22 +291,22 @@ jobs:

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm

- name: Download bindings/wasm artifacts
- name: Download bindings/wasm/identity_wasm artifacts
uses: actions/download-artifact@v4
with:
name: identity-wasm-bindings-build
path: bindings/wasm
path: bindings/wasm/identity_wasm

- name: Start iota sandbox
uses: './.github/actions/iota-rebase-sandbox/setup'

- name: Build Docker image
uses: docker/[email protected]
with:
context: bindings/wasm/
file: bindings/wasm/cypress/Dockerfile
context: bindings/wasm/identity_wasm/
file: bindings/wasm/identity_wasm/cypress/Dockerfile
push: false
tags: cypress-test:latest
load: true
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,14 @@ jobs:
with:
args: --all-targets --all-features -- -D warnings

- name: Wasm clippy check
- name: Wasm clippy check identity_wasm
uses: actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4
if: ${{ false }}
with:
args: --manifest-path ./bindings/wasm/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings
args: --manifest-path ./bindings/wasm/identity_wasm/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings

- name: Wasm clippy check iota_interaction_ts
uses: actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4
if: ${{ false }}
with:
args: --manifest-path ./bindings/wasm/iota_interaction_ts/Cargo.toml --target wasm32-unknown-unknown --all-targets --all-features -- -D warnings
7 changes: 5 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ jobs:
- name: core fmt check
run: cargo +nightly fmt --all -- --check

- name: wasm fmt check
run: cargo +nightly fmt --manifest-path ./bindings/wasm/Cargo.toml --all -- --check
- name: wasm fmt check identity_wasm
run: cargo +nightly fmt --manifest-path ./bindings/wasm/identity_wasm/Cargo.toml --all -- --check

- name: wasm fmt check iota_interaction_ts
run: cargo +nightly fmt --manifest-path ./bindings/wasm/iota_interaction_ts/Cargo.toml --all -- --check

- name: Cargo.toml fmt check
run:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/shared-build-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
build-wasm:
defaults:
run:
working-directory: bindings/wasm
working-directory: bindings/wasm/identity_wasm
shell: bash
runs-on: ubuntu-latest
strategy:
Expand All @@ -50,7 +50,7 @@ jobs:
target-cache-enabled: true
sccache-enabled: true
sccache-path: ${{ matrix.sccache-path }}
target-cache-path: bindings/wasm/target
target-cache-path: bindings/wasm/identity_wasm/target

# Download a pre-compiled wasm-bindgen binary.
- name: Install wasm-bindgen-cli
Expand Down Expand Up @@ -86,9 +86,9 @@ jobs:
with:
name: ${{ inputs.output-artifact-name }}
path: |
bindings/wasm/node
bindings/wasm/web
bindings/wasm/examples/dist
bindings/wasm/docs
bindings/wasm/identity_wasm/node
bindings/wasm/identity_wasm/web
bindings/wasm/identity_wasm/examples/dist
bindings/wasm/identity_wasm/docs
if-no-files-found: error
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/wasm-automatic-release-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# owner/repository of workflow has to be static, see https://github.community/t/env-variables-in-uses/17466
uses: iotaledger/identity.rs/.github/workflows/shared-release.yml@main
with:
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
pre-release-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+-(?<pre_release>\w+)\.\d+$
main-release-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
create-github-release: false
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/wasm-create-hotfix-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
branch-regex: ^support\/wasm-v[0-9]+\.[0-9]+$
tag-prefix: wasm-v
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/CHANGELOG.md
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
release-target: wasm
secrets:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/wasm-create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
tag-postfix: -${{ github.event.inputs.release-type }}.
tag-base: ${{ github.event.inputs.version }}
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/CHANGELOG.md
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
pr-body-text: On merge a pre-release will be published to npm.
release-target: wasm
secrets:
Expand All @@ -43,8 +43,8 @@ jobs:
tag-prefix: wasm-v
tag-base: ${{ github.event.inputs.version }}
main-tag-regex: ^wasm-v[0-9]+\.[0-9]+\.[0-9]+$
changelog-config-path: ./bindings/wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/CHANGELOG.md
changelog-config-path: ./bindings/wasm/identity_wasm/.github_changelog_generator
changelog-path: ./bindings/wasm/identity_wasm/CHANGELOG.md
release-target: wasm
secrets:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
Expand Down
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ members = [
"identity_eddsa_verifier",
"examples",
"identity_iota_interaction",
"bindings/wasm/iota_interaction_ts",
]

exclude = ["bindings/wasm/identity_wasm", "bindings/grpc"]
exclude = ["bindings/wasm/identity_wasm", "bindings/wasm/iota_interaction_ts", "bindings/grpc"]

[workspace.dependencies]
bls12_381_plus = { version = "0.8.17" }
Expand Down

0 comments on commit db8fe86

Please sign in to comment.