Skip to content

Commit d8d446e

Browse files
ci: introduce the safety check for rust
Signed-off-by: Vincenzo Palazzo <[email protected]>
1 parent 2fe17a5 commit d8d446e

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- CFG: "make-EXPERIMENTAL-check w/ VALGRIND"
3232
TEST_CMD: "make check-source check-units installcheck check-gen-updated"
3333
EXPERIMENTAL_FEATURES: 1
34-
VALGRIND: 1
34+
VALGRIND: 1
3535
steps:
3636
- name: Checkout
3737
uses: actions/[email protected]
@@ -97,6 +97,33 @@ jobs:
9797
./configure
9898
make check-doc
9999
100+
check-rust:
101+
name: Check Rust file diff
102+
runs-on: ubuntu-20.04
103+
env:
104+
DEVELOPER: 1
105+
VALGRIND: 0
106+
EXPERIMENTAL_FEATURES: 0
107+
COMPAT: 1
108+
steps:
109+
- name: Checkout
110+
uses: actions/[email protected]
111+
112+
- name: Set up Python 3.7
113+
uses: actions/setup-python@v2
114+
with:
115+
python-version: 3.7
116+
117+
- name: Install dependencies
118+
run: bash -x .github/scripts/setup.sh
119+
120+
- name: Check Rust diff file
121+
run: |
122+
pip install mako
123+
./configure
124+
make check-rust
125+
126+
100127
proto-test:
101128
name: Protocol Test Config
102129
runs-on: ubuntu-20.04

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -510,6 +510,9 @@ check-python-flake8:
510510
check-pytest-pyln-proto:
511511
PATH=$(PYLN_PATH) PYTHONPATH=$(MY_CHECK_PYTHONPATH) $(PYTEST) contrib/pyln-proto/tests/
512512

513+
check-rust:
514+
git diff --exit-code .msggen.json | echo "diff in rust file, need to be updated by enabling rust" && exit 1
515+
513516
check-includes: check-src-includes check-hdr-includes
514517
@tools/check-includes.sh
515518

0 commit comments

Comments
 (0)