Skip to content

Commit 002a3a4

Browse files
committed
review pt2
1 parent cea0779 commit 002a3a4

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

.github/actions/setup/action.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ inputs:
1717
description: Install Solana if `true`. Defaults to `false`.
1818
required: false
1919
toolchain:
20-
description: Rust toolchain to install. Comma-separated string of [`build`, `format`, `lint`, `test`].
20+
description: Rust toolchain to install. Comma-separated string of [`format`, `lint`, `test`].
2121
required: false
2222

2323
runs:
@@ -46,12 +46,6 @@ runs:
4646
run: pnpm install --frozen-lockfile
4747
shell: bash
4848

49-
- name: Install Rust 'build' Toolchain
50-
if: ${{ contains(inputs.toolchain, 'build') }}
51-
uses: dtolnay/rust-toolchain@master
52-
with:
53-
toolchain: stable
54-
5549
- name: Install Rust 'format' Toolchain
5650
if: ${{ contains(inputs.toolchain, 'format') }}
5751
uses: dtolnay/rust-toolchain@master

.github/workflows/main.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ jobs:
122122
- name: Setup Environment
123123
uses: ./.github/actions/setup
124124
with:
125-
toolchain: build
126125
cargo-cache-key: cargo-program
127126
solana: true
128127

.github/workflows/publish-rust-client.yml renamed to .github/workflows/publish-rust-crate.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@ on:
66
package_path:
77
description: Path to directory with package to release
88
required: true
9-
type: string
9+
default: 'clients/rust'
10+
type: choice
11+
options:
12+
- clients/rust
13+
- interface
14+
- program
1015
level:
1116
description: Level
1217
required: true
@@ -47,14 +52,14 @@ jobs:
4752
- name: Setup Environment
4853
uses: ./.github/actions/setup
4954
with:
50-
cargo-cache-key: cargo-rust-${{ github.event.inputs.package_path }}
55+
cargo-cache-key: cargo-rust-${{ inputs.package_path }}
5156
clippy: true
5257
rustfmt: true
5358
solana: true
5459

5560
- name: Convert package_path to required variables
5661
run: |
57-
PACKAGE_PATH="${{ github.event.inputs.package_path }}"
62+
PACKAGE_PATH="${{ inputs.package_path }}"
5863
RECIPE_SUFFIX="${PACKAGE_PATH//\//-}"
5964
TAG_PREFIX="$(basename "$PACKAGE_PATH")"
6065
@@ -67,8 +72,8 @@ jobs:
6772
- name: Lint
6873
run: make clippy-${{ env.RECIPE_SUFFIX }}
6974

70-
- name: Build
71-
run: make build-${{ env.RECIPE_SUFFIX }}
75+
- name: Build Program
76+
run: make build-program
7277

7378
- name: Test
7479
run: make test-${{ env.RECIPE_SUFFIX }}
@@ -86,8 +91,8 @@ jobs:
8691
- name: Setup Environment
8792
uses: ./.github/actions/setup
8893
with:
89-
cargo-cache-key: cargo-publish-rust-${{ github.event.inputs.package_path }}
90-
cargo-cache-fallback-key: cargo-rust-${{ github.event.inputs.package_path }}
94+
cargo-cache-key: cargo-publish-rust-${{ inputs.package_path }}
95+
cargo-cache-fallback-key: cargo-rust-${{ inputs.package_path }}
9196
clippy: true
9297
rustfmt: true
9398

@@ -125,10 +130,10 @@ jobs:
125130
OPTIONS=""
126131
fi
127132
128-
./scripts/publish-rust.sh ${{ github.event.inputs.package_path }} $LEVEL $OPTIONS
133+
./scripts/publish-rust.sh ${{ inputs.package_path }} $LEVEL $OPTIONS
129134
130135
- name: Create GitHub release
131-
if: github.event.inputs.create_release == 'true' && github.event.inputs.dry_run != 'true'
136+
if: inputs.create_release == 'true' && inputs.dry_run != 'true'
132137
uses: ncipollo/release-action@v1
133138
with:
134139
tag: ${{ env.TAG_PREFIX }}@v${{ steps.publish.outputs.new_version }}

rust-toolchain.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[toolchain]
2+
channel = "1.84.1"

0 commit comments

Comments
 (0)