Skip to content

Commit f79344c

Browse files
committed
updated aptos installer and fmt with latest version
1 parent d6cbc7d commit f79344c

File tree

18 files changed

+210
-124
lines changed

18 files changed

+210
-124
lines changed

.github/actions/install-aptos-cli/action.yml

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,52 @@ runs:
1212
steps:
1313
- name: Install Aptos CLI
1414
shell: bash
15+
env:
16+
VERSION: ${{ inputs.version }}
1517
run: |-
16-
VERSION=${{ inputs.version }}
17-
ARCH=$(uname -m)
18-
OS=$(uname -s)
18+
set -Eeuo pipefail
1919
20-
# Determine correct file name based on architecture and OS
20+
ARCH="$(uname -m)"
21+
OS="$(uname -s)"
22+
23+
# Resolve archive name
2124
if [[ "$OS" == "Linux" ]]; then
2225
if [[ "$ARCH" == "x86_64" ]]; then
2326
FILENAME="aptos-cli-${VERSION}-Linux-x86_64.zip"
2427
elif [[ "$ARCH" == "aarch64" ]]; then
2528
FILENAME="aptos-cli-${VERSION}-Linux-aarch64.zip"
2629
else
27-
echo "Unsupported Linux architecture: $ARCH"
28-
exit 1
30+
echo "Unsupported Linux architecture: $ARCH" >&2; exit 1
2931
fi
3032
elif [[ "$OS" == "Darwin" ]]; then
3133
FILENAME="aptos-cli-${VERSION}-MacOS-x86_64.zip"
3234
elif [[ "$OS" == "Windows_NT" ]]; then
3335
FILENAME="aptos-cli-${VERSION}-Windows-x86_64.zip"
3436
else
35-
echo "Unsupported operating system: $OS"
36-
exit 1
37+
echo "Unsupported operating system: $OS" >&2; exit 1
3738
fi
3839
39-
# Download & Install
4040
URL="https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v${VERSION}/${FILENAME}"
4141
echo "Downloading Aptos CLI from $URL"
42-
curl -sL "$URL" -o aptos-cli.zip
43-
unzip aptos-cli.zip
44-
chmod +x aptos
45-
mkdir -p $HOME/.local/bin
46-
export PATH="$HOME/.local/bin:$PATH"
47-
sudo mv aptos $HOME/.local/bin
42+
43+
# Ensure unzip exists (some runners may not have it)
44+
if ! command -v unzip >/dev/null 2>&1; then
45+
echo "unzip not found; attempting to install with apt-get (best effort)"
46+
sudo apt-get update -y >/dev/null 2>&1 || true
47+
sudo apt-get install -y unzip >/dev/null 2>&1 || true
48+
fi
49+
50+
curl -fsSL "$URL" -o aptos-cli.zip
51+
unzip -o aptos-cli.zip
52+
53+
# Install to ~/.local/bin and persist PATH
54+
mkdir -p "$HOME/.local/bin"
55+
mv ./aptos "$HOME/.local/bin/aptos"
56+
chmod +x "$HOME/.local/bin/aptos"
57+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
58+
59+
# Make sure movefmt dir is in PATH for later steps
60+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
61+
4862
aptos --version
4963
aptos update movefmt
50-
echo 'Adding movefmt to PATH'
51-
echo "$HOME/.aptos/bin" >> $GITHUB_PATH

.github/workflows/doc.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,21 @@ jobs:
3535
timeout-minutes: 60
3636
steps:
3737
- uses: actions/checkout@v4
38-
- name: Install Aptos CLI
39-
uses: ./.github/actions/install-aptos-cli
40-
with:
41-
version: "7.7.0"
38+
- name: Install Aptos CLI (script)
39+
shell: bash
40+
run: |
41+
set -Eeuo pipefail
42+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
43+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
44+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
45+
46+
- name: Verify Aptos
47+
shell: bash
48+
run: |
49+
set -Eeuo pipefail
50+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
51+
aptos --version
52+
aptos update movefmt
4253
- name: Run Aptos Create Local Testnet
4354
run: |
4455
make local-testnet &

.github/workflows/examples.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,21 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626

27-
- name: Install Aptos CLI
28-
uses: ./.github/actions/install-aptos-cli
29-
with:
30-
version: "7.7.0"
27+
- name: Install Aptos CLI (script)
28+
shell: bash
29+
run: |
30+
set -Eeuo pipefail
31+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
32+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
33+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
34+
35+
- name: Verify Aptos
36+
shell: bash
37+
run: |
38+
set -Eeuo pipefail
39+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
40+
aptos --version
41+
aptos update movefmt
3142
3243
- name: Run Aptos Compile All Examples
3344
working-directory: examples

.github/workflows/lint.yml

