1
- name : Message Buffer IDL Check
1
+ name : Message Buffer Check
2
2
on :
3
3
pull_request :
4
4
paths :
5
+ - .github/workflows/ci-message-buffer.yml
5
6
- pythnet/message_buffer/**
6
7
push :
7
8
branches :
8
9
- main
9
10
jobs :
10
11
abi-check :
11
- name : Check Message Buffer IDL files are up to date
12
+ name : Check Message Buffer formatting & IDL files
12
13
runs-on : ubuntu-latest
13
14
defaults :
14
15
run :
@@ -33,10 +34,10 @@ jobs:
33
34
- name : Install Anchor
34
35
run : |
35
36
cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked
36
- - name : Build and generate IDLs
37
- run : anchor build
38
- - name : Copy anchor target files
39
- run : cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
37
+ - name : Install g++ 12
38
+ run : |
39
+ sudo apt-get install g++-12
40
+ echo "CXX=/usr/bin/g++-12" >> "${GITHUB_ENV}"
40
41
# Libusb is a build requirement for the node-hid package and so pnpm
41
42
# install will fail if this isn't in the build environment and if a
42
43
# precompiled binary isn't found.
@@ -46,10 +47,21 @@ jobs:
46
47
name : Install pnpm
47
48
- name : Install prettier globally
48
49
run :
pnpm install -g [email protected]
50
+ - name : Build and generate IDLs
51
+ run : anchor build
52
+ - name : Copy anchor target files
53
+ run : cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
49
54
- name : Run prettier (to avoid pre-commit failures)
50
55
run : |
51
56
pnpm dlx [email protected] --write "./idl/*"
52
57
- name : Check IDL changes
53
58
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
54
59
# the current version of the contract and update idl directory.
55
60
run : git diff --exit-code idl/*
61
+ if : success() || failure()
62
+ - name : Cargo format
63
+ run : cargo fmt --all -- --check
64
+ if : success() || failure()
65
+ - name : Cargo clippy
66
+ run : cargo clippy --tests -- --deny warnings
67
+ if : success() || failure()
0 commit comments