Skip to content

Commit

Permalink
Merge branch 'main' into chore/cache-docker-build
Browse files Browse the repository at this point in the history
  • Loading branch information
eike-hass committed Feb 6, 2024
2 parents dce8953 + 1a030d5 commit f71d42d
Show file tree
Hide file tree
Showing 819 changed files with 33,400 additions and 66,388 deletions.
2 changes: 2 additions & 0 deletions .cargo/audit.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[advisories]
ignore = [
"RUSTSEC-2021-0127", # serde_cbor is unmaintained https://github.com/iotaledger/identity.rs/issues/518
"RUSTSEC-2023-0052", # temporary ignore until fix is provided
"RUSTSEC-2023-0065", # temporary ignore until fix is provided
]
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# More details are here: https://help.github.com/articles/about-codeowners/

# The '*' pattern is global owners.

# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:

# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.

# Global rule:
* @iotaledger/identity
36 changes: 36 additions & 0 deletions .github/actions/iota-sandbox/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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 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
12 changes: 12 additions & 0 deletions .github/actions/iota-sandbox/tear-down/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
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
63 changes: 0 additions & 63 deletions .github/actions/private-tangle/setup/action.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .github/actions/private-tangle/tear-down/action.yml

This file was deleted.

22 changes: 11 additions & 11 deletions .github/actions/publish/publish-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ inputs:
runs:
using: "composite"
steps:
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
- name: Setup Rust
uses: './.github/actions/rust/rust-setup'
with:
toolchain: stable
profile: minimal
override: true
os: ${{ runner.os }}
job: ${{ github.job }}

- name: Install cargo-release
uses: actions-rs/cargo@v1
with:
command: install
args: --version ^0.21 cargo-release
shell: bash
run: cargo install --version =0.25 cargo-release

- name: Publish library to crates.io
shell: sh
shell: bash
run: |
echo "dry-run: '${{ inputs.dry-run }}'"
echo "version: '${{ inputs.version }}'"
cargo release --workspace --token ${{ inputs.crates-token }} --isolated --no-dev-version --no-push --no-tag --dependent-version error --verbose $(if [ "${{ inputs.dry-run }}" = "false" ]; then echo --execute --no-confirm; fi) ${{ inputs.version }}
cargo login ${{ inputs.crates-token }}
cargo release config
cargo release version --verbose --execute --no-confirm ${{ inputs.version }}
cargo release publish --verbose $(if [ "${{ inputs.dry-run }}" = "false" ]; then echo --execute --no-confirm; fi)
63 changes: 0 additions & 63 deletions .github/actions/publish/publish-stronghold-nodejs/action.yml

This file was deleted.

11 changes: 9 additions & 2 deletions .github/actions/publish/publish-wasm/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ inputs:
input-artifact-name:
description: "Name used for the input Wasm build artifact"
required: true
dry-run:
description: "'true' = only log potential result; 'false' = publish'"
required: true

runs:
using: "composite"
steps:
Expand All @@ -29,6 +33,9 @@ runs:
shell: sh
env:
NODE_AUTH_TOKEN: ${{ inputs.npm-token }}
# will publish 'latest' tag if no tag is passed
run: npm publish $(if [ ${{ inputs.tag }} != '' ]; then echo --tag ${{ inputs.tag }}; fi) --access public
working-directory: bindings/wasm
# will publish 'latest' tag if no tag is passed
run: |
echo "dry-run: '${{ inputs.dry-run }}'"
echo "tag: '${{ inputs.tag }}'"
npm publish $(if [ "${{ inputs.dry-run }}" != "false" ]; then echo --dry-run; fi) $(if [ ${{ inputs.tag }} != '' ]; then echo --tag ${{ inputs.tag }}; fi) --access public
56 changes: 8 additions & 48 deletions .github/actions/release/bump-versions/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,19 @@ inputs:
runs:
using: "composite"
steps:
- name: Install Rust stable toolchain
uses: actions-rs/toolchain@v1
- name: Setup Rust
uses: './.github/actions/rust/rust-setup'
with:
toolchain: stable
profile: minimal
override: true
os: ${{ runner.os }}
job: ${{ github.job }}

- name: Install cargo-workspaces
uses: actions-rs/cargo@v1
with:
command: install
args: --version ^0.2 cargo-workspaces
shell: bash
run: cargo install --version ^0.2 cargo-workspaces

- name: Install cargo-edit # to use cargo add and set-version
uses: actions-rs/cargo@v1
with:
command: install
args: -f --no-default-features --features "add set-version" --version ^0.8 cargo-edit
shell: bash
run: cargo install -f --no-default-features --features "set-version" --version ^0.8 cargo-edit

- name: Bump Rust crate versions
shell: bash
Expand All @@ -52,31 +47,6 @@ runs:
run: |
cargo workspaces version --force "*" --no-git-commit --exact custom ${{ inputs.version }} -y -a
# Deactivated while the crate is broken, which is the case due to the removal of identity_account_storage.
# - name: Bump stronghold nodejs bindings crate version
# shell: bash
# if: ${{inputs.release-target == 'wasm'}}
# working-directory: bindings/stronghold-nodejs
# run: |
# cargo set-version ${{ inputs.version }}

- name: Replace identity_iota version in Wasm bindings
shell: bash
if: ${{inputs.release-target == 'rust'}}
working-directory: bindings/wasm
run: |
cargo add identity_iota --path=../../identity_iota
# Deactivated while the crate is broken, which is the case due to the removal of identity_account_storage.
# - name: Replace identity versions in stronghold nodejs bindings
# shell: bash
# if: ${{inputs.release-target == 'rust'}}
# working-directory: bindings/stronghold-nodejs
# run: |
# cargo add identity_core --path=../../identity_core
# cargo add identity_did --path=../../identity_did
# cargo add identity_iota_core_legacy --path=../../identity_iota_core_legacy

- name: Set up Node.js
uses: actions/setup-node@v2
if: ${{inputs.release-target == 'wasm'}}
Expand All @@ -90,13 +60,3 @@ runs:
working-directory: bindings/wasm
run: |
npm version ${{ inputs.version }}
# Deactivated while the crate is broken, which is the case due to the removal of identity_account_storage.
# - name: Bump stronghold nodejs npm package version
# shell: bash
# if: ${{inputs.release-target == 'wasm'}}
# working-directory: bindings/stronghold-nodejs
# run: |
# npm version ${{ inputs.version }}
# # set peer dependency version
# echo "`jq '.peerDependencies."@iota/identity-wasm"="${{ inputs.version }}"' package.json`" > package.json
Loading

0 comments on commit f71d42d

Please sign in to comment.