Skip to content

Commit 207ae67

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

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
- CFG: "make-EXPERIMENTAL-check"
3333
TEST_CMD: "make check-source check-units installcheck check-gen-updated"
3434
EXPERIMENTAL_FEATURES: 1
35+
VALGRIND: 1
3536
steps:
3637
- name: Checkout
3738
uses: actions/[email protected]
@@ -97,6 +98,33 @@ jobs:
9798
./configure
9899
make check-doc
99100
101+
check-rust:
102+
name: Check Rust file diff
103+
runs-on: ubuntu-20.04
104+
env:
105+
DEVELOPER: 1
106+
VALGRIND: 0
107+
EXPERIMENTAL_FEATURES: 0
108+
COMPAT: 1
109+
steps:
110+
- name: Checkout
111+
uses: actions/[email protected]
112+
113+
- name: Set up Python 3.7
114+
uses: actions/setup-python@v2
115+
with:
116+
python-version: 3.7
117+
118+
- name: Install dependencies
119+
run: bash -x .github/scripts/setup.sh
120+
121+
- name: Check Rust diff file
122+
run: |
123+
pip install mako
124+
./configure
125+
make check-rust
126+
127+
100128
proto-test:
101129
name: Protocol Test Config
102130
runs-on: ubuntu-20.04

Makefile

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

528+
check-rust:
529+
git diff --exit-code .msggen.json | echo "diff in rust file, need to be updated by enabling rust" && exit 1
530+
528531
check-includes: check-src-includes check-hdr-includes
529532
@tools/check-includes.sh
530533

0 commit comments

Comments
 (0)