Skip to content

Commit

Permalink
Imported upstream version '2.0.1' of 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
jpbusch committed Feb 27, 2024
1 parent f905119 commit 72c26b0
Show file tree
Hide file tree
Showing 1,263 changed files with 72,237 additions and 23,332 deletions.
53 changes: 16 additions & 37 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ name: Code Generation
on: push

jobs:
reduce_asn1:
name: ASN1 Reduction

etsi_its_coding:
name: asn1c
runs-on: ubuntu-latest

strategy:
matrix:
include:
- message: cam
script: ./utils/codegen/reduceAsn1ToTypeDependencies.py -t CAM -o asn1/reduced/cam asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn
script: ./utils/codegen/asn1ToC.py asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn -o etsi_its_coding/etsi_its_cam_coding -td ${{ github.workspace }}/tmp
- message: denm
script: ./utils/codegen/reduceAsn1ToTypeDependencies.py -t DENM -o asn1/reduced/denm asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn
script: ./utils/codegen/asn1ToC.py asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn -o etsi_its_coding/etsi_its_denm_coding -td ${{ github.workspace }}/tmp

steps:
- name: Checkout code
Expand All @@ -26,35 +27,6 @@ jobs:
python-version: 3.9
- name: Install Python dependencies
run: pip install -r utils/requirements.txt
- name: asn1_reduce_${{ matrix.message }}
run: |
${{ matrix.script }}
if [[ ! -z "$(git status --porcelain)" ]]; then
echo "Code generation script resulted in changes to the repository"
exit 1
fi
etsi_its_coding:
name: ASN1C
runs-on: ubuntu-latest

strategy:
matrix:
include:
- message: cam
script: ./utils/codegen/asn1ToC.py asn1/reduced/cam/CAM-PDU-Descriptions.asn asn1/reduced/cam/ITS-Container.asn -o etsi_its_coding/etsi_its_cam_coding -td ${{ github.workspace }}/tmp
- message: denm
script: ./utils/codegen/asn1ToC.py asn1/reduced/denm/DENM-PDU-Descriptions.asn asn1/reduced/denm/ITS-Container.asn -o etsi_its_coding/etsi_its_denm_coding -td ${{ github.workspace }}/tmp

steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python dependencies
run: pip install -r utils/requirements.txt
- name: Login to Docker registry
uses: docker/login-action@v3
with:
Expand All @@ -68,6 +40,7 @@ jobs:
rm -rf ${{ github.workspace }}/tmp
if [[ ! -z "$(git status --porcelain)" ]]; then
echo "Code generation script resulted in changes to the repository"
git diff
exit 1
fi
Expand All @@ -79,13 +52,15 @@ jobs:
matrix:
include:
- message: cam
script: ./utils/codegen/asn1ToRosMsg.py asn1/reduced/cam/CAM-PDU-Descriptions.asn asn1/reduced/cam/ITS-Container.asn -o etsi_its_msgs/etsi_its_cam_msgs/msg
script: ./utils/codegen/asn1ToRosMsg.py asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn -o etsi_its_msgs/etsi_its_cam_msgs/msg
- message: denm
script: ./utils/codegen/asn1ToRosMsg.py asn1/reduced/denm/DENM-PDU-Descriptions.asn asn1/reduced/denm/ITS-Container.asn -o etsi_its_msgs/etsi_its_denm_msgs/msg
script: ./utils/codegen/asn1ToRosMsg.py asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn -o etsi_its_msgs/etsi_its_denm_msgs/msg

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -97,6 +72,7 @@ jobs:
${{ matrix.script }}
if [[ ! -z "$(git status --porcelain)" ]]; then
echo "Code generation script resulted in changes to the repository"
git diff
exit 1
fi
Expand All @@ -108,13 +84,15 @@ jobs:
matrix:
include:
- message: cam
script: ./utils/codegen/asn1ToConversionHeader.py asn1/reduced/cam/CAM-PDU-Descriptions.asn asn1/reduced/cam/ITS-Container.asn -t cam -o etsi_its_conversion/etsi_its_cam_conversion/include/etsi_its_cam_conversion
script: ./utils/codegen/asn1ToConversionHeader.py asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn asn1/raw/cam_en302637_2/cdd/ITS-Container.asn -t cam -o etsi_its_conversion/etsi_its_cam_conversion/include/etsi_its_cam_conversion
- message: denm
script: ./utils/codegen/asn1ToConversionHeader.py asn1/reduced/denm/DENM-PDU-Descriptions.asn asn1/reduced/denm/ITS-Container.asn -t denm -o etsi_its_conversion/etsi_its_denm_conversion/include/etsi_its_denm_conversion
script: ./utils/codegen/asn1ToConversionHeader.py asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn asn1/raw/denm_en302637_3/cdd/ITS-Container.asn -t denm -o etsi_its_conversion/etsi_its_denm_conversion/include/etsi_its_denm_conversion

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -127,5 +105,6 @@ jobs:
${{ matrix.script }}
if [[ ! -z "$(git status --porcelain)" ]]; then
echo "Code generation script resulted in changes to the repository"
git diff
exit 1
fi
68 changes: 21 additions & 47 deletions .gitlab-ci.codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,13 @@ default:


