Skip to content

Commit

Permalink
Merge branch 'develop' into tooling-wallet/fix-ci-changelog-generator
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 authored Dec 20, 2024
2 parents 67847d6 + 78f337f commit 2104813
Show file tree
Hide file tree
Showing 601 changed files with 17,469 additions and 8,697 deletions.
9 changes: 5 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
# Changes to the genesis builder should be approved by Konstantinos or Mirko at least
/crates/iota-genesis-builder/ @kodemartin @miker83z

# vm-language team
/iota-execution/ @iotaledger/vm-language
/external-crates/ @iotaledger/vm-language

# infrastructure team
/docker/ @iotaledger/infrastructure @iotaledger/node @iotaledger/devops-admin
/crates/iota-json-rpc*/ @iotaledger/infrastructure
Expand Down Expand Up @@ -61,6 +57,11 @@ prettier.config.js @iotaledger/tooling
turbo.json @iotaledger/tooling
vercel.json @iotaledger/tooling

# vm-language team
# Needs to be after package.json ownership definition to override it
/iota-execution/ @iotaledger/vm-language
/external-crates/ @iotaledger/vm-language

# Docs and examples are for DevEx to approve upon
/docs/ @iotaledger/devx
/examples/ @iotaledger/devx
Expand Down
3 changes: 3 additions & 0 deletions .github/actions/diffs/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ runs:
- "examples/**"
- "iota_programmability/**"
- ".github/workflows/_move_tests.yml"
isRosetta:
- ".github/scripts/rosetta/**"
- "crates/iota-rosetta/**"
isExternalCrates:
- "external-crates/move/crates/**"
isReleaseNotesEligible:
Expand Down
7 changes: 5 additions & 2 deletions .github/scripts/rosetta/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ cargo install --locked --bin iota --path crates/iota
cargo install --locked --bin iota-rosetta --path crates/iota-rosetta

echo "run IOTA genesis"
iota genesis
CONFIG_DIR=~/.iota/iota_config
if ! [ -d "$CONFIG_DIR" ]; then
iota genesis
fi

echo "generate rosetta configuration"
iota-rosetta generate-rosetta-cli-config --online-url http://127.0.0.1:9002 --offline-url http://127.0.0.1:9003

echo "install rosetta-cli"
curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-cli/master/scripts/install.sh | sh -s
curl -sSfL https://raw.githubusercontent.com/coinbase/rosetta-cli/master/scripts/install.sh | sh -s
22 changes: 21 additions & 1 deletion .github/workflows/_move_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,24 @@ jobs:
tool: nextest
- name: Run move tests
run: |
cargo nextest run -p iota-framework-tests -- unit_tests::
cargo nextest run -E
'package(iota-framework-tests)
or (package(iota-core) and test(quorum_driver::))
or package(iota-benchmark)
or test(move_tests::)'
move-simtest:
timeout-minutes: 10
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
- uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38
with:
tool: nextest
- name: Run move tests
run: |
scripts/simtest/cargo-simtest simtest --profile ci -E
'package(iota-framework-tests)
or (package(iota-core) and test(quorum_driver::))
or package(iota-benchmark)
or test(move_tests::)'
55 changes: 55 additions & 0 deletions .github/workflows/_rosetta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Rosetta validation

on: workflow_call

concurrency:
group: rosetta-validation-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/develop' }}

env:
CARGO_TERM_COLOR: always
RUST_LOG: "error"
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short
CARGO_INCREMENTAL: 0
# Allow more retries for network requests in cargo (downloading crates) and
# rustup (installing toolchains). This should help to reduce flaky CI failures
# from transient network timeouts or other issues.
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
# RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings

jobs:
validation:
timeout-minutes: 45
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup environment
run: .github/scripts/rosetta/setup.sh
shell: bash

- name: Start local IOTA network
run: |
iota start --no-full-node &
shell: bash

- name: Start Rosetta servers
run: .github/scripts/rosetta/start_rosetta.sh
shell: bash

- name: Sleep for 20 seconds
run: sleep 20s
shell: bash

- name: Run check:construction test
run: |
./bin/rosetta-cli --configuration-file rosetta_cli.json check:construction
shell: bash

