diff --git a/.github/workflows/buildcheck.yml b/.github/workflows/buildcheck.yml index 989461e8..90257c23 100644 --- a/.github/workflows/buildcheck.yml +++ b/.github/workflows/buildcheck.yml @@ -15,53 +15,25 @@ jobs: with: submodules: true - - name: Install pyenv - run: | - # Needed for using exact python version, which is - # required in `Pipfile`. - # Make sure it is aligned with vss-tools/Pipfile - curl https://pyenv.run | bash - export PATH="$HOME/.pyenv/bin:$PATH" - pyenv install 3.10.6 - - name: Install vss-tools dependencies run: | python -V python -m pip --quiet --no-input install --upgrade pip - python -m pip --quiet --no-input install --upgrade pipenv wheel - pipenv --version - pipenv run python --version + python -m pip --quiet --no-input install --upgrade wheel cd vss-tools + pip install -e . + pip install pytest + pip install cyclonedds sudo apt install -y protobuf-compiler - pipenv install echo done! - pipenv run python setup.py install - env: - PIPENV_VENV_IN_PROJECT: 1 - name: Test mandatory targets run: | - pipenv install - pipenv run make mandatory_targets - env: - PIPENV_PIPFILE: ./vss-tools/Pipfile - PIPENV_VENV_IN_PROJECT: 1 - - - name: Test that ddsidl is correct - run: | - # Ignore vss-tools Pipfile for this use-case - pipenv install --ignore-pipfile cyclonedds - pipenv run idlc *.idl - env: - PIPENV_VENV_IN_PROJECT: 1 + make mandatory_targets - name: Test optional targets. NOTE - always succeeds run: | - pipenv install - pipenv run make -k optional_targets || true - env: - PIPENV_PIPFILE: ./vss-tools/Pipfile - PIPENV_VENV_IN_PROJECT: 1 + make -k optional_targets || true - name: Install hugo env: diff --git a/Makefile b/Makefile index b77ca489..fb80abb2 100644 --- a/Makefile +++ b/Makefile @@ -20,53 +20,56 @@ optional_targets: clean protobuf ttl TOOLSDIR?=./vss-tools COMMON_ARGS=-u ./spec/units.yaml --strict +COMMON_VSPEC_ARG=-s ./spec/VehicleSignalSpecification.vspec json: - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).json + vspec export json ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).json json-noexpand: - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} --no-expand ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_noexpand.json + vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_noexpand.json jsonschema: - ${TOOLSDIR}/vspec2jsonschema.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).jsonschema + vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).jsonschema franca: - ${TOOLSDIR}/vspec2franca.py --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).fidl + vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).fidl yaml: - ${TOOLSDIR}/vspec2yaml.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).yaml + vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).yaml csv: - ${TOOLSDIR}/vspec2csv.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).csv + vspec export csv ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).csv ddsidl: - ${TOOLSDIR}/vspec2ddsidl.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).idl + vspec export ddsidl ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).idl # Verifies that supported overlay combinations are syntactically correct. overlays: - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/profiles/motorbike.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_motorbike.json - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/dual_wiper_systems.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_dualwiper.json - ${TOOLSDIR}/vspec2json.py ${COMMON_ARGS} -o overlays/extensions/OBD.vspec ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION)_obd.json + vspec export json ${COMMON_ARGS} -l overlays/profiles/motorbike.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_motorbike.json + vspec export json ${COMMON_ARGS} -l overlays/extensions/dual_wiper_systems.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_dualwiper.json + vspec export json ${COMMON_ARGS} -l overlays/extensions/OBD.vspec ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_obd.json -tests: +prepare_binary: + cd ${TOOLSDIR}/binary && $(MAKE) + +tests: prepare_binary PYTHONPATH=${TOOLSDIR} pytest -binary: - cd ${TOOLSDIR}/binary && $(MAKE) - ${TOOLSDIR}/vspec2binary.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).binary +binary: prepare_binary + vspec export binary ${COMMON_ARGS} ${COMMON_VSPEC_ARG} --bintool-dll ${TOOLSDIR}/binary/binarytool.so -o vss_rel_$$(cat VERSION).binary protobuf: - ${TOOLSDIR}/vspec2protobuf.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).proto + vspec export protobuf ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).proto graphql: - ${TOOLSDIR}/vspec2graphql.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).graphql.ts + vspec export graphql ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).graphql.ts # vspec2ttl does not use common generator framework ttl: ${TOOLSDIR}/contrib/vspec2ttl/vspec2ttl.py -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).ttl id: - ${TOOLSDIR}/vspec2id.py ${COMMON_ARGS} ./spec/VehicleSignalSpecification.vspec vss_rel_$$(cat VERSION).vspec + vspec export id ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).vspec clean: cd ${TOOLSDIR}/binary && $(MAKE) clean diff --git a/vss-tools b/vss-tools index 39be8c3d..50b29494 160000 --- a/vss-tools +++ b/vss-tools @@ -1 +1 @@ -Subproject commit 39be8c3dc3bf60a4ae02756dba7468b2b48b654d +Subproject commit 50b2949476849d1a050c4ec58108416642e4d0c0