Skip to content

Commit

Permalink
Merge branch 'main' into 01-27-fix_simulate_serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
runtian-zhou authored Feb 3, 2025
2 parents 86af509 + b60cde7 commit 5f62614
Show file tree
Hide file tree
Showing 278 changed files with 36,889 additions and 6,442 deletions.
16 changes: 14 additions & 2 deletions .github/actions/rust-setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ inputs:
description: "An optional additional key to pass to rust-cache"
required: false
default: ""
macos:
description: "If the machine is using macOS"
required: false
default: false

runs:
using: composite
steps:
- run: sudo apt-get update && sudo apt-get install build-essential ca-certificates clang curl git libpq-dev libssl-dev pkg-config lsof lld --no-install-recommends --assume-yes
- if: ${{inputs.macos != 'true'}}
name: Linux - Setup dependencies
run: sudo apt-get update && sudo apt-get install build-essential ca-certificates clang curl git libpq-dev libssl-dev pkg-config lsof lld --no-install-recommends --assume-yes
shell: bash

- uses: dsherret/rust-toolchain-file@v1
Expand All @@ -24,10 +30,16 @@ runs:
with:
key: ${{ inputs.ADDITIONAL_KEY }}

- name: install protoc and related tools
- if: ${{inputs.macos != 'true'}}
name: Linux - install protoc and related tools
shell: bash
run: scripts/dev_setup.sh -b -r -y -P -J -t

- if: ${{inputs.macos == 'true'}}
name: Mac - install protoc and related tools
shell: bash
run: scripts/dev_setup.sh -b -t -k

- run: echo "/home/runner/.cargo/bin" | tee -a $GITHUB_PATH
shell: bash

Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/cli-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ on:
description: "Dry run - If checked, the release will not be created"

jobs:
# TODO: Deprecated, only supports OpenSSL v1, which is deprecated.
build-ubuntu20-binary:
name: "Build Ubuntu 20.04 binary"
runs-on: ubuntu-20.04
Expand All @@ -37,6 +38,7 @@ jobs:
name: cli-builds-ubuntu-20.04
path: aptos-cli-*.zip

# TODO: Deprecated, please use "Linux" instead as it's more straightforwardly named
build-ubuntu22-binary:
name: "Build Ubuntu 22.04 binary"
runs-on: ubuntu-22.04
Expand All @@ -53,13 +55,85 @@ jobs:
name: cli-builds-ubuntu-22.04
path: aptos-cli-*.zip

build-linux-binary:
name: "Build Linux binary"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
- name: Build CLI
run: scripts/cli/build_cli_release.sh "Linux" "${{inputs.release_version}}"
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: cli-builds-linux
path: aptos-cli-*.zip

build-linux-arm-binary:
name: "Build Linux ARM binary"
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
- name: Build CLI
run: scripts/cli/build_cli_release.sh "Linux" "${{inputs.release_version}}"
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: cli-builds-linux-arm
path: aptos-cli-*.zip

build-macos-x86_64-binary:
name: "Build MacOS x86_64 binary"
runs-on: macos-13
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
with:
macos: true
- name: Build CLI
run: scripts/cli/build_cli_release.sh "macOS" "${{inputs.release_version}}"
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: cli-builds-macos-x86-64
path: aptos-cli-*.zip

build-macos-arm-binary:
name: "Build MacOS ARM binary"
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
- uses: aptos-labs/aptos-core/.github/actions/rust-setup@main
with:
macos: true
- name: Build CLI
run: scripts/cli/build_cli_release.sh "macOS" "${{inputs.release_version}}"
- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: cli-builds-macos-arm
path: aptos-cli-*.zip

build-windows-binary:
name: "Build Windows binary"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.source_git_ref_override }}
# Ensure that long paths work
- name: Ensure long paths work
run: git config --system core.longpaths true
shell: bash
- name: Build CLI
run: scripts\cli\build_cli_release.ps1
- name: Upload Binary
Expand All @@ -74,6 +148,10 @@ jobs:
- build-ubuntu20-binary
- build-ubuntu22-binary
- build-windows-binary
- build-linux-binary
- build-linux-arm-binary
- build-macos-arm-binary
- build-macos-x86_64-binary
runs-on: ubuntu-latest
permissions:
contents: "write"
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/windows-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ name: "Windows CLI Build"
on:
workflow_dispatch:
pull_request:
types: [labeled, opened, synchronize, reopened, auto_merge_enabled]
schedule:
types: [ labeled, opened, synchronize, reopened, auto_merge_enabled ]
schedule:
# Run twice a day at 12PM PT and 8PM PT Monday through Friday
- cron: "0 19,3 * * 1-5"
# Run once a day at 12PM PT on Saturday and Sunday
Expand All @@ -32,6 +32,11 @@ jobs:
- name: Set up WinGet
run: Set-Variable ProgressPreference SilentlyContinue ; PowerShell -ExecutionPolicy Bypass -File scripts/windows_dev_setup.ps1

# Ensure that long paths work
- name: Ensure long paths work
run: git config --system core.longpaths true
shell: bash

# This action will cache ~/.cargo and ./target (or the equivalent on Windows in
# this case). See more here:
# https://github.com/Swatinem/rust-cache#cache-details
Expand Down
Loading

0 comments on commit 5f62614

Please sign in to comment.