Skip to content

Commit

Permalink
Merge pull request #1111 from thibault-martinez/merge-develop-2.0
Browse files Browse the repository at this point in the history
Merge develop into 2.0
  • Loading branch information
thibault-martinez committed Aug 31, 2023
2 parents fdd31ca + 6d33786 commit 24ac506
Show file tree
Hide file tree
Showing 169 changed files with 5,366 additions and 3,564 deletions.
10 changes: 10 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ ci-check-nodejs = "check --manifest-path bindings/nodejs/Cargo.toml --all-target
ci-check-python = "check --manifest-path bindings/python/Cargo.toml --all-targets --lib"
ci-check-wasm = "check --manifest-path bindings/wasm/Cargo.toml --target wasm32-unknown-unknown --lib"
ci-check-nostd = "check --no-default-features -F serde -p iota-sdk --target riscv64gc-unknown-none-elf"
ci-check-types = "check --no-default-features -p iota-sdk"

ci-test = "nextest run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core"

Expand All @@ -14,3 +15,12 @@ ci-doc = "doc --all-features --no-deps --document-private-items"
ci-fmt = "fmt --all -- --check"
ci-toml = "sort --grouped --check"
ci-udeps = "udeps --all-targets --all-features --backend=depinfo"
ci-license = "license-template --template .license_template"

# The ignored security advisories:
#
# - RUSTSEC-2021-0065: https://rustsec.org/advisories/RUSTSEC-2021-0065
# - anymap is unmaintained 🤷‍♀️
# - RUSTSEC-2023-0052: https://rustsec.org/advisories/RUSTSEC-2023-0052
# - TODO: waiting for fix in dependency
ci-audit = "audit --file Cargo.lock --deny warnings --ignore RUSTSEC-2021-0065 --ignore RUSTSEC-2023-0052"
16 changes: 6 additions & 10 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ inputs:
description: Type of toolchain to install.
required: false
default: stable
target:
description: Target triple of the toolchain.
targets:
description: Targets triple of the toolchain.
required: false
components:
description: Additional components to install.
Expand Down Expand Up @@ -35,12 +35,10 @@ runs:

- id: install
name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ inputs.toolchain }}
target: ${{ inputs.target }}
override: true
profile: minimal
targets: ${{ inputs.targets }}
components: ${{ inputs.components }}

- name: Cache dependencies
Expand All @@ -52,7 +50,5 @@ runs:

- name: Install ${{ inputs.install }}
if: ${{ inputs.install != '' }}
uses: actions-rs/cargo@v1
with:
command: install
args: ${{ inputs.install }}
shell: bash
run: cargo install ${{ inputs.install }}
11 changes: 4 additions & 7 deletions .github/workflows/bindings-nodejs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
- uses: actions/checkout@v3

- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -89,10 +89,7 @@ jobs:
python-version: "3.10"

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
uses: dtolnay/rust-toolchain@stable

# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
Expand All @@ -105,7 +102,7 @@ jobs:
working-directory: bindings/nodejs

- name: Install LLVM and Clang (Windows) # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@32c4866ebb71e0949e8833eb49beeebed48532bd
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8
if: matrix.os == 'windows-2019'
with:
version: "11.0"
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/bindings-nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
cache-root: bindings/nodejs

- name: Set Up Node.js ${{ matrix.node }} and Yarn Cache
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
cache: yarn
cache-dependency-path: bindings/nodejs/yarn.lock
Expand All @@ -129,7 +129,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
cache: yarn
cache-dependency-path: bindings/nodejs/yarn.lock
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bindings-python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
${{ matrix.os }}-stable-cargo-index-
- name: Install LLVM and Clang (Windows) # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@32c4866ebb71e0949e8833eb49beeebed48532bd
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8
if: matrix.os == 'windows-latest'
with:
version: "11.0"
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/bindings-wasm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,18 @@ jobs:
- uses: actions/checkout@v3

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true
target: "wasm32-unknown-unknown"

