Skip to content

Commit 1ead6b6

Browse files
refactor: migrate workspace automation from ts/zx to just
1 parent 75a1a30 commit 1ead6b6

25 files changed

+38
-800
lines changed

.github/actions/setup/action.yml

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Setup environment
2+
description: "Installs Rust toolchains, Solana, and Cargo components"
23

34
inputs:
45
cargo-cache-key:
@@ -17,22 +18,17 @@ inputs:
1718
runs:
1819
using: 'composite'
1920
steps:
20-
- name: Setup pnpm
21-
uses: pnpm/action-setup@v3
22-
23-
- name: Setup Node.js
24-
uses: actions/setup-node@v4
25-
with:
26-
node-version: 20
27-
cache: 'pnpm'
28-
29-
- name: Install Dependencies
30-
run: pnpm install --frozen-lockfile
31-
shell: bash
32-
3321
- name: Set Environment Variables
3422
shell: bash
35-
run: pnpm tsx ./scripts/setup/ci.mts
23+
run: |
24+
set -o allexport
25+
source .github/toolchains.env
26+
set +o allexport
27+
echo "SOLANA_VERSION=$SOLANA_VERSION" >> $GITHUB_ENV
28+
echo "TOOLCHAIN_BUILD=$TOOLCHAIN_BUILD" >> $GITHUB_ENV
29+
echo "TOOLCHAIN_FORMAT=$TOOLCHAIN_FORMAT" >> $GITHUB_ENV
30+
echo "TOOLCHAIN_LINT=$TOOLCHAIN_LINT" >> $GITHUB_ENV
31+
echo "TOOLCHAIN_TEST=$TOOLCHAIN_TEST" >> $GITHUB_ENV
3632
3733
- name: Install Rust 'build' Toolchain
3834
if: ${{ contains(inputs.toolchain, 'build') }}
@@ -115,3 +111,8 @@ runs:
115111
~/.cargo/git/db/
116112
target/
117113
key: ${{ runner.os }}-${{ inputs.cargo-cache-key }}-${{ hashFiles('**/Cargo.lock') }}
114+
115+
- name: Install 'just'
116+
uses: taiki-e/install-action@v2
117+
with:
118+
tool: just

.github/toolchains.env

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
SOLANA_VERSION=2.3.0
2+
TOOLCHAIN_BUILD=1.84.1
3+
TOOLCHAIN_FORMAT=nightly-2025-02-16
4+
TOOLCHAIN_LINT=nightly-2025-02-16
5+
TOOLCHAIN_TEST=1.84.1

.github/workflows/main.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ jobs:
2626
components: audit, miri
2727

2828
- name: cargo-audit
29-
run: pnpm cargo-audit
29+
run: just audit
3030

3131
- name: cargo-miri
32-
run: pnpm miri
32+
run: just miri
3333

3434
- name: Filter members
3535
id: filter
36-
run: pnpm tsx ./scripts/setup/members.mts
36+
shell: bash
37+
run: |
38+
MEMBERS_JSON=$(just members | jq -R -s -c 'split(" ") | map(select(length > 0))')
39+
echo "members=$MEMBERS_JSON" >> $GITHUB_OUTPUT
3740
3841
spellcheck:
3942
name: Spellcheck
@@ -49,7 +52,7 @@ jobs:
4952
components: spellcheck
5053

5154
- name: cargo-spellcheck
52-
run: pnpm spellcheck
55+
run: just spellcheck
5356

5457
process:
5558
name: Check
@@ -71,19 +74,19 @@ jobs:
7174
solana: true
7275

7376
- name: fmt
74-
run: pnpm format ${{ matrix.member }}
77+
run: just format ${{ matrix.member }}
7578

7679
- name: clippy
77-
run: pnpm clippy ${{ matrix.member }}
80+
run: just clippy ${{ matrix.member }}
7881

7982
- name: cargo-doc
80-
run: pnpm doc ${{ matrix.member }}
83+
run: just doc ${{ matrix.member }}
8184

8285
- name: cargo-hack
83-
run: pnpm hack ${{ matrix.member }}
86+
run: just hack ${{ matrix.member }}
8487

8588
- name: build-sbf
86-
run: pnpm build-sbf ${{ matrix.member }}
89+
run: just build-sbf ${{ matrix.member }}
8790

8891
- name: test
89-
run: pnpm test ${{ matrix.member }}
92+
run: just test ${{ matrix.member }}

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
7878
- name: Check semver
7979
run: |
80-
pnpm semver ${{ inputs.crate }}
80+
just semver ${{ inputs.crate }}
8181
8282
8383
publish_release:
@@ -104,10 +104,10 @@ jobs:
104104
solana: true
105105

106106
- name: Build
107-
run: pnpm build-sbf ${{ inputs.crate }}
107+
run: just build-sbf ${{ inputs.crate }}
108108

109109
- name: Test
110-
run: pnpm test ${{ inputs.crate }}
110+
run: just test ${{ inputs.crate }}
111111

112112
- name: Set Git Author
113113
run: |
@@ -134,7 +134,7 @@ jobs:
134134
OPTIONS=""
135135
fi
136136
137-
pnpm tsx ./scripts/publish.mts ${{ inputs.crate }} $LEVEL $OPTIONS
137+
just publish "${{ inputs.crate }}" "$LEVEL" $OPTIONS
138138
139139
- name: Generate a changelog
140140
if: github.event.inputs.dry_run != 'true' && github.event.inputs.create_release == 'true'

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
/node_modules
21
/target

.prettierrc

Lines changed: 0 additions & 9 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@ tag-message = "Publish {{crate_name}} v{{version}}"
3939
consolidate-commits = false
4040

4141
[workspace.metadata.spellcheck]
42-
config = "scripts/setup/spellcheck.toml"
42+
config = "spellcheck.toml"

package.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)