- name: Run check:data test
run: |
./bin/rosetta-cli --configuration-file rosetta_cli.json check:data
shell: bash
37 changes: 4 additions & 33 deletions .github/workflows/_rust_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
changedCrates:
type: string
required: false
runSimtest:
type: boolean
default: true

concurrency:
group: rust-tests-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -118,6 +121,7 @@ jobs:

simtest:
name: Simtest rust
if: inputs.runSimtest
timeout-minutes: 45
runs-on: [self-hosted]
env:
Expand Down Expand Up @@ -159,39 +163,6 @@ jobs:
eval ${command}
rosetta-validation:
timeout-minutes: 45
runs-on: [self-hosted]
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1

- name: Setup environment
run: .github/scripts/rosetta/setup.sh
shell: bash

- name: Start local IOTA network
run: |
iota start --no-full-node &
shell: bash

- name: Start Rosetta servers
run: .github/scripts/rosetta/start_rosetta.sh
shell: bash

- name: Sleep for 20 seconds
run: sleep 20s
shell: bash

- name: Run check:construction test
run: |
./bin/rosetta-cli --configuration-file rosetta_cli.json check:construction
shell: bash

- name: Run check:data test
run: |
./bin/rosetta-cli --configuration-file rosetta_cli.json check:data
shell: bash

graphql-rpc:
name: graphql-rpc
timeout-minutes: 45
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/_vercel_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,16 @@ jobs:
secrets: inherit
with:
isProd: false
isStaging: false

wallet-dashboard-prod:
name: Vercel Wallet Dashboard Production
wallet-dashboard-staging:
name: Vercel Wallet Dashboard Staging
if: github.ref_name == 'develop'
uses: ./.github/workflows/apps_wallet_dashboard_deploy.yml
secrets: inherit
with:
isProd: true
isProd: false
isStaging: true

apps-backend-preview:
name: Vercel apps-backend Preview
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/apps_wallet_dashboard_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,25 @@ name: Deploy for Wallet Dashboard
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.WALLET_DASHBOARD_VERCEL_PROJECT_ID }}
WALLET_DASHBOARD_VERCEL_PROJECT_STAGING_URL: ${{ secrets.WALLET_DASHBOARD_VERCEL_PROJECT_STAGING_URL }}

on:
workflow_dispatch:
inputs:
isProd:
type: boolean
required: true
isStaging:
type: boolean
required: true
workflow_call:
inputs:
isProd:
type: boolean
required: true
isStaging:
type: boolean
required: true

jobs:
deploy:
Expand Down Expand Up @@ -64,8 +75,11 @@ jobs:
id: deploy_url
if: ${{ inputs.isProd == false }}
run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT
- name: Alias Staging deploy
if: ${{ inputs.isStaging }}
run: vercel alias ${{ steps.deploy_url.outputs.DEPLOY_URL }} $WALLET_DASHBOARD_VERCEL_PROJECT_STAGING_URL --token=${{ secrets.VERCEL_TOKEN }} --scope=${{ secrets.VERCEL_SCOPE }}
- name: Comment on pull request
if: ${{ inputs.isProd == false }}
if: ${{ inputs.isProd == false && inputs.isStaging == false }}
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/hierarchy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
outputs:
isRust: ${{ steps.diff.outputs.isRust }}
isMove: ${{ steps.diff.outputs.isMove }}
isRosetta: ${{ steps.diff.outputs.isRosetta }}
isDoc: ${{ steps.diff.outputs.isDoc }}
isReleaseNotesEligible: ${{ steps.diff.outputs.isReleaseNotesEligible }}
isExternalCrates: ${{ steps.diff.outputs.isExternalCrates }}
Expand Down Expand Up @@ -107,6 +108,17 @@ jobs:
with:
isRust: ${{ needs.diff.outputs.isRust == 'true' }}

rosetta:
needs:
- diff
- dprint-format
- license-check
- typos
if: |
!cancelled() && !failure() &&
(needs.diff.outputs.isRosetta == 'true' || needs.diff.outputs.isRust == 'true')
uses: ./.github/workflows/_rosetta.yml

