-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* try 2. copy pasted from drift * no cd * working
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
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,61 @@ | ||
name: Soteria | ||
|
||
on: | ||
push: | ||
branches: [ main, dev ] | ||
pull_request: | ||
branches: [ main, dev ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
SOLANA_VERSION: "1.8.12" | ||
PROGRAM_PATH: "programs/" | ||
|
||
jobs: | ||
build: | ||
name: Soteria Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout changes | ||
uses: actions/checkout@v2 | ||
|
||
- name: Cache Solana Version | ||
uses: actions/cache@v2 | ||
id: solana-cache | ||
with: | ||
path: | | ||
~/.rustup | ||
~/.cache/solana | ||
~/.local/share/solana | ||
key: solana-v${{ env.SOLANA_VERSION }} | ||
|
||
- name: Cache Soteria Build | ||
uses: Swatinem/rust-cache@v1 | ||
with: | ||
target-dir: ${{ env.PROGRAM_PATH }}.coderrect/build # Cache build files for performance | ||
|
||
- name: Download Solana | ||
if: steps.solana-cache.outputs.cache-hit != 'true' # Skip this step if matched cached version is available | ||
run: | | ||
echo Downloading Solana v${{ env.SOLANA_VERSION }}... 🧬 | ||
sh -c "$(curl -sSfL https://release.solana.com/v${{ env.SOLANA_VERSION }}/install)" | ||
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH | ||
export PATH="/home/runner/.local/share/solana/install/active_release/bin:$PATH" | ||
echo Configuring bpf toolchain... | ||
(cd /home/runner/.local/share/solana/install/active_release/bin/sdk/bpf/scripts; ./install.sh) | ||
shell: bash | ||
|
||
- name: Download Soteria # Always grab the latest version | ||
run: | | ||
echo Downloading Soteria... 🔬 | ||
sh -c "$(curl -k https://supercompiler.xyz/install)" | ||
export PATH=$PWD/soteria-linux-develop/bin/:$PATH | ||
echo "$PWD/soteria-linux-develop/bin" >> $GITHUB_PATH | ||
shell: bash | ||
|
||
- name: Run Soteria | ||
run: | | ||
echo Running Soteria... 👾 | ||
soteria -analyzeAll . | ||
echo Done! | ||
shell: bash |