-
Notifications
You must be signed in to change notification settings - Fork 180
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0c0aa69
Showing
2,081 changed files
with
39,277 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* @yugure-orca @wjthieme @odcheung | ||
/programs/ @yugure-orca @philcchen @rawfalafel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Bug Report | ||
description: When you want to report something not working as expected. | ||
title: "[Bug] " | ||
labels: [] | ||
body: | ||
- type: textarea | ||
id: details | ||
attributes: | ||
label: Details | ||
description: A clear and concise description of what the issue is. | ||
placeholder: Something did not go as expected. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: reproduce | ||
attributes: | ||
label: Steps to reproduce | ||
description: The steps taken to reproduce the behavior. | ||
placeholder: "1. Go to '...'\n2. Click on '....'\n3. Scroll down to '....'\n4. See error" | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: expected | ||
attributes: | ||
label: Expected behavior | ||
description: A clear and concise description of what was supposed to happen. | ||
placeholder: The following things were supposed to happen. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Feature Request | ||
description: When you have an idea for an improvement or new feature. | ||
title: "[Feature] " | ||
labels: [] | ||
body: | ||
- type: textarea | ||
id: details | ||
attributes: | ||
label: Details | ||
description: A clear and concise description of what should be added. | ||
placeholder: Something needs to be added. | ||
validations: | ||
required: true | ||
- type: textarea | ||
id: alternatives | ||
attributes: | ||
label: Alternatives considered | ||
description: A clear and concise description of any alternative solutions or features considered. | ||
placeholder: Other alternatives solutions are not viable. | ||
validations: | ||
required: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
name: 'Setup Anchor' | ||
description: 'Sets up an Anchor development environment.' | ||
|
||
branding: | ||
icon: anchor | ||
color: blue | ||
|
||
inputs: | ||
solana-cluster: | ||
description: 'The cluster to use for the solana sdk.' | ||
required: false | ||
default: 'devnet' | ||
solana-key: | ||
description: 'The private key to use for the solana sdk.' | ||
required: false | ||
rustc-version: | ||
description: 'The version of rustc to use.' | ||
default: 'v1.82.0' | ||
node-version: | ||
description: 'The version of node to use.' | ||
default: 'v22.8.0' | ||
solana-version: | ||
description: 'The version of solana to use.' | ||
default: 'v1.17.25' | ||
anchor-version: | ||
description: 'The version of anchor to use.' | ||
default: 'v0.29.0' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup rustc | ||
run: | | ||
rust_version=${{ inputs.rustc-version }} | ||
rustup toolchain install ${rust_version#v} | ||
rustup default ${rust_version#v} | ||
rustup component add rustfmt clippy | ||
echo "RUST_LOG=" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Cache rust | ||
uses: actions/cache@v4 | ||
continue-on-error: true | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
**/target/ | ||
key: rust-cache-${{ inputs.rustc-version }}-${{ github.job }}-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
cache: 'yarn' | ||
- name: Install Solana CLI | ||
run: | | ||
wget -qO- "https://release.anza.xyz/${{ inputs.solana-version }}/solana-release-x86_64-unknown-linux-gnu.tar.bz2" | tar -xvj | ||
echo "$PWD/solana-release/bin" >> $GITHUB_PATH | ||
shell: bash | ||
- name: Install Anchor CLI | ||
run: | | ||
anchor_version=${{ inputs.anchor-version }} | ||
npm install -g @coral-xyz/anchor-cli@${anchor_version#v} | ||
shell: bash | ||
- name: Configure Solana CLI | ||
run: | | ||
solana config set --url ${{ inputs.solana-cluster }} | ||
if [ -z "${{ inputs.solana-key }}" ]; then | ||
solana-keygen new --no-bip39-passphrase | ||
else | ||
echo "${{ inputs.solana-key }}" > ~/.config/solana/id.json | ||
fi | ||
solana airdrop 1 || true | ||
shell: bash | ||
- name: Log Installed Tools | ||
run: | | ||
echo "rustc: $(rustc --version)" | ||
echo "node: $(node --version)" | ||
echo "solana: $(solana --version)" | ||
echo "anchor: $(anchor --version)" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: 'Setup Version in monorepo' | ||
description: 'Set version of all packages in monorepo.' | ||
|
||
branding: | ||
icon: trash-2 | ||
color: red | ||
|
||
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Remove Unnecessary Files | ||
run: | | ||
sudo rm -rf /usr/share/dotnet | ||
sudo rm -rf /opt/ghc | ||
sudo rm -rf "/usr/local/share/boost" | ||
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: 'Setup Version in monorepo' | ||
description: 'Set version of all packages in monorepo.' | ||
|
||
branding: | ||
icon: type | ||
color: green | ||
|
||
inputs: | ||
version: | ||
description: 'The version to update all packages to.' | ||
required: true | ||
manifest-file: | ||
description: 'The package to update the versions for.' | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Get New Version Number | ||
id: version | ||
run: | | ||
VERSION=$(basename ${{ inputs.version }}) | ||
if [[ $VERSION != v* ]]; then | ||
echo "Invalid version number" 1>&2 | ||
exit 1 | ||
fi | ||
echo "VERSION=${VERSION:1}" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- name: Get Environment | ||
id: env | ||
run: | | ||
if [[ $(basename ${{ inputs.manifest-file }}) == "package.json" ]]; then | ||
ENV="npm" | ||
elif [[ $(basename ${{ inputs.manifest-file }}) == "Cargo.toml" ]]; then | ||
ENV="cargo" | ||
else | ||
echo "Unknown package type" 1>&2 | ||
exit 1 | ||
fi | ||
echo "ENV=$ENV" >> $GITHUB_OUTPUT | ||
shell: bash | ||
- name: Update npm Packages | ||
if: ${{ steps.env.outputs.ENV == 'npm' }} | ||
run: | | ||
jq --arg version "${{ steps.version.outputs.VERSION }}" ' | ||
.version = $version | ||
' ${{ inputs.manifest-file }} > tmp.json && mv tmp.json ${{ inputs.manifest-file }} | ||
jq --arg version "${{ steps.version.outputs.VERSION }}" ' | ||
if .dependencies then .dependencies |= with_entries(if .value == "*" then .value = $version else . end) else . end | ||
' ${{ inputs.manifest-file }} > tmp.json && mv tmp.json ${{ inputs.manifest-file }} | ||
shell: bash | ||
- name: Update Cargo Packages | ||
if: ${{ steps.env.outputs.ENV == 'cargo' }} | ||
run: | | ||
awk -v version="${{ steps.version.outputs.VERSION }}" ' | ||
/^version = / { sub(/".*"/, "\"" version "\"") } { print } | ||
' ${{ inputs.manifest-file }} > tmp.toml && mv tmp.toml ${{ inputs.manifest-file }} | ||
awk -v version="${{ steps.version.outputs.VERSION }}" ' | ||
/^\[dependencies\]/ { in_dependencies=1 } | ||
/^\[/ && !/^\[dependencies\]/ { in_dependencies=0 } | ||
in_dependencies && /path = "[^"]*"/ { sub(/path = "[^"]*"/, "version = \"" version "\"") } { print } | ||
' ${{ inputs.manifest-file }} > tmp.toml && mv tmp.toml ${{ inputs.manifest-file }} | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "npm" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: [ ] | ||
groups: | ||
docusaurus: | ||
applies-to: version-updates | ||
patterns: | ||
- "@docusaurus/*" | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: [ ] | ||
groups: | ||
program-dependencies: | ||
applies-to: version-updates | ||
dependency-type: production | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: [ ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!-- | ||
**Title** | ||
A brief description of the pull request. | ||
**Details** | ||
A clear and concise description of what this pull request solves. | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Checks | ||
|
||
on: | ||
pull_request: | ||
branches: "*" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Anchor | ||
uses: ./.github/actions/anchor | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Build packages | ||
run: yarn build --output-style static | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Remove Unnecessary Files | ||
uses: ./.github/actions/cleanup | ||
- name: Setup Anchor | ||
uses: ./.github/actions/anchor | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Run tests | ||
run: yarn test --exclude legacy-sdk/integration --exclude rust-sdk/integration --output-style static | ||
|
||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Anchor | ||
uses: ./.github/actions/anchor | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Run Lint | ||
run: yarn lint --output-style static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Dependabot | ||
|
||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
|
||
automerge: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.actor == 'dependabot[bot]' }} | ||
permissions: | ||
pull-requests: write | ||
contents: write | ||
steps: | ||
- name: Enable Automerge | ||
run: gh pr merge --auto --squash "$PR_URL" | ||
env: | ||
PR_URL: ${{ github.event.pull_request.html_url }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
concurrency: | ||
group: "docs" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pages: write | ||
id-token: write | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Setup Anchor | ||
uses: ./.github/actions/anchor | ||
- name: Setup Github Pages | ||
uses: actions/configure-pages@v5 | ||
- name: Install dependencies | ||
run: yarn install | ||
- name: Build docs | ||
run: yarn build docs/whirlpool --output-style static | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./docs/whirlpool/dist | ||
- name: Deploy artifact | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
Oops, something went wrong.