stages:
- ASN1 Reduction
- ASN1C
- asn1c
- ROS Messages
- Conversion Headers


asn1_reduce_cam:
stage: ASN1 Reduction
needs: []
script:
- >
./utils/codegen/reduceAsn1ToTypeDependencies.py
-t CAM
-o asn1/reduced/cam
asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn
asn1/raw/cam_en302637_2/cdd/ITS-Container.asn
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi

asn1_reduce_denm:
stage: ASN1 Reduction
needs: []
script:
- >
./utils/codegen/reduceAsn1ToTypeDependencies.py
-t DENM
-o asn1/reduced/denm
asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn
asn1/raw/denm_en302637_3/cdd/ITS-Container.asn
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi


etsi_its_cam_coding:
stage: ASN1C
stage: asn1c
needs: []
tags: [privileged, amd64]
image: docker:24.0.7-git
Expand All @@ -52,15 +26,15 @@ etsi_its_cam_coding:
script:
- >
./utils/codegen/asn1ToC.py
asn1/reduced/cam/CAM-PDU-Descriptions.asn
asn1/reduced/cam/ITS-Container.asn
asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn
asn1/raw/cam_en302637_2/cdd/ITS-Container.asn
-o etsi_its_coding/etsi_its_cam_coding
-td /builds/$CI_PROJECT_PATH/tmp
- rm -rf /builds/$CI_PROJECT_PATH/tmp
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi

etsi_its_denm_coding:
stage: ASN1C
stage: asn1c
needs: []
tags: [privileged, amd64]
image: docker:24.0.7-git
Expand All @@ -75,12 +49,12 @@ etsi_its_denm_coding:
script:
- >
./utils/codegen/asn1ToC.py
asn1/reduced/denm/DENM-PDU-Descriptions.asn
asn1/reduced/denm/ITS-Container.asn
asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn
asn1/raw/denm_en302637_3/cdd/ITS-Container.asn
-o etsi_its_coding/etsi_its_denm_coding
-td /builds/$CI_PROJECT_PATH/tmp
- rm -rf /builds/$CI_PROJECT_PATH/tmp
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi


etsi_its_cam_msgs:
Expand All @@ -89,21 +63,21 @@ etsi_its_cam_msgs:
script:
- >
./utils/codegen/asn1ToRosMsg.py
asn1/reduced/cam/CAM-PDU-Descriptions.asn
asn1/reduced/cam/ITS-Container.asn
asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn
asn1/raw/cam_en302637_2/cdd/ITS-Container.asn
-o etsi_its_msgs/etsi_its_cam_msgs/msg
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi

etsi_its_denm_msgs:
stage: ROS Messages
needs: []
script:
- >
./utils/codegen/asn1ToRosMsg.py
asn1/reduced/denm/DENM-PDU-Descriptions.asn
asn1/reduced/denm/ITS-Container.asn
asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn
asn1/raw/denm_en302637_3/cdd/ITS-Container.asn
-o etsi_its_msgs/etsi_its_denm_msgs/msg
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi


etsi_its_cam_conversion:
Expand All @@ -112,20 +86,20 @@ etsi_its_cam_conversion:
script:
- >
./utils/codegen/asn1ToConversionHeader.py
asn1/reduced/cam/CAM-PDU-Descriptions.asn
asn1/reduced/cam/ITS-Container.asn
asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn
asn1/raw/cam_en302637_2/cdd/ITS-Container.asn
-t cam
-o etsi_its_conversion/etsi_its_cam_conversion/include/etsi_its_cam_conversion
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi

