|
@@ -1,14 +1,15 @@
|
|
|
-name: Message Buffer IDL Check
|
|
|
|
|
|
|
+name: Message Buffer Check
|
|
|
on:
|
|
on:
|
|
|
pull_request:
|
|
pull_request:
|
|
|
paths:
|
|
paths:
|
|
|
|
|
+ - .github/workflows/ci-message-buffer.yml
|
|
|
- pythnet/message_buffer/**
|
|
- pythnet/message_buffer/**
|
|
|
push:
|
|
push:
|
|
|
branches:
|
|
branches:
|
|
|
- main
|
|
- main
|
|
|
jobs:
|
|
jobs:
|
|
|
abi-check:
|
|
abi-check:
|
|
|
- name: Check Message Buffer IDL files are up to date
|
|
|
|
|
|
|
+ name: Check Message Buffer formatting & IDL files
|
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
|
defaults:
|
|
defaults:
|
|
|
run:
|
|
run:
|
|
@@ -33,10 +34,10 @@ jobs:
|
|
|
- name: Install Anchor
|
|
- name: Install Anchor
|
|
|
run: |
|
|
run: |
|
|
|
cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked
|
|
cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked
|
|
|
- - name: Build and generate IDLs
|
|
|
|
|
- run: anchor build
|
|
|
|
|
- - name: Copy anchor target files
|
|
|
|
|
- run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
|
|
|
|
|
|
|
+ - name: Install g++ 12
|
|
|
|
|
+ run: |
|
|
|
|
|
+ sudo apt-get install g++-12
|
|
|
|
|
+ echo "CXX=/usr/bin/g++-12" >> "${GITHUB_ENV}"
|
|
|
# Libusb is a build requirement for the node-hid package and so pnpm
|
|
# Libusb is a build requirement for the node-hid package and so pnpm
|
|
|
# install will fail if this isn't in the build environment and if a
|
|
# install will fail if this isn't in the build environment and if a
|
|
|
# precompiled binary isn't found.
|
|
# precompiled binary isn't found.
|
|
@@ -46,6 +47,10 @@ jobs:
|
|
|
name: Install pnpm
|
|
name: Install pnpm
|
|
|
- name: Install prettier globally
|
|
- name: Install prettier globally
|
|
|
run: pnpm install -g prettier@2.7.1
|
|
run: pnpm install -g prettier@2.7.1
|
|
|
|
|
+ - name: Build and generate IDLs
|
|
|
|
|
+ run: anchor build
|
|
|
|
|
+ - name: Copy anchor target files
|
|
|
|
|
+ run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
|
|
|
- name: Run prettier (to avoid pre-commit failures)
|
|
- name: Run prettier (to avoid pre-commit failures)
|
|
|
run: |
|
|
run: |
|
|
|
pnpm dlx prettier@2.7.1 --write "./idl/*"
|
|
pnpm dlx prettier@2.7.1 --write "./idl/*"
|
|
@@ -53,3 +58,10 @@ jobs:
|
|
|
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
|
|
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
|
|
|
# the current version of the contract and update idl directory.
|
|
# the current version of the contract and update idl directory.
|
|
|
run: git diff --exit-code idl/*
|
|
run: git diff --exit-code idl/*
|
|
|
|
|
+ if: success() || failure()
|
|
|
|
|
+ - name: Cargo format
|
|
|
|
|
+ run: cargo fmt --all -- --check
|
|
|
|
|
+ if: success() || failure()
|
|
|
|
|
+ - name: Cargo clippy
|
|
|
|
|
+ run: cargo clippy --tests -- --deny warnings
|
|
|
|
|
+ if: success() || failure()
|