Skip to content

Commit

Permalink
chore: upd CI to rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
itsyaasir committed Nov 25, 2024
1 parent 60fb304 commit 47f2c9f
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 91 deletions.
39 changes: 39 additions & 0 deletions .github/actions/iota-rebase-sandbox/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: "iota-private-network setup"
description: "Setup IOTA Sandbox"

inputs:
platform:
description: "Platform to download binary for (linux or macos)"
required: true
default: "linux"

runs:
using: composite
steps:
- name: Set up IOTA Node
shell: bash
run: |
# Install dependencies
mkdir -p iota
cd iota
# Select platform-specific asset
if [ "${{ inputs.platform }}" = "linux" ]; then
PLATFORM_FILTER="contains(\"linux\")"
else
PLATFORM_FILTER="contains(\"macos\")"
fi
# Get download URL for specified platform
DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota/releases" | \
jq -r --arg filter "$PLATFORM_FILTER" \
'.[0].assets[] | select(.name | contains("iota") and ($filter | eval)) | .browser_download_url')
# Download and extract
curl -L -o iota.tar.gz $DOWNLOAD_URL
tar -xzf iota.tar.gz
- name: Start the Network
shell: bash
working-directory: iota
run: ./iota start --with-faucet --force-regenesis &
36 changes: 0 additions & 36 deletions .github/actions/iota-sandbox/setup/action.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/actions/iota-sandbox/tear-down/action.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/actions/release/changelog-generator/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ runs:
fi
echo SINCE_ARG=$SINCE_ARG
echo SINCE_ARG=$SINCE_ARG >> $GITHUB_ENV
- name: Prepare Repository For Changelog Generator
shell: bash
run: |
GITHUB_REPOSITORY_USER=$( echo $GITHUB_REPOSITORY | awk -F'/' '{print $1}')
GITHUB_REPOSITORY_PROJECT=$( echo $GITHUB_REPOSITORY | awk -F'/' '{print $2}')
GITHUB_REPOSITORY_PROJECT=$( echo $GITHUB_REPOSITORY | awk -F'/' '{print $2}')
echo GITHUB_REPOSITORY_USER=$GITHUB_REPOSITORY_USER
echo GITHUB_REPOSITORY_PROJECT=$GITHUB_REPOSITORY_PROJECT
Expand Down
45 changes: 15 additions & 30 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
pull_request:
types: [ opened, synchronize, reopened, ready_for_review ]
types: [opened, synchronize, reopened, ready_for_review]
branches:
- main
- 'epic/**'
Expand Down Expand Up @@ -62,12 +62,12 @@ jobs:
build-and-test:
runs-on: ${{ matrix.os }}
needs: [ check-for-run-condition, check-for-modification ]
needs: [check-for-run-condition, check-for-modification]
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' && needs.check-for-modification.outputs.core-modified == 'true' }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
sccache-path: /home/runner/.cache/sccache
Expand Down Expand Up @@ -130,17 +130,19 @@ jobs:
run: cargo build --workspace --tests --examples --release

- name: Start iota sandbox
if: matrix.os == 'ubuntu-latest'
uses: './.github/actions/iota-sandbox/setup'
if: matrix.os != 'windows-latest'
uses: './.github/actions/iota-rebase-sandbox/setup'
with:
platform: ${{ matrix.os == 'ubuntu-latest' && 'linux' || 'macos' }}

- name: Run tests excluding `custom_time` feature
if: matrix.os != 'windows-latest'
run: cargo test --workspace --release

- name: Run tests with `custom_time` feature
run: cargo test --test custom_time --features="custom_time"

- name: Run Rust examples
# run examples only on ubuntu for now
if: matrix.os == 'ubuntu-latest'
run: |
cargo metadata --format-version 1 --manifest-path ./examples/Cargo.toml | \
Expand All @@ -150,17 +152,12 @@ jobs:
cat report.log
- name: Run Rust Readme examples
# run examples only on ubuntu for now
if: matrix.os == 'ubuntu-latest'
run: |
cd bindings/wasm
npm ci
npm run test:readme:rust
- name: Tear down iota sandbox
if: matrix.os == 'ubuntu-latest' && always()
uses: './.github/actions/iota-sandbox/tear-down'

- name: Stop sccache
uses: './.github/actions/rust/sccache/stop-sccache'
with:
Expand All @@ -181,7 +178,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
include:
- os: ubuntu-latest

