1- name : Message Buffer IDL Check
1+ name : Message Buffer Check
22on :
33 pull_request :
44 paths :
5+ - .github/workflows/ci-message-buffer.yml
56 - pythnet/message_buffer/**
67 push :
78 branches :
89 - main
910jobs :
1011 abi-check :
11- name : Check Message Buffer IDL files are up to date
12+ name : Check Message Buffer formatting & IDL files
1213 runs-on : ubuntu-latest
1314 defaults :
1415 run :
@@ -33,10 +34,10 @@ jobs:
3334 - name : Install Anchor
3435 run : |
3536 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}"
4041 # Libusb is a build requirement for the node-hid package and so pnpm
4142 # install will fail if this isn't in the build environment and if a
4243 # precompiled binary isn't found.
@@ -46,10 +47,21 @@ jobs:
4647 name : Install pnpm
4748 - name : Install prettier globally
4849 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/
4954 - name : Run prettier (to avoid pre-commit failures)
5055 run : |
5156 pnpm dlx [email protected] --write "./idl/*" 5257 - name : Check IDL changes
5358 # Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
5459 # the current version of the contract and update idl directory.
5560 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