Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
20 changes: 10 additions & 10 deletions .github/actions/setup-solana/scripts/solana-install-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
# except according to those terms.

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

{ # this ensures the entire script is downloaded #

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

set -e

usage() {
cat 1>&2 <<EOF
solana-install-init
agave-install-init
initializes a new installation

USAGE:
solana-install-init [FLAGS] [OPTIONS] --data_dir <PATH> --pubkey <PUBKEY>
agave-install-init [FLAGS] [OPTIONS] --data_dir <PATH> --pubkey <PUBKEY>

FLAGS:
-h, --help Prints help information
Expand Down Expand Up @@ -81,7 +81,7 @@ main() {
esac
TARGET="${_cputype}-${_ostype}"

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

# Check for SOLANA_RELEASE environment variable override. Otherwise fetch
Expand All @@ -101,8 +101,8 @@ main() {
fi
fi

download_url="$SOLANA_DOWNLOAD_ROOT/$release/solana-install-init-$TARGET"
solana_install_init="$temp_dir/solana-install-init"
download_url="$SOLANA_DOWNLOAD_ROOT/$release/agave-install-init-$TARGET"
solana_install_init="$temp_dir/agave-install-init"

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

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

Expand All @@ -130,7 +130,7 @@ main() {
}

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

Expand Down
53 changes: 26 additions & 27 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ defaults:

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: 1.70.0
SOLANA_VERSION: "1.16.27"
RUST_TOOLCHAIN: 1.91.1
SOLANA_VERSION: 2.3.0
ANCHOR_VERSION: 0.32.1
NODE_VERSION: "22.14.x"

jobs:
fmt-clippy:
name: fmt & clippy
runs-on: ubicloud
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust nightly
uses: actions-rs/toolchain@v1
with:
Expand All @@ -39,7 +41,7 @@ jobs:
name: Unit tests
runs-on: ubicloud
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -57,7 +59,7 @@ jobs:
# name: Cargo audit
# runs-on: ubicloud
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v4
# - name: Cache cargo-audit version
# uses: Swatinem/rust-cache@v1
# - name: Download cargo-audit
Expand All @@ -70,11 +72,11 @@ jobs:
yarn-prettier:
runs-on: ubicloud
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "22.14.x"
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Install yarn
run: yarn
Expand All @@ -85,11 +87,11 @@ jobs:
yarn-lint:
runs-on: ubicloud
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "22.14.x"
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Install yarn
run: yarn
Expand All @@ -99,7 +101,7 @@ jobs:
runs-on: ubicloud
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
Expand All @@ -119,16 +121,18 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.cargo/bin/anchor
key: ${{ runner.os }}-anchor-cli-0.29.0
key: ${{ runner.os }}-anchor-cli-${{ env.ANCHOR_VERSION }}

- name: Install Anchor CLI
if: steps.cache-anchor.outputs.cache-hit != 'true'
run: cargo install --git https://github.com/coral-xyz/anchor --tag v0.29.0 anchor-cli --locked
run: |
sudo apt install libudev-dev
cargo install --git https://github.com/coral-xyz/anchor --tag v${{ env.ANCHOR_VERSION }} anchor-cli --locked

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "22.14.x"
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"

- name: Setup yarn
Expand Down Expand Up @@ -156,12 +160,12 @@ jobs:
name: Verify SDK Configs
runs-on: ubicloud
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: "22.14.x"
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
Expand Down Expand Up @@ -195,7 +199,7 @@ jobs:
sdk: ${{ steps.filter.outputs.sdk }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
Expand All @@ -220,11 +224,11 @@ jobs:
outputs:
version: ${{ steps.git-commit.outputs.version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "22.14.x"
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
- name: Build sdk
run: yarn
Expand Down Expand Up @@ -288,7 +292,7 @@ jobs:
]
steps:
- name: Checkout code with new updated version
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Emit dispatch event
run: |
curl -X POST \
Expand All @@ -310,7 +314,7 @@ jobs:
program: ${{ steps.filter.outputs.program }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
Expand All @@ -327,16 +331,11 @@ jobs:
if: ${{ needs.check-for-program-version-changes.outputs.program == 'true' }}
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Solana Verify
run: |
cargo install --version 0.2.13 solana-verify
solana-verify --version
uses: actions/checkout@v4

- name: Verifiable Build
run: |
solana-verify build --library-name drift --base-image ellipsislabs/solana:1.16.6
anchor build --verifiable -s ${{ env.SOLANA_VERSION }} -d solanafoundation/anchor:v${{ env.ANCHOR_VERSION }}

- name: Upload Artifact
uses: actions/upload-artifact@v4
Expand Down
6 changes: 5 additions & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
cluster = "localnet"
wallet = "~/.config/solana/id.json"

[toolchain]
solana_version = "2.3.0"
anchor_version = "0.32.1"

[workspace]
exclude = ["programs/openbook_v2"]

Expand All @@ -25,4 +29,4 @@ filename = "./deps/configs/usdc.json"

[[test.validator.account]]
address = "3rdJbqfnagQ4yx9HXJViD4zc4xpiSqmFsKpPuSCQVyQL"
filename = "./deps/configs/pyth_lazer_storage.json"
filename = "./deps/configs/pyth_lazer_storage.json"
Loading
Loading