diff --git a/.github/actions/iota-rebase-sandbox/setup/action.yml b/.github/actions/iota-rebase-sandbox/setup/action.yml new file mode 100644 index 0000000000..7e1b9c84eb --- /dev/null +++ b/.github/actions/iota-rebase-sandbox/setup/action.yml @@ -0,0 +1,37 @@ +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: | + mkdir -p iota + cd iota + + # Select platform-specific asset pattern + if [ "${{ inputs.platform }}" = "linux" ]; then + PLATFORM="linux" + else + PLATFORM="macos" + fi + + # Get download URL with simpler jq filter + DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota/releases/latest" | \ + jq -r --arg p "$PLATFORM" '.assets[] | select(.name | contains($p)) | .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 & diff --git a/.github/actions/iota-sandbox/setup/action.yml b/.github/actions/iota-sandbox/setup/action.yml deleted file mode 100644 index 8b32b8608d..0000000000 --- a/.github/actions/iota-sandbox/setup/action.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: 'iota-sandbox-setup' -description: 'Setup IOTA Sandbox' -runs: - using: "composite" - steps: - - name: Setup iota sandbox - shell: bash - run: | - # Use next lines for using the GitHub release - mkdir iota-sandbox - cd iota-sandbox - mkdir sandbox - cd sandbox - # Use the output of https://api.github.com/repos/iotaledger/iota-sandbox/releases/latest - DOWNLOAD_URL=$(curl "https://api.github.com/repos/iotaledger/iota-sandbox/releases" | jq -r '.[0].assets[] | select(.name | contains("iota_sandbox")) | .browser_download_url') - echo "Downloading sandbox from $DOWNLOAD_URL" - curl -L -o iota_sandbox.tar.gz $DOWNLOAD_URL - tar -xf iota_sandbox.tar.gz - - # Use the next lines to use the main branch - # git clone https://github.com/iotaledger/iota-sandbox - # cd iota-sandbox/sandbox - - # Start Tangle - sudo ./bootstrap.sh - docker compose --profile inx-faucet up -d - - name: Wait for tangle to start - shell: bash - run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost/health -- echo "Tangle is up" - env: - WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 - - name: Wait for faucet to start - shell: bash - run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/$WAIT_FOR_VERSION/wait-for | sh -s -- -t 60 http://localhost/faucet/api/info -- echo "Faucet is up" - env: - WAIT_FOR_VERSION: 4df3f9262d84cab0039c07bf861045fbb3c20ab7 # v2.2.3 diff --git a/.github/actions/iota-sandbox/tear-down/action.yml b/.github/actions/iota-sandbox/tear-down/action.yml deleted file mode 100644 index c8e6225d0b..0000000000 --- a/.github/actions/iota-sandbox/tear-down/action.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: 'iota-sandbox-tear-down' -description: 'tear-down a iota sandbox' -runs: - using: "composite" - steps: - - name: Tear down iota sandbox - shell: bash - run: | - cd iota-sandbox/sandbox - docker compose down - cd ../.. - sudo rm -rf iota-sandbox diff --git a/.github/actions/release/changelog-generator/action.yml b/.github/actions/release/changelog-generator/action.yml index 751407c73b..79a1ad4be8 100644 --- a/.github/actions/release/changelog-generator/action.yml +++ b/.github/actions/release/changelog-generator/action.yml @@ -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 diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index c92432e36f..fe2f32225a 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -55,7 +55,7 @@ jobs: CORE_MODIFIED=true else # unmodified - CORE_MODIFIED=false + CORE_MODIFIED=false fi echo CORE_MODIFIED=$CORE_MODIFIED echo "core-modified=$CORE_MODIFIED" >> $GITHUB_OUTPUT @@ -130,10 +130,13 @@ 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 @@ -157,10 +160,6 @@ jobs: 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: @@ -204,16 +203,12 @@ 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' }} @@ -232,7 +227,7 @@ jobs: uses: actions/setup-node@v1 with: node-version: 16.x - + - name: Install JS dependencies run: npm ci working-directory: bindings/wasm @@ -244,7 +239,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/build-push-action@v6.2.0 @@ -258,10 +253,6 @@ 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' }} @@ -292,7 +283,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/build-push-action@v6.2.0 @@ -305,7 +296,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' diff --git a/identity_iota/README.md b/identity_iota/README.md index ef2d8cb15e..2a5287c98b 100644 --- a/identity_iota/README.md +++ b/identity_iota/README.md @@ -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_