Skip to content

Commit

Permalink
Merge branch '2.0' into refactor/types/remove-address-from-output-data
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex6323 committed Nov 29, 2023
2 parents 58830c4 + 3d0cfd5 commit e7cf153
Show file tree
Hide file tree
Showing 414 changed files with 30,534 additions and 20,485 deletions.
13 changes: 6 additions & 7 deletions .github/actions/private-tangle/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ runs:
# remove the last 5 lines and add docker compose with `-d` to run it in the background
sed -i -n -e :a -e '1,5!{P;N;D;};N;ba' run.sh
echo "docker compose -f \$DOCKER_COMPOSE_FILE up -d" >> run.sh
echo "docker compose -f docker-compose.yml up -d" >> run.sh
working-directory: iota-core/tools/docker-network

# Copied from https://github.com/iotaledger/iota-core/blob/926bf11b5fb6dc46b25482770e0ccf1e048b97c9/.github/workflows/unit-test.yml#L16-L19
- uses: actions/setup-go@v4
with:
go-version-file: 'iota-core/go.mod'
go-version-file: "iota-core/go.mod"
cache: false

- name: Setup private tangle
Expand All @@ -37,8 +37,7 @@ runs:

- name: Wait for tangle to start
shell: bash
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for | sh -s -- -t 120 http://localhost:8080/health -- echo "Tangle is up"
# TODO enable, maybe need another URL
# - name: Wait for faucet to start
# shell: bash
# run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for | sh -s -- -t 120 http://localhost:8081/api/info -- echo "Faucet is up"
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for | sh -s -- -t 120 http://localhost:8050/health -- echo "Tangle is up"
- name: Wait for faucet to start
shell: bash
run: wget -qO- https://raw.githubusercontent.com/eficode/wait-for/v2.2.4/wait-for | sh -s -- -t 120 http://localhost:8088/health -- echo "Faucet is up"
12 changes: 6 additions & 6 deletions .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.87"
version: "0.2.88"

- name: Set Up Node.js ${{ matrix.node }} and Yarn Cache
uses: actions/setup-node@v3
Expand All @@ -86,16 +86,16 @@ jobs:
if: ${{ startsWith(matrix.os, 'ubuntu') }}
uses: "./.github/actions/private-tangle/setup"

# - name: Run Yarn Test
# if: ${{ startsWith(matrix.os, 'ubuntu') }}
# working-directory: bindings/wasm/
# run: yarn test
- name: Run Yarn Test
if: ${{ startsWith(matrix.os, 'ubuntu') }}
working-directory: bindings/wasm/
run: yarn test

- name: Run Yarn Test
if: ${{ !startsWith(matrix.os, 'ubuntu') }}
working-directory: bindings/wasm/
# Only run test that doesn't require a node because we can't use the private tangle script on macos and windows
run: yarn test -t 'Wallet methods'
run: yarn test -t 'utils methods'

- name: Tear down private tangle
if: ${{ startsWith(matrix.os, 'ubuntu') }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,13 @@ jobs:
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Install gon (macOS)
# https://github.com/mitchellh/gon
run: brew install mitchellh/gon/gon
# Fork of https://github.com/mitchellh/gon
# https://github.com/Bearer/gon
# Since we're dealing with code signing secrets we want to pin the version of gon
run: |
wget https://raw.githubusercontent.com/Bearer/homebrew-tap/366bc999e14a8d04e07e24f9387bcbaf89c1bc53/Formula/gon.rb
brew install --formula gon.rb
rm gon.rb
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
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,30 @@ jobs:
- name: Run cargo-license-template
run: cargo ci-license

check-docs:
name: Check Documentation
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings

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

- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
components: rustfmt

- name: Install Required Dependencies
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Run cargo-doc
run: cargo ci-doc

audit:
name: Perform Security Audit
runs-on: ubuntu-latest
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/upload-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Build and upload API docs

on:
release:
types: [published]

env:
GH_TOKEN: ${{ github.token }}

permissions:
actions: 'write'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Get release language
id: get_release_language
run: |
if [[ ${{ github.ref }} == *"python"* ]]; then
echo LANGUAGE="python" >> $GITHUB_OUTPUT
fi
if [[ ${{ github.ref }} == *"nodejs"* ]]; then
echo LANGUAGE="nodejs" >> $GITHUB_OUTPUT
fi
- name: Check if release language is supported
if: steps.get_release_language.outputs.LANGUAGE != 'python' && steps.get_release_language.outputs.LANGUAGE != 'nodejs'
run: gh run cancel ${{ github.run_id }}

- name: Set up Rust
uses: ./.github/actions/setup-rust

- name: Set Up Node.js 18 and Yarn Cache
uses: actions/setup-node@v3
with:
node-version: "18"

- name: Install Required Dependencies (Ubuntu)
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Get release version
id: get_release_version
run: |
VERSION=$(echo ${{ github.ref }} | sed -e 's/.*v\([0-9]*\.[0-9]*\).*/\1/')
echo VERSION=$VERSION >> $GITHUB_OUTPUT
- name: Build python docs
if: steps.get_release_language.outputs.LANGUAGE == 'python'
run: |
cd bindings/python
pip install -r requirements-dev.txt
PYTHONPATH=. pydoc-markdown
cd -
- name: Build nodejs docs
if: steps.get_release_language.outputs.LANGUAGE == 'nodejs'
run: |
cd bindings/nodejs
# The SDK still uses yarn classic: https://github.com/iotaledger/iota-sdk/issues/433
yarn set version classic
yarn
yarn create-api-docs --out ../../docs/nodejs
cd -
- name: Compress generated docs
run: |
tar czvf ${{ steps.get_release_language.outputs.LANGUAGE }}.tar.gz docs/*
- name: Upload docs to AWS S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID_IOTA_WIKI }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY_IOTA_WIKI }}
AWS_DEFAULT_REGION: "eu-central-1"
run: |
aws s3 cp ${{ steps.get_release_language.outputs.LANGUAGE }}.tar.gz s3://files.iota.org/iota-wiki/iota-sdk/${{ steps.get_release_version.outputs.VERSION }}/ --acl public-read
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ address.json
.DS_Store
book
.venv*

# Temporary documentation
docs
Loading

0 comments on commit e7cf153

Please sign in to comment.