etsi_its_denm_conversion:
stage: Conversion Headers
needs: []
script:
- >
./utils/codegen/asn1ToConversionHeader.py
asn1/reduced/denm/DENM-PDU-Descriptions.asn
asn1/reduced/denm/ITS-Container.asn
asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn
asn1/raw/denm_en302637_3/cdd/ITS-Container.asn
-t denm
-o etsi_its_conversion/etsi_its_denm_conversion/include/etsi_its_denm_conversion
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository"; exit 1; fi
- if [[ ! -z "$(git status --porcelain)" ]]; then echo "Code generation script resulted in changes to the repository" && git diff; exit 1; fi
54 changes: 12 additions & 42 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,14 @@
"version": "0.2.0",
"configurations": [

{
"name": "CAM reduceAsn1ToTypeDependencies",
"type": "python",
"request": "launch",
"program": "utils/codegen/reduceAsn1ToTypeDependencies.py",
"args": [
"-t", "CAM",
"-o", "asn1/reduced/cam",
"asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn",
"asn1/raw/cam_en302637_2/cdd/ITS-Container.asn"
],
"console": "integratedTerminal",
"justMyCode": true
},

{
"name": "DENM reduceAsn1ToTypeDependencies",
"type": "python",
"request": "launch",
"program": "utils/codegen/reduceAsn1ToTypeDependencies.py",
"args": [
"-t", "DENM",
"-o", "asn1/reduced/denm",
"asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn",
"asn1/raw/denm_en302637_3/cdd/ITS-Container.asn"
],
"console": "integratedTerminal",
"justMyCode": true
},

{
"name": "CAM asn1ToC",
"type": "python",
"request": "launch",
"program": "utils/codegen/asn1ToC.py",
"args": [
"asn1/reduced/cam/CAM-PDU-Descriptions.asn",
"asn1/reduced/cam/ITS-Container.asn",
"asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn",
"asn1/raw/cam_en302637_2/cdd/ITS-Container.asn",
"-o", "etsi_its_coding/etsi_its_cam_coding"
],
"console": "integratedTerminal",
Expand All @@ -52,8 +22,8 @@
"request": "launch",
"program": "utils/codegen/asn1ToC.py",
"args": [
"asn1/reduced/denm/DENM-PDU-Descriptions.asn",
"asn1/reduced/denm/ITS-Container.asn",
"asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn",
"asn1/raw/denm_en302637_3/cdd/ITS-Container.asn",
"-o", "etsi_its_coding/etsi_its_denm_coding"
],
"console": "integratedTerminal",
Expand All @@ -66,8 +36,8 @@
"request": "launch",
"program": "utils/codegen/asn1ToRosMsg.py",
"args": [
"asn1/reduced/cam/CAM-PDU-Descriptions.asn",
"asn1/reduced/cam/ITS-Container.asn",
"asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn",
"asn1/raw/cam_en302637_2/cdd/ITS-Container.asn",
"-o", "etsi_its_msgs/etsi_its_cam_msgs/msg"
],
"console": "integratedTerminal",
Expand All @@ -80,8 +50,8 @@
"request": "launch",
"program": "utils/codegen/asn1ToRosMsg.py",
"args": [
"asn1/reduced/denm/DENM-PDU-Descriptions.asn",
"asn1/reduced/denm/ITS-Container.asn",
"asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn",
"asn1/raw/denm_en302637_3/cdd/ITS-Container.asn",
"-o", "etsi_its_msgs/etsi_its_denm_msgs/msg"
],
"console": "integratedTerminal",
Expand All @@ -94,8 +64,8 @@
"request": "launch",
"program": "utils/codegen/asn1ToConversionHeader.py",
"args": [
"asn1/reduced/cam/CAM-PDU-Descriptions.asn",
"asn1/reduced/cam/ITS-Container.asn",
"asn1/raw/cam_en302637_2/CAM-PDU-Descriptions.asn",
"asn1/raw/cam_en302637_2/cdd/ITS-Container.asn",
"-t", "cam",
"-o", "etsi_its_conversion/etsi_its_cam_conversion/include/etsi_its_cam_conversion"
],
Expand All @@ -109,8 +79,8 @@
"request": "launch",
"program": "utils/codegen/asn1ToConversionHeader.py",
"args": [
"asn1/reduced/denm/DENM-PDU-Descriptions.asn",
"asn1/reduced/denm/ITS-Container.asn",
"asn1/raw/denm_en302637_3/DENM-PDU-Descriptions.asn",
"asn1/raw/denm_en302637_3/cdd/ITS-Container.asn",
"-t", "denm",
"-o", "etsi_its_conversion/etsi_its_denm_conversion/include/etsi_its_denm_conversion"
],
Expand Down
Loading

0 comments on commit 72c26b0

Please sign in to comment.