Add cargo-build-bpf integration tests

This commit is contained in:
Dmitri Makarov
2021-06-21 11:53:34 -07:00
committed by Dmitri Makarov
parent f228d113c1
commit cf25729eaa
5 changed files with 141 additions and 30 deletions

View File

@ -0,0 +1,18 @@
[package]
name = "noop"
version = "1.8.0"
description = "Solana BPF test program written in Rust"
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
publish = false
[dependencies]
solana-program = { path = "../../../../program", version = "=1.8.0" }
[lib]
crate-type = ["cdylib"]
[workspace]

View File

@ -0,0 +1,15 @@
//! @brief Example Rust-based BPF noop program
extern crate solana_program;
use solana_program::{
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
};
entrypoint!(process_instruction);
fn process_instruction(
_program_id: &Pubkey,
_accounts: &[AccountInfo],
_instruction_data: &[u8],
) -> ProgramResult {
Ok(())
}