Skip to content

Commit

Permalink
Merge branch 'cfg-V2' into cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
Aursen committed Sep 15, 2024
2 parents c83784d + b43c6b9 commit f40f65b
Show file tree
Hide file tree
Showing 589 changed files with 34,466 additions and 11,064 deletions.
2 changes: 2 additions & 0 deletions .github/actions/setup-ts/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ runs:
key: solana-${{ runner.os }}-v0000-${{ env.NODE_VERSION }}-${{ hashFiles('./ts/**/*.ts') }}
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build && yarn link && cd ../../../
shell: bash
- run: cd ts/packages/anchor-errors && yarn --frozen-lockfile && yarn build && yarn link && cd ../../../
shell: bash
- run: cd ts/packages/anchor && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
shell: bash
- run: cd ts/packages/spl-associated-token-account && yarn --frozen-lockfile && yarn build:node && yarn link && cd ../../../
Expand Down
12 changes: 6 additions & 6 deletions .github/actions/setup/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ description: "Setup"
runs:
using: "composite"
steps:
- run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev
shell: bash
- run: echo "ANCHOR_VERSION=$(cat ./VERSION)" >> $GITHUB_ENV
shell: bash
- run: git submodule update --init --recursive --depth 1
shell: bash
- run: sudo apt-get update && sudo apt-get install -y pkg-config build-essential libudev-dev
shell: bash
- run: echo "ANCHOR_VERSION=$(cat ./VERSION)" >> $GITHUB_ENV
shell: bash
- run: git submodule update --init --recursive --depth 1
shell: bash
5 changes: 4 additions & 1 deletion .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
⚠️ Don't use issues for support questions ("How does x feature work in Anchor? How to do x in Anchor?"). Use the discord instead https://discord.gg/NHHGSXAnXk (but don't ping maintainers). ⚠️
⚠️ Don't use issues for support questions ("How does x feature work in Anchor? How to do x in Anchor?"). Instead:

- Check [Solana Stack Exchange](https://solana.stackexchange.com/) - chances are someone has already had the same issue, and there's already an answer there. If not, write a new question!
- See [the Anchor Discord](https://discord.gg/NHHGSXAnXk) (but don't ping maintainers). ⚠
4 changes: 2 additions & 2 deletions .github/workflows/no-caching-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: false
solana_cli_version: 1.17.0
solana_cli_version: 1.18.17
solang_version: 0.3.2
node_version: 18.18.0
node_version: 20.16.0
cargo_profile: release
anchor_binary_name: anchor-binary-no-caching
31 changes: 24 additions & 7 deletions .github/workflows/reusable-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
- run: cd avm && cargo fmt -- --check && cargo clippy --all-targets -- -D warnings && cargo test -- --test-threads=1
# Init local borsh package
- run: cd ts/packages/borsh && yarn --frozen-lockfile && yarn build
- run: cd ts/packages/anchor-errors && yarn --frozen-lockfile && yarn build
- run: cd ts/packages/anchor && yarn --frozen-lockfile
- run: cd ts/packages/anchor && yarn test
- run: cd ts/packages/anchor && yarn lint
Expand Down Expand Up @@ -215,7 +216,7 @@ jobs:
with:
name: optional.so
path: tests/optional/target/deploy/
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: events.so
path: tests/events/target/deploy/
Expand Down Expand Up @@ -361,8 +362,9 @@ jobs:
path: ~/.cargo/bin/
- run: chmod +x ~/.cargo/bin/anchor

- run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
- uses: ./.github/actions/git-diff/
# TODO: Re-enable once https://github.com/solana-labs/solana/issues/33504 is resolved
# - run: cd "$(mktemp -d)" && anchor init hello-anchor && cd hello-anchor && yarn link @coral-xyz/anchor && yarn && anchor test && yarn lint:fix
# - uses: ./.github/actions/git-diff/

test-programs:
needs: setup-anchor-cli
Expand All @@ -385,6 +387,10 @@ jobs:
path: spl/token-proxy
- cmd: cd tests/spl/token-wrapper && anchor test --skip-lint
path: spl/token-wrapper
- cmd: cd tests/spl/transfer-hook && anchor test --skip-lint
path: spl/transfer-hook
- cmd: cd tests/spl/token-extensions && anchor test --skip-lint
path: spl/token-extensions
- cmd: cd tests/multisig && anchor test --skip-lint
path: tests/multisig
# - cmd: cd tests/lockup && anchor test --skip-lint
Expand All @@ -409,10 +415,16 @@ jobs:
path: tests/cashiers-check
- cmd: cd tests/declare-id && anchor test --skip-lint && npx tsc --noEmit
path: tests/declare-id
- cmd: cd tests/declare-program && anchor test --skip-lint
path: tests/declare-program
- cmd: cd tests/typescript && anchor test --skip-lint && npx tsc --noEmit
path: tests/typescript
- cmd: cd tests/zero-copy && anchor test --skip-lint && cd programs/zero-copy && cargo test-bpf
path: tests/zero-copy
# zero-copy tests cause `/usr/bin/ld: final link failed: No space left on device`
# on GitHub runners. It is likely caused by `cargo test-sbf` since all other tests
# don't have this problem.
# TODO: Find a fix.
# - cmd: cd tests/zero-copy && anchor test --skip-lint && cd programs/zero-copy && cargo test-sbf
# path: tests/zero-copy
- cmd: cd tests/chat && anchor test --skip-lint
path: tests/chat
- cmd: cd tests/ido-pool && anchor test --skip-lint
Expand All @@ -427,6 +439,8 @@ jobs:
path: tests/safety-checks
- cmd: cd tests/custom-coder && anchor test --skip-lint && npx tsc --noEmit
path: tests/custom-coder
- cmd: cd tests/custom-discriminator && anchor test
path: tests/custom-discriminator
- cmd: cd tests/validator-clone && anchor test --skip-lint && npx tsc --noEmit
path: tests/validator-clone
- cmd: cd tests/cpi-returns && anchor test --skip-lint && npx tsc --noEmit
Expand All @@ -449,8 +463,11 @@ jobs:
path: tests/bench
- cmd: cd tests/idl && ./test.sh
path: tests/idl
- cmd: cd tests/solang && anchor test
path: tests/solang
- cmd: cd tests/lazy-account && anchor test
path: tests/lazy-account
# TODO: Enable when `solang` becomes compatible with the new IDL spec
# - cmd: cd tests/solang && anchor test
# path: tests/solang
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
uses: ./.github/workflows/reusable-tests.yaml
with:
cache: true
solana_cli_version: 1.17.0
solana_cli_version: 1.18.17
solang_version: 0.3.2
node_version: 18.18.0
node_version: 20.16.0
cargo_profile: debug
anchor_binary_name: anchor-binary
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ target/
test-ledger
examples/*/Cargo.lock
examples/**/Cargo.lock
*/example/Cargo.lock
tests/*/Cargo.lock
tests/**/Cargo.lock
tests/*/yarn.lock
Expand Down
Loading

0 comments on commit f40f65b

Please sign in to comment.