Skip to content

Commit

Permalink
Remove VERSION and add install script
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbosch committed Sep 16, 2024
1 parent fef3306 commit 64fd562
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 27 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/buildcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ jobs:
python -V
python -m pip --quiet --no-input install --upgrade pip
python -m pip --quiet --no-input install --upgrade wheel
pip install pytest
# idlc currently used both during python test and later in this script
pip install cyclonedds
pip install git+https://github.com/COVESA/vss-tools@master
sudo apt install -y protobuf-compiler
./script/install_vss_tools.sh
echo done!
- name: Test mandatory targets
Expand All @@ -33,6 +29,7 @@ jobs:
- name: Test that ddsidl is correct
run: |
pip install cyclonedds
idlc vss_rel_*.idl
Expand Down
39 changes: 18 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,60 +23,57 @@ COMMON_ARGS=-u ./spec/units.yaml --strict
COMMON_VSPEC_ARG=-s ./spec/VehicleSignalSpecification.vspec

json:
vspec export json ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).json
vspec export json ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.json

json-noexpand:
vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION)_noexpand.json
vspec export json ${COMMON_ARGS} --no-expand ${COMMON_VSPEC_ARG} -o vss_noexpand.json

jsonschema:
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).jsonschema
vspec export jsonschema ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_.jsonschema

franca:
vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).fidl
vspec export franca --franca-vss-version $$(cat VERSION) ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_.fidl

yaml:
vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).yaml
vspec export yaml ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.yaml

csv:
vspec export csv ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).csv
vspec export csv ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.csv

ddsidl:
vspec export ddsidl ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).idl
vspec export ddsidl ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.idl

# Verifies that supported overlay combinations are syntactically correct.
overlays:
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:
PYTHONPATH=${TOOLSDIR} pytest
vspec export json ${COMMON_ARGS} -l overlays/profiles/motorbike.vspec ${COMMON_VSPEC_ARG} -o vss_motorbike.json
vspec export json ${COMMON_ARGS} -l overlays/extensions/dual_wiper_systems.vspec ${COMMON_VSPEC_ARG} -o vss_dualwiper.json
vspec export json ${COMMON_ARGS} -l overlays/extensions/OBD.vspec ${COMMON_VSPEC_ARG} -o vss_obd.json

binary:
vspec export binary ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).binary
vspec export binary ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.binary

protobuf:
vspec export protobuf ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).proto
vspec export protobuf ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.proto

graphql:
vspec export graphql ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).graphql.ts
vspec export graphql ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.graphql.ts

apigear:
vspec export apigear ${COMMON_ARGS} ${COMMON_VSPEC_ARG} --output-dir apigear
cd apigear && tar -czvf ../vss_rel_$$(cat ../VERSION)_apigear.tar.gz * && cd ..
cd apigear && tar -czvf ../vss_apigear.tar.gz * && cd ..

samm:
vspec export samm ${COMMON_ARGS} ${COMMON_VSPEC_ARG} --target-folder samm
cd samm && tar -czvf ../vss_rel_$$(cat ../VERSION)_samm.tar.gz * && cd ..
cd samm && tar -czvf ../vss_samm.tar.gz * && cd ..

# 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
${TOOLSDIR}/contrib/vspec2ttl/vspec2ttl.py -u ./spec/units.yaml ./spec/VehicleSignalSpecification.vspec vss.ttl

id:
vspec export id ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss_rel_$$(cat VERSION).vspec
vspec export id ${COMMON_ARGS} ${COMMON_VSPEC_ARG} -o vss.vspec

clean:
rm -f vss_rel_*
rm -f vss.*
rm -rf apigear
rm -rf samm
1 change: 0 additions & 1 deletion VERSION

This file was deleted.

35 changes: 35 additions & 0 deletions scripts/install_vss_tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh
#
# Change this script to specify which version of vss-tools to install.
# It must be a version compatible with the VSS version.
# See https://github.com/COVESA/vss-tools for vss-tools information
#
# To be able to run the script you must have a python/pip environment
# where pip is allowed, for instance a virtual python environment
# , see https://docs.python.org/3/library/venv.html
#
# ************ MASTER *************''
# For master (ongoing development) we typically rely on latest master of vss-tools
#
pip install git+https://github.com/COVESA/vss-tools@master

# Examples for other scenarios below
#
# ************ MAINTENANCE **********
# For development in maintenance branches we could either refer to a fixed version of vss-tools
# or refer to a maintenance branch of vss-tools
# pip install git+https://github.com/COVESA/[email protected]
#
#
# ************* RELEASE CANDIDATES AND OTHER PRE-RELEASES ***************
# For VSS release candidates we want to link to specified released VSS-tools version.
# Either a released version or a pre-release, referenced with "--pre"
# See https://pypi.org/project/vss-tools/
#
# pip install --pre vss-tools==5.0.0.dev0
#
#
# *********************** RELEASES ***************************
# For releases we should link to specific released pypi version.
#
# pip install vss-tools==4.2

0 comments on commit 64fd562

Please sign in to comment.