diff --git a/.github/workflows/narwhal.yml b/.github/workflows/narwhal.yml index 320af4674794d..a12fc42512603 100644 --- a/.github/workflows/narwhal.yml +++ b/.github/workflows/narwhal.yml @@ -1,15 +1,6 @@ name: Narwhal on: - push: - branches: - - 'main' - - 'devnet' - - 'testnet' - - 'mainnet' - - 'releases/sui-*-release' - pull_request: - types: [opened, synchronize, reopened, ready_for_review] workflow_dispatch: inputs: sui_repo_ref: diff --git a/.github/workflows/narwhal_pull.yml b/.github/workflows/narwhal_pull.yml deleted file mode 100644 index 3a7a09068408d..0000000000000 --- a/.github/workflows/narwhal_pull.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Update Dependencies -on: - ## Allow triggering this workflow manually via GitHub CLI/web - workflow_dispatch: - # Running this workflow automatically was relevant when Narwhal development was split - # at https://github.com/mystenlabs/narwhal, but it is now shared in this repo. - # This should be re-activated when NW development happens there again. - # schedule: - # Update on every hour at 10 past the hour - # - cron: '10 * * * *' - -jobs: - update-dep: - runs-on: ubuntu-latest - # Important settings as we don't want to open a PR when the update fails - continue-on-error: false - strategy: - fail-fast: true - steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 - - uses: bmwill/rust-cache@v1 # Fork of 'Swatinem/rust-cache' which allows caching additional paths - - name: Install cargo-hakari, and cache the binary - uses: baptiste0928/cargo-install@1cd874a5478fdca35d868ccc74640c5aabbb8f1b # pin@v3.0.0 - with: - crate: cargo-hakari - locked: true - - name: Update the Narwhal pointer - run: | - scripts/update_narwhal.sh - - name: Create Pull Request - uses: peter-evans/create-pull-request@v5 - with: - token: ${{ secrets.NW_AUTO_UPDATE }} - commit-message: chore(deps) Update the Narwhal pointer - title: chore(deps) Update the Narwhal pointer - body: | - - Update Narwhal - - Auto-generated by [create-pull-request][1] an the scripts/update_narwhal.sh script - - [1]: https://github.com/peter-evans/create-pull-request - branch: update-narwhal diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index c23c2ba166f58..eecf867bc315b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,6 +10,13 @@ on: - 'releases/sui-*-release' pull_request: types: [opened, synchronize, reopened, ready_for_review] + workflow_dispatch: + inputs: + sui_repo_ref: + description: "Branch / commit to test" + type: string + required: false + default: '' concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/simulator-nightly-mysticeti.yml b/.github/workflows/simulator-nightly-mysticeti.yml deleted file mode 100644 index d0e4ccdae58dc..0000000000000 --- a/.github/workflows/simulator-nightly-mysticeti.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Simulator Tests with Mysticeti - -concurrency: - group: ${{ github.workflow }} - -on: - schedule: - - cron: '0 15 * * *' # equivalent to 7am PST - workflow_dispatch: - inputs: - sui_ref: - description: "Branch / commit to test" - type: string - required: true - default: main - test_num: - description: "MSIM_TEST_NUM (test iterations)" - type: string - required: false - default: "30" - -env: - # Test Mysticeti consensus before it becomes the default. - CONSENSUS: "mysticeti" - - SUI_REF: "${{ github.event.inputs.sui_ref || 'main' }}" - TEST_NUM: "${{ github.event.inputs.test_num || '30' }}" - -jobs: - simtest: - # Allow running the job for up to 6 hours, maximum for GitHub Actions. - timeout-minutes: 360 - permissions: - # The "id-token: write" permission is required or Machine ID will not be - # able to authenticate with the cluster. - id-token: write - contents: read - runs-on: ubuntu-latest - - steps: - - name: Install Teleport - uses: teleport-actions/setup@176c25dfcd19cd31a252f275d579822b243e7b9c # pin@v1.0.6 - with: - version: 11.3.1 - - name: Authorize against Teleport - id: auth - uses: teleport-actions/auth@9091dad16a564f3c5b9c2ec520b234a4872b6879 # pin@v1 - with: - # Specify the publically accessible address of your Teleport proxy. - proxy: proxy.mysten-int.com:443 - # Specify the name of the join token for your bot. - token: sui-simtest-token - # Specify the length of time that the generated credentials should be - # valid for. This is optional and defaults to "1h" - certificate-ttl: 2h - - # Cargo clean and git restore on any left over files from git checkout, and deletes all remote tracking branches - - name: Environment clean - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && rm -rf ~/sui" - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/ && git clone git@github.com:MystenLabs/sui.git" - - # Deleting files in tmpfs that usually fill up pretty quickly after each run. Cargo clean to free up space as well. - - name: Tmpfs and cargo clean - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "sudo rm -rf /tmp/*" - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && cargo clean" - - # Checkout out the latest sui repo - - name: Checkout sui repo - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 10 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && git fetch origin && git checkout ${{ env.SUI_REF }}" - - # Setting up cargo and simtest - - name: Install simtest - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 10 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && ./scripts/simtest/install.sh" - - # Run simulator tests - - name: Run simtest - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 120 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && RUSTUP_MAX_RETRIES=10 CARGO_TERM_COLOR=always CARGO_INCREMENTAL=0 CARGO_NET_RETRY=10 RUST_BACKTRACE=short RUST_LOG=off NUM_CPUS=24 TEST_NUM=${{ env.TEST_NUM }} ./scripts/simtest/simtest-run.sh" - diff --git a/.github/workflows/simulator-nightly-narwhal.yml b/.github/workflows/simulator-nightly-narwhal.yml deleted file mode 100644 index 9ebfa04f55d8d..0000000000000 --- a/.github/workflows/simulator-nightly-narwhal.yml +++ /dev/null @@ -1,83 +0,0 @@ -name: Simulator Tests with Narwhal - -concurrency: - group: ${{ github.workflow }} - -on: - schedule: - - cron: '0 3 * * *' # equivalent to 7PM PST - workflow_dispatch: - inputs: - sui_ref: - description: "Branch / commit to test" - type: string - required: true - default: main - test_num: - description: "MSIM_TEST_NUM (test iterations)" - type: string - required: false - default: "30" - -env: - # Test Narwhal consensus as long as Narwhal runs in mainnet. - CONSENSUS: "narwhal" - - SUI_REF: "${{ github.event.inputs.sui_ref || 'main' }}" - TEST_NUM: "${{ github.event.inputs.test_num || '30' }}" - -jobs: - simtest: - # Allow running the job for up to 6 hours, maximum for GitHub Actions. - timeout-minutes: 360 - permissions: - # The "id-token: write" permission is required or Machine ID will not be - # able to authenticate with the cluster. - id-token: write - contents: read - runs-on: ubuntu-latest - - steps: - - name: Install Teleport - uses: teleport-actions/setup@176c25dfcd19cd31a252f275d579822b243e7b9c # pin@v1.0.6 - with: - version: 11.3.1 - - name: Authorize against Teleport - id: auth - uses: teleport-actions/auth@9091dad16a564f3c5b9c2ec520b234a4872b6879 # pin@v1 - with: - # Specify the publically accessible address of your Teleport proxy. - proxy: proxy.mysten-int.com:443 - # Specify the name of the join token for your bot. - token: sui-simtest-token - # Specify the length of time that the generated credentials should be - # valid for. This is optional and defaults to "1h" - certificate-ttl: 2h - - # Cargo clean and git restore on any left over files from git checkout, and deletes all remote tracking branches - - name: Environment clean - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && rm -rf ~/sui" - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/ && git clone git@github.com:MystenLabs/sui.git" - - # Deleting files in tmpfs that usually fill up pretty quickly after each run. Cargo clean to free up space as well. - - name: Tmpfs and cargo clean - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "sudo rm -rf /tmp/*" - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 5 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && cargo clean" - - # Checkout out the latest sui repo - - name: Checkout sui repo - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 10 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && git fetch origin && git checkout ${{ env.SUI_REF }}" - - # Setting up cargo and simtest - - name: Install simtest - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 10 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && ./scripts/simtest/install.sh" - - # Run simulator tests - - name: Run simtest - run: | - tsh -i ${{ steps.auth.outputs.identity-file }} --ttl 120 ssh ubuntu@simtest-01 "source ~/.bashrc && source ~/.cargo/env && cd ~/sui && RUSTUP_MAX_RETRIES=10 CARGO_TERM_COLOR=always CARGO_INCREMENTAL=0 CARGO_NET_RETRY=10 RUST_BACKTRACE=short RUST_LOG=off NUM_CPUS=24 TEST_NUM=${{ env.TEST_NUM }} ./scripts/simtest/simtest-run.sh" -