Skip to content

Commit 3d1fc45

Browse files
committed
Testing workflow
Signed-off-by: Alex Tzonkov <4975715+attzonko@users.noreply.github.com>
1 parent b7eed20 commit 3d1fc45

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

.github/workflows/hello.yml

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,39 @@
1-
name: Hello World Workflow
1+
name: Validate CDDL and Example
22

3-
on:
4-
workflow_dispatch:
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
paths:
7+
- 'Documentation/corim_profile/*.cddl'
8+
- 'Documentation/corim_profile/examples/*.diag'
59

6-
jobs:
7-
greet:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Say Hello
11-
run: echo "Hello, World!"
10+
jobs:
11+
validate:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v3
16+
17+
- name: Install Ruby cddl and cbor-diag gems
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y ruby
21+
sudo gem install cddl
22+
sudo gem install cddlc
23+
sudo gem install cbor-diag
24+
25+
- name: Convert DIAG to CBOR
26+
run: |
27+
diag2cbor.rb Documentation/corim_profile/examples/ocp-safe-sfr-fw-example.diag > example.cbor
28+
29+
- name: Fetch latest upstream CoRIM CDDL
30+
run: |
31+
curl -L -o corim-base-upstream.cddl https://github.com/ietf-rats-wg/draft-ietf-rats-corim/releases/latest/download/corim-autogen.cddl
32+
33+
- name: Concatenate the CDDLs
34+
run: |
35+
cddlc -t cddl corim-base-upstream.cddl Documentation/corim_profile/ocp-safe-sfr-profile.cddl > combined.cddl
36+
37+
- name: Validate CBOR against CDDL
38+
run: |
39+
cddl combined.cddl validate example.cbor

0 commit comments

Comments
 (0)