Skip to content
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,9 @@ jobs:
- name: Setup Environment
uses: ./.github/actions/setup
with:
stable-toolchain: true
nightly-toolchain: true
cargo-cache-key: cargo-sbf-build
cargo-cache-fallback-key: cargo-sbf

- name: Determine Solana CLI version
run: |
Expand All @@ -391,6 +393,11 @@ jobs:
version: ${{ env.SOLANA_VERSION }}
cache: true

- name: Install cargo-hack
uses: taiki-e/cache-cargo-install-action@v2
with:
tool: cargo-hack

- name: Run cargo-build-sbf
run: ./scripts/build-sbf.sh

Expand Down
46 changes: 22 additions & 24 deletions scripts/build-sbf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,27 @@ here="$(dirname "$0")"
src_root="$(readlink -f "${here}/..")"
cd "${src_root}"

exclude_list=(
".github"
"scripts"
"client-traits"
"ed25519-program"
"example-mocks"
"file-download"
"genesis-config"
"keypair"
"logger"
"offchain-message"
"presigner"
"quic-definitions"
"rent-collector"
"sdk-wasm-js"
"secp256k1-program"
"secp256r1-program"
"system-transaction"
"transaction"
build_sbf_excludes=(
--exclude solana-client-traits
--exclude solana-ed25519-program
--exclude solana-example-mocks
--exclude solana-file-download
--exclude solana-genesis-config
--exclude solana-keypair
--exclude solana-logger
--exclude solana-offchain-message
--exclude solana-presigner
--exclude solana-quic-definitions
--exclude solana-rent-collector
--exclude solana-sdk-wasm-js
--exclude solana-secp256k1-program
--exclude solana-secp256r1-program
--exclude solana-system-transaction
--exclude solana-transaction
--exclude solana-sdk
)

for dir in $(git ls-tree -d --name-only HEAD .); do
if [[ ! " ${exclude_list[*]} " =~ [[:space:]]${dir}[[:space:]] ]]; then
(cd "$dir" && RUSTFLAGS="-Dwarnings" cargo build-sbf)
fi
done
./cargo nightly hack --workspace "${build_sbf_excludes[@]}" build-sbf

# This can be added back in once the SDK upgrades to v2.3 of Agave tools
#./cargo nightly build-sbf --manifest-path sdk/Cargo.toml --no-default-features
5 changes: 0 additions & 5 deletions sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ rustdoc-args = ["--cfg=docsrs"]
crate-type = ["rlib"]

[features]
# "program" feature is a legacy feature retained to support v1.3 and older
# programs. New development should not use this feature. Instead use the
# solana-program crate
program = []

default = [
"borsh",
"full", # functionality that is not compatible or needed for on-chain programs
Expand Down
2 changes: 0 additions & 2 deletions sdk/src/log.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
#![cfg(feature = "program")]

pub use solana_program::log::*;
Loading