Skip to content

feat: add c-token client examples #82

feat: add c-token client examples

feat: add c-token client examples #82

Workflow file for this run

name: Rust
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SOLANA_CLI_VERSION: "2.3.11"
RUST_TOOLCHAIN: "1.90.0"
jobs:
test-rust:
name: ${{ matrix.package && format('{0}/{1}', matrix.example, matrix.package) || matrix.example }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- create-and-update
- counter/native
- counter/pinocchio
- account-comparison
- zk-id
- c-token
include:
- example: c-token
test-command: cargo test
- example: basic-operations/native
package: native-program-burn
- example: basic-operations/native
package: native-program-create
- example: basic-operations/native
package: native-program-update
- example: basic-operations/native
package: native-program-close
- example: basic-operations/native
package: native-program-reinit
steps:
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup
with:
example: ${{ matrix.example }}
solana-cli-version: ${{ env.SOLANA_CLI_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
install-circom: ${{ matrix.example == 'zk-id' }}
- name: Setup ZK circuits
if: matrix.example == 'zk-id'
working-directory: ${{ matrix.example }}
run: ./scripts/setup.sh
- name: Build and test
working-directory: ${{ matrix.example }}
run: |
TEST_CMD="${{ matrix.test-command || 'cargo test-sbf' }}"
if [ -n "${{ matrix.package }}" ]; then
$TEST_CMD -p ${{ matrix.package }}
else
$TEST_CMD
fi