Skip to content

Commit

Permalink
Merge branch '2.0' of https://github.com/iotaledger/iota-sdk into 500…
Browse files Browse the repository at this point in the history
…-error-patch
  • Loading branch information
marc2332 committed Feb 8, 2024
2 parents cc54773 + 812ca89 commit e03191a
Show file tree
Hide file tree
Showing 124 changed files with 1,963 additions and 40,165 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/bindings-nodejs-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: yarn build

- name: Update Cargo.toml with git
run: sed -i 's#path = "../core"#git = "https://github.com/iotaledger/iota-sdk", rev = "'$GITHUB_SHA'"#g' Cargo.toml
run: sed -i 's#path = "../core"#git = "https://github.com/iotaledger/iota-sdk", rev = "'$GITHUB_SHA'"#g' Cargo.toml

- name: Print Cargo.toml
run: cat Cargo.toml
Expand All @@ -50,7 +50,7 @@ jobs:
shell: sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
run: yarn publish --access public

nodejs-binding-prebuild:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -225,7 +225,7 @@ jobs:
id: prepare_release
shell: bash
run: |
echo "tag_name=iota-sdk-nodejs-v$(npm pkg get version --workspaces=false | tr -d \")" >> "$GITHUB_OUTPUT"
echo "tag_name=iota-sdk-nodejs-v$(cat package.json | jq -r '.version')" >> "$GITHUB_OUTPUT"
working-directory: bindings/nodejs

- name: Sign and notarize index.node binary (macOS arm64)
Expand All @@ -235,7 +235,7 @@ jobs:
AC_PASSWORD: ${{ secrets.ASC_PASSWORD }}
working-directory: bindings/nodejs
run: |
TAR_NAME=sdk-v$(npm pkg get version --workspaces=false | tr -d \")-napi-v6-darwin-arm64.tar.gz
TAR_NAME=sdk-v$(cat package.json | jq -r '.version')-napi-v6-darwin-arm64.tar.gz
# unpack to only get the index.node
tar -xvf prebuilds/@iota/$TAR_NAME
Expand All @@ -253,7 +253,8 @@ jobs:
- name: Upload prebuild to Github release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Token expires Jan 25, 2025
token: ${{ secrets.GH_RELEASE_PUBLISH_PAT }}
body: https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/CHANGELOG.md
files: bindings/nodejs/prebuilds/@iota/*
tag_name: ${{ steps.prepare_release.outputs.tag_name }}
3 changes: 2 additions & 1 deletion .github/workflows/bindings-python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ jobs:
- name: Upload Wheels to Github release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Token expires Jan 25, 2025
token: ${{ secrets.GH_RELEASE_PUBLISH_PAT }}
body: https://github.com/iotaledger/iota-sdk/blob/develop/bindings/python/CHANGELOG.md
files: wheels/*
tag_name: ${{ steps.tagname.outputs.TAG_NAME }}
Expand Down
63 changes: 44 additions & 19 deletions .github/workflows/bindings-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ concurrency:
cancel-in-progress: true

jobs:
lint:
format:
name: Python PEP8 format
runs-on: ubuntu-latest
strategy:
Expand All @@ -58,7 +58,7 @@ jobs:
cache: pip
cache-dependency-path: bindings/python/requirements-dev.txt

- name: Install Dependencies for Python Binding Lint
- name: Install Dependencies for Python Binding Format
run: |
python3 -m pip install --upgrade setuptools pip wheel
python3 -m pip install tox-gh-actions
Expand All @@ -67,9 +67,49 @@ jobs:
working-directory: bindings/python
run: tox -e format

lint:
name: Python lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10"]

steps:
- name: Checkout the Source Code
uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }} and Pip Cache
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: bindings/python/requirements-dev.txt

- name: Install Dependencies for Python Binding Lint
run: |
python3 -m pip install --upgrade setuptools pip wheel
python3 -m pip install tox-gh-actions
- name: Install required packages (Ubuntu)
run: |
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Run linter for iota_sdk
working-directory: bindings/python
run: tox -e lint-sdk

- name: Run linter for examples
working-directory: bindings/python
run: tox -e lint-examples

- name: Run linter for tests
working-directory: bindings/python
run: tox -e lint-tests

test:
name: Linter & Tests
needs: lint
name: Tests
needs: format
if: ${{ ! github.event.schedule }}
runs-on: ${{ matrix.os }}
strategy:
Expand Down Expand Up @@ -111,21 +151,6 @@ jobs:
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Run linter for iota_sdk
if: ${{ startsWith(matrix.os, 'ubuntu-latest') }}
working-directory: bindings/python
run: tox -e lint-sdk

- name: Run linter for examples
if: ${{ startsWith(matrix.os, 'ubuntu-latest') }}
working-directory: bindings/python
run: tox -e lint-examples

- name: Run linter for tests
if: ${{ startsWith(matrix.os, 'ubuntu-latest') }}
working-directory: bindings/python
run: tox -e lint-tests

- name: Run tests
working-directory: bindings/python
run: tox
9 changes: 5 additions & 4 deletions .github/workflows/bindings-wasm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install wasm-bindgen-cli
uses: jetli/[email protected]
with:
version: "0.2.89"
version: "0.2.90"

- name: Set up Node.js
uses: actions/setup-node@v3
Expand All @@ -46,18 +46,19 @@ jobs:
shell: sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public
run: yarn publish --access public

- name: Prepare Github release
id: prepare_release
run: |
yarn pack
echo "tag_name=iota-sdk-wasm-v$(npm pkg get version --workspaces=false | tr -d \")" >> "$GITHUB_OUTPUT"
echo "tag_name=iota-sdk-wasm-v$(cat package.json | jq -r '.version')" >> "$GITHUB_OUTPUT"
- name: Upload package to Github release
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
# Token expires Jan 25, 2025
token: ${{ secrets.GH_RELEASE_PUBLISH_PAT }}
body: "https://github.com/iotaledger/iota-sdk/blob/develop/bindings/wasm/CHANGELOG.md \n https://github.com/iotaledger/iota-sdk/blob/develop/bindings/nodejs/CHANGELOG.md"
files: bindings/wasm/*.tgz
tag_name: ${{ steps.prepare_release.outputs.tag_name }}
2 changes: 1 addition & 1 deletion .github/workflows/bindings-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Install wasm-bindgen-cli
uses: jetli/[email protected]
with:
version: "0.2.89"
version: "0.2.90"

- name: Set Up Node.js ${{ matrix.node }} and Yarn Cache
uses: actions/setup-node@v3
Expand Down
Loading

0 comments on commit e03191a

Please sign in to comment.