Skip to content

Commit a09e2a0

Browse files
committed
CI: solana install from agave repo, update actions/checkout@v4
1 parent 314fcb0 commit a09e2a0

File tree

3 files changed

+34
-37
lines changed

3 files changed

+34
-37
lines changed

.github/actions/setup-solana/scripts/solana-install-init.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
# except according to those terms.
1111

1212
# This is just a little script that can be downloaded from the internet to
13-
# install solana-install. It just does platform detection, downloads the installer
13+
# install agave-install. It just does platform detection, downloads the installer
1414
# and runs it.
1515

1616
{ # this ensures the entire script is downloaded #
1717

1818
if [ -z "$SOLANA_DOWNLOAD_ROOT" ]; then
19-
SOLANA_DOWNLOAD_ROOT="https://github.com/solana-labs/solana/releases/download/"
19+
SOLANA_DOWNLOAD_ROOT="https://github.com/anza-xyz/agave/releases/download/"
2020
fi
21-
GH_LATEST_RELEASE="https://api.github.com/repos/solana-labs/solana/releases/latest"
21+
GH_LATEST_RELEASE="https://api.github.com/repos/anza-xyz/agave/releases/latest"
2222

2323
set -e
2424

2525
usage() {
2626
cat 1>&2 <<EOF
27-
solana-install-init
27+
agave-install-init
2828
initializes a new installation
2929
3030
USAGE:
31-
solana-install-init [FLAGS] [OPTIONS] --data_dir <PATH> --pubkey <PUBKEY>
31+
agave-install-init [FLAGS] [OPTIONS] --data_dir <PATH> --pubkey <PUBKEY>
3232
3333
FLAGS:
3434
-h, --help Prints help information
@@ -81,7 +81,7 @@ main() {
8181
esac
8282
TARGET="${_cputype}-${_ostype}"
8383

84-
temp_dir="$(mktemp -d 2>/dev/null || ensure mktemp -d -t solana-install-init)"
84+
temp_dir="$(mktemp -d 2>/dev/null || ensure mktemp -d -t agave-install-init)"
8585
ensure mkdir -p "$temp_dir"
8686

8787
# Check for SOLANA_RELEASE environment variable override. Otherwise fetch
@@ -101,8 +101,8 @@ main() {
101101
fi
102102
fi
103103

104-
download_url="$SOLANA_DOWNLOAD_ROOT/$release/solana-install-init-$TARGET"
105-
solana_install_init="$temp_dir/solana-install-init"
104+
download_url="$SOLANA_DOWNLOAD_ROOT/$release/agave-install-init-$TARGET"
105+
solana_install_init="$temp_dir/agave-install-init"
106106

107107
printf 'downloading %s installer\n' "$release" 1>&2
108108

@@ -111,7 +111,7 @@ main() {
111111
ensure chmod u+x "$solana_install_init"
112112
if [ ! -x "$solana_install_init" ]; then
113113
printf '%s\n' "Cannot execute $solana_install_init (likely because of mounting /tmp as noexec)." 1>&2
114-
printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./solana-install-init." 1>&2
114+
printf '%s\n' "Please copy the file to a location where you can execute binaries and run ./agave-install-init." 1>&2
115115
exit 1
116116
fi
117117

@@ -130,7 +130,7 @@ main() {
130130
}
131131

132132
err() {
133-
printf 'solana-install-init: %s\n' "$1" >&2
133+
printf 'agave-install-init: %s\n' "$1" >&2
134134
exit 1
135135
}
136136

.github/workflows/main.yml

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ env:
1515
CARGO_TERM_COLOR: always
1616
RUST_TOOLCHAIN: 1.91.1
1717
SOLANA_VERSION: 2.3.0
18+
ANCHOR_VERSION: 0.32.1
19+
NODE_VERSION: "22.14.x"
1820

1921
jobs:
2022
fmt-clippy:
2123
name: fmt & clippy
2224
runs-on: ubicloud
2325
steps:
24-
- uses: actions/checkout@v2
26+
- uses: actions/checkout@v4
2527
- name: Install Rust nightly
2628
uses: actions-rs/toolchain@v1
2729
with:
@@ -39,7 +41,7 @@ jobs:
3941
name: Unit tests
4042
runs-on: ubicloud
4143
steps:
42-
- uses: actions/checkout@v2
44+
- uses: actions/checkout@v4
4345
- name: Install Rust toolchain
4446
uses: actions-rs/toolchain@v1
4547
with:
@@ -57,7 +59,7 @@ jobs:
5759
# name: Cargo audit
5860
# runs-on: ubicloud
5961
# steps:
60-
# - uses: actions/checkout@v2
62+
# - uses: actions/checkout@v4
6163
# - name: Cache cargo-audit version
6264
# uses: Swatinem/rust-cache@v1
6365
# - name: Download cargo-audit
@@ -70,11 +72,11 @@ jobs:
7072
yarn-prettier:
7173
runs-on: ubicloud
7274
steps:
73-
- uses: actions/checkout@v2
75+
- uses: actions/checkout@v4
7476
- name: Setup node
7577
uses: actions/setup-node@v2
7678
with:
77-
node-version: "22.14.x"
79+
node-version: ${{ env.NODE_VERSION }}
7880
registry-url: "https://registry.npmjs.org"
7981
- name: Install yarn
8082
run: yarn
@@ -85,11 +87,11 @@ jobs:
8587
yarn-lint:
8688
runs-on: ubicloud
8789
steps:
88-
- uses: actions/checkout@v2
90+
- uses: actions/checkout@v4
8991
- name: Setup node
9092
uses: actions/setup-node@v2
9193
with:
92-
node-version: "22.14.x"
94+
node-version: ${{ env.NODE_VERSION }}
9395
registry-url: "https://registry.npmjs.org"
9496
- name: Install yarn
9597
run: yarn
@@ -99,7 +101,7 @@ jobs:
99101
runs-on: ubicloud
100102
timeout-minutes: 60
101103
steps:
102-
- uses: actions/checkout@v2
104+
- uses: actions/checkout@v4
103105

104106
- name: Install Rust toolchain
105107
uses: actions-rs/toolchain@v1
@@ -119,18 +121,18 @@ jobs:
119121
uses: actions/cache@v4
120122
with:
121123
path: ~/.cargo/bin/anchor
122-
key: ${{ runner.os }}-anchor-cli-0.32.1
124+
key: ${{ runner.os }}-anchor-cli-${{ env.ANCHOR_VERSION }}
123125

124126
- name: Install Anchor CLI
125127
if: steps.cache-anchor.outputs.cache-hit != 'true'
126128
run: |
127129
sudo apt install libudev-dev
128-
cargo install --git https://github.com/coral-xyz/anchor --tag v0.32.1 anchor-cli --locked
130+
cargo install --git https://github.com/coral-xyz/anchor --tag v${{ env.ANCHOR_VERSION }} anchor-cli --locked
129131
130132
- name: Setup node
131133
uses: actions/setup-node@v2
132134
with:
133-
node-version: "22.14.x"
135+
node-version: ${{ env.NODE_VERSION }}
134136
registry-url: "https://registry.npmjs.org"
135137

136138
- name: Setup yarn
@@ -158,12 +160,12 @@ jobs:
158160
name: Verify SDK Configs
159161
runs-on: ubicloud
160162
steps:
161-
- uses: actions/checkout@v2
163+
- uses: actions/checkout@v4
162164

163165
- name: Setup Node.js
164166
uses: actions/setup-node@v2
165167
with:
166-
node-version: "22.14.x"
168+
node-version: ${{ env.NODE_VERSION }}
167169
registry-url: 'https://registry.npmjs.org'
168170

169171
- name: Install dependencies
@@ -197,7 +199,7 @@ jobs:
197199
sdk: ${{ steps.filter.outputs.sdk }}
198200
steps:
199201
# For pull requests it's not necessary to checkout the code
200-
- uses: actions/checkout@v2
202+
- uses: actions/checkout@v4
201203
- uses: dorny/paths-filter@v2
202204
id: filter
203205
with:
@@ -222,11 +224,11 @@ jobs:
222224
outputs:
223225
version: ${{ steps.git-commit.outputs.version }}
224226
steps:
225-
- uses: actions/checkout@v2
227+
- uses: actions/checkout@v4
226228
- name: Setup node
227229
uses: actions/setup-node@v2
228230
with:
229-
node-version: "22.14.x"
231+
node-version: ${{ env.NODE_VERSION }}
230232
registry-url: "https://registry.npmjs.org"
231233
- name: Build sdk
232234
run: yarn
@@ -290,7 +292,7 @@ jobs:
290292
]
291293
steps:
292294
- name: Checkout code with new updated version
293-
uses: actions/checkout@v2
295+
uses: actions/checkout@v4
294296
- name: Emit dispatch event
295297
run: |
296298
curl -X POST \
@@ -312,7 +314,7 @@ jobs:
312314
program: ${{ steps.filter.outputs.program }}
313315
steps:
314316
# For pull requests it's not necessary to checkout the code
315-
- uses: actions/checkout@v2
317+
- uses: actions/checkout@v4
316318
- uses: dorny/paths-filter@v2
317319
id: filter
318320
with:
@@ -329,16 +331,11 @@ jobs:
329331
if: ${{ needs.check-for-program-version-changes.outputs.program == 'true' }}
330332
steps:
331333
- name: Checkout
332-
uses: actions/checkout@v3
333-
334-
- name: Install Solana Verify
335-
run: |
336-
cargo install --version 0.2.13 solana-verify
337-
solana-verify --version
334+
uses: actions/checkout@v4
338335

339336
- name: Verifiable Build
340337
run: |
341-
solana-verify build --library-name drift --base-image ellipsislabs/solana:1.16.6
338+
anchor build --verifiable -s ${{ env.SOLANA_VERSION }} -d solanafoundation/anchor:v${{ env.ANCHOR_VERSION }}
342339
343340
- name: Upload Artifact
344341
uses: actions/upload-artifact@v4

programs/drift/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ idl-build = [
2020
"anchor-lang/idl-build",
2121
"anchor-spl/idl-build",
2222
"openbook-v2-light/idl-build",
23-
"switchboard-on-demand/idl-build",
24-
"pythnet-sdk/idl-build"
23+
"pythnet-sdk/idl-build",
24+
"switchboard-on-demand/idl-build"
2525
]
2626

2727
[dependencies]

0 commit comments

Comments
 (0)