Skip to content

Commit 161e4a4

Browse files
committed
review pt2
1 parent cea0779 commit 161e4a4

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ runs:
4949
- name: Install Rust 'build' Toolchain
5050
if: ${{ contains(inputs.toolchain, 'build') }}
5151
uses: dtolnay/rust-toolchain@master
52-
with:
53-
toolchain: stable
5452

5553
- name: Install Rust 'format' Toolchain
5654
if: ${{ contains(inputs.toolchain, 'format') }}

.github/workflows/publish-rust-client.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)