Skip to content

Commit 10faf43

Browse files
committed
Integrate new CLI
Signed-off-by: Erik Jaegervall <[email protected]>
1 parent 88b54b8 commit 10faf43

File tree

3 files changed

+34
-53
lines changed

3 files changed

+34
-53
lines changed

.github/workflows/buildcheck.yml

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,31 @@ jobs:
1515
with:
1616
submodules: true
1717

18-
- name: Install pyenv
19-
run: |
20-
# Needed for using exact python version, which is
21-
# required in `Pipfile`.
22-
# Make sure it is aligned with vss-tools/Pipfile
23-
curl https://pyenv.run | bash
24-
export PATH="$HOME/.pyenv/bin:$PATH"
25-
pyenv install 3.10.6
26-
2718
- name: Install vss-tools dependencies
19+
# For most Makefile actions we use global install
2820
run: |
2921
python -V
3022
python -m pip --quiet --no-input install --upgrade pip
31-
python -m pip --quiet --no-input install --upgrade pipenv wheel
32-
pipenv --version
33-
pipenv run python --version
23+
python -m pip --quiet --no-input install --upgrade wheel
3424
cd vss-tools
25+
pip install -e .
26+
pip install pytest
3527
sudo apt install -y protobuf-compiler
36-
pipenv install
3728
echo done!
38-
pipenv run python setup.py install
39-
env:
40-
PIPENV_VENV_IN_PROJECT: 1
4129
42-
- name: Test mandatory targets
43-
run: |
44-
pipenv install
45-
pipenv run make mandatory_targets
46-
env:
47-
PIPENV_PIPFILE: ./vss-tools/Pipfile
48-
PIPENV_VENV_IN_PROJECT: 1
30+
- name: Install poetry
31+
# We use poetry only for testing, used in Makefile
32+
uses: abatilo/actions-poetry@v2
33+
with:
34+
poetry-version: "1.8.3"
4935

50-
- name: Test that ddsidl is correct
36+
- name: Test mandatory targets
5137
run: |
52-
# Ignore vss-tools Pipfile for this use-case
53-
pipenv install --ignore-pipfile cyclonedds
54-
pipenv run idlc *.idl
55-
env:
56-
PIPENV_VENV_IN_PROJECT: 1
38+
make mandatory_targets
5739
5840
- name: Test optional targets. NOTE - always succeeds
5941
run: |
60-
pipenv install
61-
pipenv run make -k optional_targets || true
62-
env:
63-
PIPENV_PIPFILE: ./vss-tools/Pipfile
64-
PIPENV_VENV_IN_PROJECT: 1
42+
make -k optional_targets || true
6543
6644
- name: Install hugo
6745
env:

Makefile

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,53 +20,56 @@ optional_targets: clean protobuf ttl
2020

2121
TOOLSDIR?=./vss-tools
2222
COMMON_ARGS=-u ./spec/units.yaml --strict
23+
COMMON_VSPEC_ARG=-s ./spec/VehicleSignalSpecification.vspec
2324

2425
json:
25-
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).json
26+
vspec export json ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).json
2627

2728
json-noexpand:
28-
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} --no-expand ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_noexpand.json
29+
vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_noexpand.json
2930

3031
jsonschema:
31-
${TOOLSDIR}/vspec2jsonschema.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).jsonschema
32+
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).jsonschema
3233

3334
franca:
34-
${TOOLSDIR}/vspec2franca.py --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).fidl
35+
vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).fidl
3536

3637
yaml:
37-
${TOOLSDIR}/vspec2yaml.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).yaml
38+
vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).yaml
3839

3940
csv:
40-
${TOOLSDIR}/vspec2csv.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).csv
41+
vspec export csv ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).csv
4142

4243
ddsidl:
43-
${TOOLSDIR}/vspec2ddsidl.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).idl
44+
vspec export ddsidl ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).idl
4445

4546
# Verifies that supported overlay combinations are syntactically correct.
4647
overlays:
47-
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/profiles/motorbike.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_motorbike.json
48-
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/dual_wiper_systems.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_dualwiper.json
49-
${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/OBD.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_obd.json
48+
vspec export json ${COMMON_ARGS} -l overlays/profiles/motorbike.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_motorbike.json
49+
vspec export json ${COMMON_ARGS} -l overlays/extensions/dual_wiper_systems.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_dualwiper.json
50+
vspec export json ${COMMON_ARGS} -l overlays/extensions/OBD.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_obd.json
5051

51-
tests:
52-
PYTHONPATH=${TOOLSDIR} pytest
53-
54-
binary:
52+
prepare_binary:
5553
cd ${TOOLSDIR}/binary && $(MAKE)
56-
${TOOLSDIR}/vspec2binary.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).binary
54+
55+
tests: prepare_binary
56+
COLUMNS=200 PYTHONPATH=${TOOLSDIR} pytest
57+
58+
binary: prepare_binary
59+
vspec export binary ${COMMON_ARGS} ${COMMON_VSPEC_ARG} --bintool-dll ${TOOLSDIR}/binary/binarytool.so -o vss_rel_$$(cat VERSION).binary
5760

5861
protobuf:
59-
${TOOLSDIR}/vspec2protobuf.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).proto
62+
vspec export protobuf ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).proto
6063

6164
graphql:
62-
${TOOLSDIR}/vspec2graphql.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).graphql.ts
65+
vspec export graphql ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).graphql.ts
6366

6467
# vspec2ttl does not use common generator framework
6568
ttl:
6669
${TOOLSDIR}/contrib/vspec2ttl/vspec2ttl.py -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).ttl
6770

6871
id:
69-
${TOOLSDIR}/vspec2id.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).vspec
72+
vspec export id ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).vspec
7073

7174
clean:
7275
cd ${TOOLSDIR}/binary && $(MAKE) clean

vss-tools

Submodule vss-tools updated 109 files

0 commit comments

Comments
 (0)