Skip to content

Commit f3b5b04

Browse files
authored
Merge pull request #5 from mikemaccana/fix-actions
Fix CI failures: Rust lint, Anchor, and Quasar workflows
2 parents e0e2db2 + 46feca0 commit f3b5b04

27 files changed

Lines changed: 105 additions & 391 deletions

File tree

.github/.ghaignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ tokens/escrow/anchor
2929

3030
# not live
3131
tokens/token-2022/group/anchor
32+
tokens/token-2022/group/quasar
33+
34+
# CPI quasar project uses subdirectories (hand/ and lever/) instead of a root Quasar.toml
35+
basics/cross-program-invocation/quasar
36+
37+
# has Cargo.toml but no Quasar.toml
38+
tokens/spl-token-minter/quasar
39+
tokens/external-delegate-token-master/quasar
40+
tokens/nft-minter/quasar
41+
tokens/nft-operations/quasar
42+
tokens/token-swap/quasar
43+
44+
# build failed - outdated quasar-lang API (no AccountView.data, no log_64)
45+
oracles/pyth/quasar
3246

3347
# error in tests
3448
tokens/external-delegate-token-master/anchor
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
native:
3939
- added|modified: '**/native/**'
4040
workflow:
41-
- added|modified: '.github/workflows/solana-native.yml'
41+
- added|modified: '.github/workflows/native.yml'
4242
- name: Analyze Changes
4343
id: analyze
4444
run: |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
pinocchio:
3939
- added|modified: '**/pinocchio/**'
4040
workflow:
41-
- added|modified: '.github/workflows/solana-pinocchio.yml'
41+
- added|modified: '.github/workflows/pinocchio.yml'
4242
- name: Analyze Changes
4343
id: analyze
4444
run: |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
quasar:
4141
- added|modified: '**/quasar/**'
4242
workflow:
43-
- added|modified: '.github/workflows/solana-quasar.yml'
43+
- added|modified: '.github/workflows/quasar.yml'
4444
- name: Analyze Changes
4545
id: analyze
4646
run: |

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ node_modules/
1414
**/*/.anchor
1515
**/*/.DS_Store
1616
**/*/target
17-
**/*/tests/fixtures
17+
**/*/tests/fixtures/*
18+
!**/*/tests/fixtures/*.so
1819
**/*.rs.bk
1920
**/*/test-ledger
2021
**/*/yarn.lock

basics/create-account/anchor/programs/create-system-account/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ pub mod create_system_account {
2525
to: context.accounts.new_account.to_account_info(), // To pubkey
2626
},
2727
),
28-
lamports, // Lamports
29-
0, // Space
28+
lamports, // Lamports
29+
0, // Space
3030
&context.accounts.system_program.key(), // Owner Program
3131
)?;
3232

basics/cross-program-invocation/anchor/programs/hand/tests/test_hand.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,13 @@ fn test_pull_lever_cpi() {
5454
// include_bytes!() runs at compile time, and during `anchor build` the IDL generation
5555
// step compiles tests before the .so files exist. Since this is a cross-program
5656
// dependency (not our own program), lever.so may not be built yet at compile time.
57-
let lever_bytes = std::fs::read("target/deploy/lever.so").expect("lever.so not found — run `anchor build` first");
57+
let lever_bytes = std::fs::read(concat!(
58+
env!("CARGO_MANIFEST_DIR"),
59+
"/../../target/deploy/lever.so"
60+
))
61+
.expect("lever.so not found — run `anchor build` first");
5862
svm.add_program(hand_program_id, hand_bytes).unwrap();
59-
svm.add_program(lever_program_id, lever_bytes).unwrap();
63+
svm.add_program(lever_program_id, &lever_bytes).unwrap();
6064
let payer = create_wallet(&mut svm, 10_000_000_000).unwrap();
6165

6266
let power_keypair = Keypair::new();

basics/pda-rent-payer/anchor/programs/anchor-program-example/src/instructions/create_new_account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ pub fn handle_create_new_account(context: Context<CreateNewAccount>) -> Result<(
3434
},
3535
)
3636
.with_signer(signer_seeds),
37-
lamports, // Lamports
38-
0, // Space
37+
lamports, // Lamports
38+
0, // Space
3939
&context.accounts.system_program.key(), // Owner Program
4040
)?;
4141
Ok(())

basics/program-derived-addresses/anchor/programs/anchor-program-example/src/instructions/increment.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub struct IncrementPageVisits<'info> {
1515
page_visits: Account<'info, PageVisits>,
1616
}
1717

18-
pub fn handle_increment_page_visits(mut context: Context<IncrementPageVisits>) -> Result<()> {
18+
pub fn handle_increment_page_visits(context: Context<IncrementPageVisits>) -> Result<()> {
1919
let page_visits = &mut context.accounts.page_visits;
2020
page_visits.increment();
2121
Ok(())

tokens/create-token/anchor/prepare.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { $ } from "zx";
77
const programs = [
88
{
99
id: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
10-
name: "token_metadata.so",
10+
name: "mpl_token_metadata.so",
1111
},
1212
];
1313

0 commit comments

Comments
 (0)