e2e:
if: (!cancelled() && !failure() && (!github.event.pull_request.draft || github.ref_name == 'develop'))
needs:
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ on:
schedule:
- cron: "0 0 * * *" # every day at midnight
workflow_dispatch:
inputs:
iota_ref:
description: "Branch / commit to simtest"
type: string
required: true
default: develop
test_num:
description: "MSIM_TEST_NUM (test iterations)"
type: string
required: false
default: "30"

env:
BINARY_LIST_FILE: "./binary-build-list.json"
Expand All @@ -27,6 +38,8 @@ env:
RUSTUP_MAX_RETRIES: 10
# Don't emit giant backtraces in the CI logs.
RUST_BACKTRACE: short
IOTA_REF: "${{ github.event.inputs.iota_ref || 'develop' }}"
TEST_NUM: "${{ github.event.inputs.test_num || '30' }}"

jobs:
release:
Expand Down Expand Up @@ -61,6 +74,9 @@ jobs:

tests:
uses: ./.github/workflows/_rust_tests.yml
with:
# simtest job below runs a superset of these tests
runSimtest: false

external-tests:
uses: ./.github/workflows/_external_rust_tests.yml
Expand All @@ -84,3 +100,17 @@ jobs:

split-cluster:
uses: ./.github/workflows/split_cluster.yml

simtest:
timeout-minutes: 240
runs-on: [self-hosted]

steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
ref: ${{ env.IOTA_REF }}
- uses: taiki-e/install-action@375e0c7f08a66b8c2ba7e7eef31a6f91043a81b0 # v2.44.38
with:
tool: nextest
- name: Run simtest
run: scripts/simtest/simtest-run.sh
27 changes: 8 additions & 19 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
matrix:
os: [
self-hosted, # ubuntu-x86_64
# TODO: uncomment when runners are public available https://github.com/iotaledger/iota/issues/4421
# ubuntu-arm64, # ubuntu-arm64
macos-latest, # macos-arm64
# windows-latest (windows-x86_64) is disabled because we need to add custom logic for authenticating
# git for private repositories during the build (needed for iota-msim)
# MrSquaare/ssh-setup-action@v3 does not support windows
windows-latest, # windows-x86_64
]
fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -108,10 +108,10 @@ jobs:
if: ${{ matrix.os == 'windows-latest' }}
shell: bash
run: |
choco install postgresql12 --force --params '/Password:root'
echo "C:\Program Files\PostgreSQL\12\bin" >> $GITHUB_PATH
echo "C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_PATH
echo "PQ_LIB_DIR=C:\Program Files\PostgreSQL\12\lib" >> $GITHUB_ENV
choco install postgresql16 --force --params '/Password:root'
echo "C:\Program Files\PostgreSQL\16\bin" >> $GITHUB_PATH
echo "C:\Program Files\PostgreSQL\16\lib" >> $GITHUB_PATH
echo "PQ_LIB_DIR=C:\Program Files\PostgreSQL\16\lib" >> $GITHUB_ENV
echo "PG_DATABASE_URL=postgres://postgres:root@localhost/" >> $GITHUB_ENV
echo "PG_EXAMPLE_DATABASE_URL=postgres://postgres:root@localhost/diesel_example" >> $GITHUB_ENV
Expand All @@ -126,6 +126,7 @@ jobs:
run: |
brew install postgresql
# TODO: uncomment when runners are public available https://github.com/iotaledger/iota/issues/4421
# NOTE: Self-hosted runners should already have postgres installed
# - name: Install postgres (Ubuntu arm64)
# if: ${{ matrix.os == 'ubuntu-arm64' }}
Expand Down Expand Up @@ -227,15 +228,3 @@ jobs:
# env:
# # https://github.com/settings/tokens/new?scopes=public_repo,workflow
# COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GH_FORMULA_BUMP }}
#
# # Tag all iota images with release tag, so that they can be easily found
# tag-docker-hub-images:
# runs-on: ubuntu-latest
# steps:
# - name: Dispatch Tagging of images in DockerHub, in MystenLabs/sui-operations
# uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3.0.0
# with:
# repository: iotaledger/iota
# token: ${{ secrets.DOCKER_BINARY_BUILDS_DISPATCH }}
# event-type: tag-docker-images
# client-payload: '{"iota_commit": "${{ github.sha }}", "repo_name": "all", "tag": "${{ env.TAG_NAME }}"}'
Loading

0 comments on commit 2104813

Please sign in to comment.