Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev #93

Merged
merged 17 commits into from
Dec 11, 2023
Merged

Dev #93

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/actions/setup-linux-aarch64/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Setup Linux x86_64'
description: 'Sets up the environment for Linux x86_64 builds with Rust'

runs:
using: 'composite'
steps:

- name: Install build essentials
run: |
sudo apt-get update
sudo apt-get install -y build-essential lld libpq-dev unzip
shell: bash

- name: Install Protoc
uses: arduino/[email protected]
with:
version: "3.20.1"

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70
30 changes: 30 additions & 0 deletions .github/actions/setup-macos-aarch64/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Setup macOS x86_64'
description: 'Sets up the environment for macOS builds with Rust'

runs:
using: 'composite'
steps:

- name: Install build essentials
run: |
brew update
brew install llvm postgresql unzip
shell: bash

- name: Install OpenSSL
run: brew install openssl
shell: bash

- name: Install Protoc
uses: arduino/[email protected]
with:
version: "3.20.1"

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70

- name: Export LLVM path
run: echo "LLVM_SYS_130_PREFIX=$(brew --prefix llvm)" >> $GITHUB_ENV
30 changes: 30 additions & 0 deletions .github/actions/setup-macos-x86_64/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: 'Setup macOS x86_64'
description: 'Sets up the environment for macOS builds with Rust'

runs:
using: 'composite'
steps:

- name: Install build essentials
run: |
brew update
brew install llvm postgresql unzip
shell: bash

- name: Install OpenSSL
run: brew install openssl
shell: bash

- name: Install Protoc
uses: arduino/[email protected]
with:
version: "3.20.1"

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70

- name: Export LLVM path
run: echo "LLVM_SYS_130_PREFIX=$(brew --prefix llvm)" >> $GITHUB_ENV
26 changes: 26 additions & 0 deletions .github/actions/setup-windows-x86_64/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: 'Setup Windows x86_64'
description: 'Sets up the environment for Windows builds with Rust'

runs:
using: 'composite'
steps:

- name: Install build essentials
run: |
choco install llvm postgresql unzip
shell: pwsh

- name: Install OpenSSL
run: choco install openssl
shell: pwsh

- name: Install Protoc
uses: arduino/[email protected]
with:
version: "3.20.1"

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70
2 changes: 2 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ jobs:

# for testing purposes
- name: Trigger test
if: false
uses: ./.github/actions/trigger-workflow
with:
workflowFileName: test.yml
token: ${{ secrets.CI_PAT }}

# for testing purposes
- name: Trigger release
if: false
uses: ./.github/actions/trigger-workflow
with:
workflowFileName: release.yml
Expand Down
105 changes: 32 additions & 73 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ jobs:
outputs:
release_tag: ${{ steps.create_tag.outputs.tag }}
release_url: ${{ steps.create_release.outputs.upload_url }}
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
Expand Down Expand Up @@ -42,18 +41,31 @@ jobs:
cp $RUNNER_TEMP/assets/m1-with-submodules.tar.gz $GITHUB_WORKSPACE/m1-with-submodules.tar.gz
ls -al $GITHUB_WORKSPACE


- name: Set Release Info
id: set_release_info
run: |
if [ "${{ env.BRANCH_NAME }}" = "main" ]; then
echo "::set-output name=release_name::Release-${{ steps.create_tag.outputs.tag }}"
echo "::set-output name=body::Release-${{ steps.create_tag.outputs.tag }}"
else
echo "::set-output name=release_name::Release-${{ env.BRANCH_NAME }}-${{ steps.create_tag.outputs.tag }}"
echo "::set-output name=body::Release-${{ env.BRANCH_NAME }}-${{ steps.create_tag.outputs.tag }}"
fi
env:
BRANCH_NAME: ${{ github.ref_name }}

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_tag.outputs.tag }}
release_name: ${{ env.BRANCH_NAME == 'main' && 'Release ' || 'Release ' + env.BRANCH_NAME + '-' }}${{ steps.create_tag.outputs.tag }}
body: ${{ env.BRANCH_NAME == 'main' && 'Release ' || 'Release ' + env.BRANCH_NAME + '-' }}${{ steps.create_tag.outputs.tag }}
release_name: ${{ steps.set_release_info.outputs.release_name }}
body: ${{ steps.set_release_info.outputs.body }}
draft: false
prerelease: true


- name: Check
run: |
Expand Down Expand Up @@ -133,27 +145,18 @@ jobs:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential

- name: Set up Rust for Mac
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
target: x86_64-apple-darwin
- name: Setup
uses: ./.github/actions/setup-macos-x86_64

- name: Build Mac binaries
run: |
cd "$GITHUB_WORKSPACE/m1"
cargo build --release --target x86_64-apple-darwin
cargo build --release

- name: Build Mac binaries
run: |
cd "$GITHUB_WORKSPACE/movement-sdk"
cargo build --release --target x86_64-apple-darwin
cargo build --release

- name: Upload subnet
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -188,16 +191,8 @@ jobs:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}

- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential

- name: Set up Rust for Mac
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
- name: Setup
uses: ./.github/actions/setup-linux-aarch64

- name: Build Mac binaries
run: |
Expand Down Expand Up @@ -230,54 +225,25 @@ jobs:
asset_content_type: application/octet-stream

pre-release-aarch64-mac:
if: true # testing
# this is expensive, so only run on stage and main
if: github.ref == 'refs/heads/stage' || github.ref == 'refs/heads/main'
needs: prepare-release
runs-on:
labels: macos-latest
runs-on: macos-latest-xlarge
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}

- name: Set up Rust for Mac ARM64
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
target: aarch64-apple-darwin
- name: Setup
uses: ./.github/actions/setup-macos-aarch64

- name: Build Mac ARM64 binaries
run: |
cd "$GITHUB_WORKSPACE/m1"
cargo build --release --target aarch64-apple-darwin

- name: Build Mac binaries
run: |
cd "$GITHUB_WORKSPACE/movement-sdk"
cargo build --release --target aarch64-apple-darwin

- name: Upload subnet
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare-release.outputs.release_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this reference for more info: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsid
asset_path: ./m1/target/release/subnet
asset_name: subnet-aarch64-mac
asset_content_type: application/octet-stream

- name: Upload movement
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.prepare-release.outputs.release_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this reference for more info: https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsid
asset_path: ./movement-sdk/target/release/movement
asset_name: movement-aarch64-mac
asset_content_type: application/octet-stream



pre-release-x86_64-windows:
if: true # testing
Expand All @@ -290,17 +256,10 @@ jobs:
with:
submodules: 'recursive'
token: ${{ secrets.CI_PAT }}

- name: Add mingw
run: apt-get install -y mingw-w64

- name: Set up Rust for Windows
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.70.0
target: x86_64-pc-windows-gnu


- name: Setup Windows
uses: ./.github/actions/setup-windows-x86_64

- name: Build Windows binaries
run: |
cd "$GITHUB_WORKSPACE/m1"
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
path = vendors/aptos-core-1.7
url = https://github.com/movemntdev/aptos-core
branch = testnet
[submodule "m1/third-party/sui"]
[submodule "m1/vendors/sui"]
path = vendors/sui
url = https://github.com/movemntdev/sui
36 changes: 0 additions & 36 deletions canonical/.cargo/config.toml

This file was deleted.

1 change: 0 additions & 1 deletion canonical/.gitignore

This file was deleted.

Loading
Loading