Expand All @@ -204,24 +201,20 @@ jobs:
path: bindings/wasm

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

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

- name: Tear down iota sandbox
if: always()
uses: './.github/actions/iota-sandbox/tear-down'

test-wasm-firefox:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
include:
- os: ubuntu-latest

Expand All @@ -232,7 +225,7 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 16.x

- name: Install JS dependencies
run: npm ci
working-directory: bindings/wasm
Expand All @@ -244,7 +237,7 @@ jobs:
path: bindings/wasm

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

- name: Build Docker image
uses: docker/[email protected]
Expand All @@ -258,18 +251,14 @@ jobs:
- name: Run cypress
run: docker run --network host cypress-test test:browser:parallel:firefox

- name: Tear down iota sandbox
if: always()
uses: './.github/actions/iota-sandbox/tear-down'

test-wasm-chrome:
needs: build-wasm
if: ${{ needs.check-for-run-condition.outputs.should-run == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ubuntu-latest]
include:
- os: ubuntu-latest

Expand All @@ -292,7 +281,7 @@ jobs:
path: bindings/wasm

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

- name: Build Docker image
uses: docker/[email protected]
Expand All @@ -305,7 +294,3 @@ jobs:

- name: Run cypress
run: docker run --network host cypress-test test:browser:parallel:chrome

- name: Tear down iota sandbox
if: always()
uses: './.github/actions/iota-sandbox/tear-down'
17 changes: 9 additions & 8 deletions bindings/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
async-trait = { version = "0.1", default-features = false }
bls12_381_plus = "0.8.17"
console_error_panic_hook = { version = "0.1" }
futures = { version = "0.3" }
identity_ecdsa_verifier = { path = "../../identity_ecdsa_verifier", default-features = false, features = ["es256", "es256k"] }
identity_eddsa_verifier = { path = "../../identity_eddsa_verifier", default-features = false, features = ["ed25519"] }
js-sys = { version = "0.3.61" }
Expand All @@ -32,19 +30,22 @@ serde_repr = { version = "0.1", default-features = false }
tokio = { version = "1.29", default-features = false, features = ["sync"] }
wasm-bindgen = { version = "0.2.85", features = ["serde-serialize"] }
wasm-bindgen-futures = { version = "0.4", default-features = false }
zkryptium = "0.2.2"

[dependencies.identity_iota]
path = "../../identity_iota"
default-features = false
features = ["client", "revocation-bitmap", "resolver", "domain-linkage", "sd-jwt", "status-list-2021", "jpt-bbs-plus"]

[dev-dependencies]
rand = "0.8.5"
features = [
"client",
"revocation-bitmap",
"resolver",
"domain-linkage",
"sd-jwt",
"status-list-2021",
"jpt-bbs-plus",
]

[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi")))'.dependencies]
getrandom = { version = "0.2", default-features = false, features = ["js"] }
instant = { version = "0.1", default-features = false, features = ["wasm-bindgen"] }

[profile.release]
opt-level = 's'
Expand Down
1 change: 0 additions & 1 deletion identity_credential/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ rust-version.workspace = true
description = "An implementation of the Verifiable Credentials standard."

[dependencies]
async-trait = { version = "0.1.64", default-features = false }
bls12_381_plus = { workspace = true, optional = true }
flate2 = { version = "1.0.28", default-features = false, features = ["rust_backend"], optional = true }
futures = { version = "0.3", default-features = false, optional = true }
Expand Down
2 changes: 1 addition & 1 deletion identity_iota/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To try out the [examples](https://github.com/iotaledger/identity.rs/blob/HEAD/ex
## Example: Creating an Identity

The following code creates and publishes a new IOTA DID Document to a locally running private network.
See the [instructions](https://github.com/iotaledger/iota-sandbox) on running your own private network for development.
See the [instructions](https://github.com/iotaledger/iota/docker/iota-private-network) on running your own private network for development.

_Cargo.toml_

Expand Down
2 changes: 1 addition & 1 deletion identity_storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ rust-version.workspace = true
description = "Abstractions over storage for cryptographic keys used in DID Documents"

[dependencies]
anyhow = "1.0.82"
anyhow = { version = "1.0.82" }
async-trait = { version = "0.1.64", default-features = false }
bls12_381_plus = { workspace = true, optional = true }
futures = { version = "0.3.27", default-features = false, features = ["async-await"] }
Expand Down

0 comments on commit 47f2c9f

Please sign in to comment.