# Download a pre-compiled wasm-bindgen binary.
- name: Install wasm-bindgen-cli
uses: jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9
uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: "0.2.87"

- name: Set up Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/bindings-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ jobs:
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
target: wasm32-unknown-unknown
targets: wasm32-unknown-unknown
cache-root: bindings/wasm

# Download a pre-compiled wasm-bindgen binary.
- name: Install wasm-bindgen-cli
uses: jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9
uses: jetli/wasm-bindgen-action@v0.2.0
with:
version: "0.2.87"

- name: Set Up Node.js ${{ matrix.node }} and Yarn Cache
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: yarn
Expand Down Expand Up @@ -111,7 +111,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
cache: yarn
cache-dependency-path: bindings/wasm/yarn.lock
Expand All @@ -135,7 +135,7 @@ jobs:
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
cache: yarn
cache-dependency-path: bindings/wasm/yarn.lock
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,4 @@ jobs:
uses: taiki-e/install-action@nextest

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: nextest
args: run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core
run: cargo nextest run --all-features --profile ci --cargo-profile ci -p iota-sdk -p iota-sdk-bindings-core
21 changes: 21 additions & 0 deletions .github/workflows/cancel-jobs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cancel jobs from merged/closed pull request

on:
pull_request_target:
types: [closed]
# workflow_run:
# workflows: ["*"]
# types: [requested]


jobs:
merge_job:
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: styfle/[email protected]
with:
ignore_sha: true
access_token: ${{ secrets.GITHUB_TOKEN }}
workflow_id: all
32 changes: 7 additions & 25 deletions .github/workflows/cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
RELEASE_UPLOAD_URL: ${{ steps.create_release.outputs.upload_url }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: set version env variable
run: echo "CRATE_VERSION=$(cat cli/Cargo.toml | sed -n 's/.*version = "\([^"]*\)".*/\1/p' | head -1)" >> $GITHUB_ENV
- name: create release
Expand All @@ -24,20 +24,8 @@ jobs:
tag_name: "cli-wallet-v${{ env.CRATE_VERSION }}"
release_name: "cli-wallet-v${{ env.CRATE_VERSION }}"
body: |
# Changelog
<!--- ## Added -->
<!--- ## Changed -->
<!--- ## Deprecated -->
<!--- ## Removed -->
<!--- ## Fixed -->
# Checksums
https://github.com/iotaledger/iota-sdk/blob/develop/cli/CHANGELOG.md
|Asset|SHA-256 checksum|
|---|---|
|wallet-linux||
Expand Down Expand Up @@ -67,12 +55,9 @@ jobs:
ext: .exe

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
uses: dtolnay/rust-toolchain@stable

- name: Install required packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
Expand All @@ -86,7 +71,7 @@ jobs:
if: matrix.os == 'macos-latest'

- name: Install LLVM and Clang (Windows) # required for bindgen to work, see https://github.com/rust-lang/rust-bindgen/issues/1797
uses: KyleMayes/install-llvm-action@32c4866ebb71e0949e8833eb49beeebed48532bd
uses: KyleMayes/install-llvm-action@c135b3937686fd69c2651507aabc9925a8f9eee8
if: matrix.os == 'windows-latest'
with:
version: "11.0"
Expand All @@ -98,10 +83,7 @@ jobs:

# build the CLI
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --manifest-path ./cli/Cargo.toml --profile production
run: cargo build --manifest-path ./cli/Cargo.toml --profile production

- name: Import code signing assets (macOS)
# Based on https://github.com/Apple-Actions/import-codesign-certs/blob/master/src/security.ts
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
# uses: "./.github/actions/private-tangle/tear-down"

- name: Upload coverage data to Coveralls
uses: coverallsapp/github-action@v1.1.2
uses: coverallsapp/github-action@v2.2.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.info
Expand Down
Loading

0 comments on commit 24ac506

Please sign in to comment.