Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 4aa529d

Browse files
authored
ci: Separate twoxtx build step, match Rust version (#3422)
* ci: Separate twoxtx build step, match Rust version * Make a change to trigger CI * Really trigger CI this time * Fixup yaml issue * Also set RUST_STABLE_VERSION * Define env variable earlier
1 parent c618de3 commit 4aa529d

File tree

2 files changed

+40
-6
lines changed

2 files changed

+40
-6
lines changed

.github/workflows/pull-request-token.yml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ on:
66
- 'associated-token-account/**'
77
- 'token/**'
88
- 'ci/*-version.sh'
9+
- '.github/workflows/pull-request-token.yml'
910
push:
1011
branches: [master]
1112
paths:
1213
- 'associated-token-account/**'
1314
- 'token/**'
1415
- 'ci/*-version.sh'
16+
- '.github/workflows/pull-request-token.yml'
1517

1618
jobs:
1719
cargo-test-bpf:
@@ -62,11 +64,6 @@ jobs:
6264
- name: Build and test ATA
6365
run: ./ci/cargo-test-bpf.sh associated-token-account
6466

65-
- name: Build and test token-2022 twoxtx (TEMPORARY)
66-
run: |
67-
./token/twoxtx-setup.sh
68-
./ci/cargo-test-bpf.sh token/program-2022-test
69-
7067
- name: Build and test token-2022 with "serde" activated
7168
run: |
7269
cargo +"${{ env.RUST_STABLE }}" test \
@@ -82,6 +79,43 @@ jobs:
8279
path: "target/deploy/*.so"
8380
if-no-files-found: error
8481

82+
cargo-test-bpf-twoxtx:
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v2
86+
87+
- name: Set env vars
88+
run: |
89+
echo "RUST_STABLE_VERSION=1.60.0" >> $GITHUB_ENV
90+
source ci/rust-version.sh
91+
echo "RUST_STABLE=$rust_stable" >> $GITHUB_ENV
92+
source ci/solana-version.sh
93+
echo "SOLANA_VERSION=$solana_version" >> $GITHUB_ENV
94+
95+
- uses: actions-rs/toolchain@v1
96+
with:
97+
toolchain: ${{ env.RUST_STABLE }}
98+
override: true
99+
profile: minimal
100+
101+
- uses: actions/cache@v2
102+
with:
103+
path: |
104+
~/.cargo/registry
105+
~/.cargo/git
106+
key: cargo-build-${{ hashFiles('**/Cargo.lock') }}-${{ env.RUST_STABLE}}
107+
108+
- name: Install dependencies
109+
run: |
110+
./ci/install-build-deps.sh
111+
./ci/install-program-deps.sh
112+
echo "$HOME/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
113+
114+
- name: Build and test token-2022 twoxtx (TEMPORARY)
115+
run: |
116+
./token/twoxtx-setup.sh
117+
./ci/cargo-test-bpf.sh token/program-2022-test
118+
85119
js-test:
86120
runs-on: ubuntu-latest
87121
env:

token/twoxtx-setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
#
3-
# Patch in a Solana v1.10 monorepo that supports 2x transactions for testing the
3+
# Patch in a Solana v1.11 monorepo that supports 2x transactions for testing the
44
# SPL Token 2022 Confidential Transfer extension
55
#
66

0 commit comments

Comments
 (0)