Skip to content

Commit 33a8a4d

Browse files
wip
1 parent 1dc9769 commit 33a8a4d

1 file changed

Lines changed: 5 additions & 76 deletions

File tree

.github/actions/setup/action.yml

Lines changed: 5 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,27 @@
11
name: Setup Environment
22

3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
rustfmt:
7-
description: "Install Rustfmt"
8-
required: false
9-
default: "false"
10-
clippy:
11-
description: "Install Clippy"
12-
required: false
13-
default: "false"
14-
solana:
15-
description: "Install Solana"
16-
required: false
17-
default: "false"
18-
TOOLCHAIN_FORMAT:
19-
description: "Rust toolchain version for formatting"
20-
required: false
21-
default: "stable"
22-
TOOLCHAIN_LINT:
23-
description: "Rust toolchain version for linting"
24-
required: false
25-
default: "stable"
26-
SOLANA_VERSION:
27-
description: "Solana version to install"
28-
required: false
29-
default: "v1.8.0"
3+
on: workflow_dispatch
304

315
jobs:
326
setup:
337
runs-on: ubuntu-latest
348
steps:
35-
- name: Git Checkout
36-
uses: actions/checkout@v4
9+
- uses: actions/checkout@v4
3710

38-
- name: Install Rustfmt
39-
if: ${{ github.event.inputs.rustfmt == 'true' }}
11+
- if: ${{ github.event.inputs.rustfmt == 'true' }}
4012
uses: dtolnay/rust-toolchain@master
4113
with:
4214
toolchain: ${{ github.event.inputs.TOOLCHAIN_FORMAT }}
4315
components: rustfmt
4416

45-
- name: Install Clippy
46-
if: ${{ github.event.inputs.clippy == 'true' }}
17+
- if: ${{ github.event.inputs.clippy == 'true' }}
4718
uses: dtolnay/rust-toolchain@master
4819
with:
4920
toolchain: ${{ github.event.inputs.TOOLCHAIN_LINT }}
5021
components: clippy
5122

52-
- name: Install Solana
53-
if: ${{ github.event.inputs.solana == 'true' }}
23+
- if: ${{ github.event.inputs.solana == 'true' }}
5424
uses: solana-program/actions/install-solana@v1
5525
with:
5626
version: ${{ github.event.inputs.SOLANA_VERSION }}
5727
cache: true
58-
59-
- name: Cache Cargo Dependencies
60-
if: ${{ github.event.inputs.cargo_cache_key && !github.event.inputs.cargo_cache_fallback_key }}
61-
uses: actions/cache@v4
62-
with:
63-
path: |
64-
~/.cargo/bin/
65-
~/.cargo/registry/index/
66-
~/.cargo/registry/cache/
67-
~/.cargo/git/db/
68-
target/
69-
key: ${{ runner.os }}-${{ github.event.inputs.cargo_cache_key }}-${{ hashFiles('**/Cargo.lock') }}
70-
restore-keys: ${{ runner.os }}-${{ github.event.inputs.cargo_cache_key }}
71-
72-
- name: Cache Cargo Dependencies With Fallback
73-
if: ${{ github.event.inputs.cargo_cache_key && github.event.inputs.cargo_cache_fallback_key }}
74-
uses: actions/cache@v4
75-
with:
76-
path: |
77-
~/.cargo/bin/
78-
~/.cargo/registry/index/
79-
~/.cargo/registry/cache/
80-
~/.cargo/git/db/
81-
target/
82-
key: ${{ runner.os }}-${{ github.event.inputs.cargo_cache_key }}-${{ hashFiles('**/Cargo.lock') }}
83-
restore-keys: |
84-
${{ runner.os }}-${{ github.event.inputs.cargo_cache_key }}
85-
${{ runner.os }}-${{ github.event.inputs.cargo_cache_fallback_key }}-${{ hashFiles('**/Cargo.lock') }}
86-
${{ runner.os }}-${{ github.event.inputs.cargo_cache_fallback_key }}
87-
88-
- name: Cache Local Cargo Dependencies
89-
if: ${{ github.event.inputs.cargo_cache_local_key }}
90-
uses: actions/cache@v4
91-
with:
92-
path: |
93-
.cargo/bin/
94-
.cargo/registry/index/
95-
.cargo/registry/cache/
96-
.cargo/git/db/
97-
key: ${{ runner.os }}-${{ github.event.inputs.cargo_cache_local_key }}-${{ hashFiles('**/Cargo.lock') }}
98-
restore-keys: ${{ runner.os }}-${{ github.event.inputs.cargo_cache_local_key }}

0 commit comments

Comments
 (0)