Lines changed: 39 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,21 @@ jobs:
3838
run: |
3939
sudo apt-get update -y
4040
41-
- name: Install Aptos CLI
42-
uses: ./.github/actions/install-aptos-cli
43-
with:
44-
version: "7.7.0"
41+
- name: Install Aptos CLI (script)
42+
shell: bash
43+
run: |
44+
set -Eeuo pipefail
45+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
46+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
47+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
48+
49+
- name: Verify Aptos
50+
shell: bash
51+
run: |
52+
set -Eeuo pipefail
53+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
54+
aptos --version
55+
aptos update movefmt
4556
4657
- name: Install Node.js
4758
uses: actions/setup-node@v4
@@ -78,13 +89,21 @@ jobs:
7889
run: |
7990
sudo apt-get update -y
8091
81-
- name: Install Aptos CLI
92+
- name: Install Aptos CLI (script)
93+
shell: bash
94+
run: |
95+
set -Eeuo pipefail
96+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
97+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
98+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
99+
100+
- name: Verify Aptos
101+
shell: bash
82102
run: |
83-
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
103+
set -Eeuo pipefail
104+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
84105
aptos --version
85106
aptos update movefmt
86-
echo 'Adding movefmt to PATH'
87-
echo "$HOME/.aptos/bin" >> $GITHUB_PATH
88107
89108
- name: Install Node.js
90109
uses: actions/setup-node@v4
@@ -124,13 +143,21 @@ jobs:
124143
run: |
125144
sudo apt-get update -y
126145
127-
- name: Install Aptos CLI
146+
- name: Install Aptos CLI (script)
147+
shell: bash
148+
run: |
149+
set -Eeuo pipefail
150+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
151+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
152+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
153+
154+
- name: Verify Aptos
155+
shell: bash
128156
run: |
129-
curl -fsSL "https://aptos.dev/scripts/install_cli.py" | python3
157+
set -Eeuo pipefail
158+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
130159
aptos --version
131160
aptos update movefmt
132-
echo 'Adding movefmt to PATH'
133-
echo "$HOME/.aptos/bin" >> $GITHUB_PATH
134161
135162
- name: Install Node.js
136163
uses: actions/setup-node@v4

.github/workflows/testnet-deployment.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,21 @@ jobs:
6363
run: |
6464
sudo apt-get update -y
6565
66-
- name: Install Aptos CLI
67-
uses: ./.github/actions/install-aptos-cli
68-
with:
69-
version: "7.7.0"
66+
- name: Install Aptos CLI (script)
67+
shell: bash
68+
run: |
69+
set -Eeuo pipefail
70+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
71+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
72+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
73+
74+
- name: Verify Aptos
75+
shell: bash
76+
run: |
77+
set -Eeuo pipefail
78+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
79+
aptos --version
80+
aptos update movefmt
7081
7182
- name: Set Aptos Workspace Config
7283
run: make set-workspace-config

.github/workflows/typescript-integration-tests.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,21 @@ jobs:
5151
run: |
5252
sudo apt-get update -y
5353
54-
- name: Install Aptos CLI
55-
uses: ./.github/actions/install-aptos-cli
56-
with:
57-
version: "7.7.0"
54+
- name: Install Aptos CLI (script)
55+
shell: bash
56+
run: |
57+
set -Eeuo pipefail
58+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
59+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
60+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
61+
62+
- name: Verify Aptos
63+
shell: bash
64+
run: |
65+
set -Eeuo pipefail
66+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
67+
aptos --version
68+
aptos update movefmt
5869
5970
- name: Install Node.js
6071
uses: actions/setup-node@v4

.github/workflows/unit_tests.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,21 @@ jobs:
3838
steps:
3939
- uses: actions/checkout@v4
4040

41-
- name: Install Aptos CLI
42-
uses: ./.github/actions/install-aptos-cli
43-
with:
44-
version: "7.7.0"
41+
- name: Install Aptos CLI (script)
42+
shell: bash
43+
run: |
44+
set -Eeuo pipefail
45+
curl -fsSL "https://aptos.dev/scripts/install_cli.sh" | sh
46+
echo "$HOME/.aptos/bin" >> "$GITHUB_PATH"
47+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
48+
49+
- name: Verify Aptos
50+
shell: bash
51+
run: |
52+
set -Eeuo pipefail
53+
export PATH="$HOME/.aptos/bin:$HOME/.local/bin:$PATH"
54+
aptos --version
55+
aptos update movefmt
4556
4657
- name: Run Aptos Create Local Testnet
4758
run: |

aave-core/aave-acl/sources/acl_manage.move

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,8 @@ module aave_acl::acl_manage {
667667
#[test_only]
668668
/// @dev Returns the admin controlled ecosystem reserve funds admin role string for testing
669669
/// @return Admin controlled ecosystem reserve funds admin role as a String
670-
public fun get_admin_controlled_ecosystem_reserve_funds_admin_role_for_testing(): String {
670+
public fun get_admin_controlled_ecosystem_reserve_funds_admin_role_for_testing()
671+
: String {
671672
string::utf8(ADMIN_CONTROLLED_ECOSYSTEM_RESERVE_FUNDS_ADMIN_ROLE)
672673
}
673674

aave-core/aave-config/sources/reserve_config.move

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,8 +272,8 @@ module aave_config::reserve_config {
272272
/// @return The state param representing reserve decimals
273273
/// @return The state param representing reserve factor
274274
/// @return The state param representing eMode category
275-
public fun get_params(self: &ReserveConfigurationMap):
276-
(u256, u256, u256, u256, u256, u256) {
275+
public fun get_params(self: &ReserveConfigurationMap)
276+
: (u256, u256, u256, u256, u256, u256) {
277277
(
278278
get_ltv(self),
279279
get_liquidation_threshold(self),

0 commit comments

Comments
 (0)