-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (55 loc) · 1.63 KB
/
rust-tests.yml
File metadata and controls
61 lines (55 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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
- airdrop-implementations/simple-claim/program
include:
- 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 }}
- name: Build and test
working-directory: ${{ matrix.example }}
run: |
if [ -n "${{ matrix.package }}" ]; then
cargo test-sbf -p ${{ matrix.package }}
else
cargo test-sbf
fi