Skip to content

Commit

Permalink
Merge pull request #153 from asam-ev/2024-08-29
Browse files Browse the repository at this point in the history
Add manifest support and prepare for review phase
  • Loading branch information
andreaskern74 authored Aug 29, 2024
2 parents e89c544 + 7a30b48 commit 3b96d85
Show file tree
Hide file tree
Showing 119 changed files with 16,871 additions and 2,715 deletions.
47 changes: 38 additions & 9 deletions .github/workflows/build-on-change-linux-bare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on:

jobs:
build-linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

env:
TEST_ENABLED: ${{ github.event_name == 'pull_request' && 'ON' || 'OFF' }}
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
libqt5xmlpatterns5-dev \
libxerces-c-dev \
pkg-config
echo "Dependencies installed."
echo "Dependencies installed."
shell: bash

- name: Build framework
Expand Down Expand Up @@ -93,11 +93,10 @@ jobs:
- name: Upload release artifact
uses: actions/upload-artifact@v4
with:
name: qc-framework-executables-ubuntu
name: qc-framework-executables-linux_x64
path: artifacts

- name: Unit test execution
if: github.event_name == 'pull_request'
run: |
echo Starting tests...
Expand All @@ -107,25 +106,55 @@ jobs:
shell: bash

- name: Archive test results
if: github.event_name == 'pull_request' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: unit-test-report-ubuntu
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log

- name: Runtime test execution
if: github.event_name == 'pull_request'
run: |
mv build out_build
cp -r /home/$(whoami)/qc-build/bin bin
cp out_build/examples/checker_bundle_example/DemoCheckerBundle bin/
cd runtime
python3 -m pip install -r requirements.txt
python3 -m pytest -rA > runtime_test.log
curl -sSL https://install.python-poetry.org | python3 -
poetry install --with dev
poetry run pytest -rA > runtime_test.log
- name: Archive runtime test results
if: github.event_name == 'pull_request' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: runtime-test-report-ubuntu
path: ${{ github.workspace }}/runtime/runtime_test.log

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Execute checker bundles runtime
run: |
pip install asam-qc-runtime@git+https://github.com/asam-ev/qc-framework@develop#subdirectory=runtime
mkdir "/home/$(whoami)/odr_out"
pip install asam-qc-opendrive@git+https://github.com/asam-ev/qc-opendrive@develop
qc_runtime --config="${{ github.workspace }}/.github/workflows/linux-files/odr_config.xml" --manifest="${{ github.workspace }}/.github/workflows/linux-manifest/framework.json" --working_dir="/home/$(whoami)/odr_out"
if [ ! -f "/home/$(whoami)/odr_out/xodr_bundle_report.xqar" ]; then echo "Error: Odr output does not exist."; exit 1; fi
if [ ! -f "/home/$(whoami)/odr_out/Result.xqar" ]; then echo "Error: Odr output does not exist."; exit 1; fi
if [ ! -f "/home/$(whoami)/odr_out/Report.txt" ]; then echo "Error: Odr output does not exist."; exit 1; fi
mkdir "/home/$(whoami)/osc_out"
pip install asam-qc-openscenarioxml@git+https://github.com/asam-ev/qc-openscenarioxml@develop
qc_runtime --config="/home/$(whoami)/work/qc-framework/qc-framework/.github/workflows/linux-files/osc_config.xml" --manifest="/home/$(whoami)/work/qc-framework/qc-framework/.github/workflows/linux-manifest/framework.json" --working_dir="/home/$(whoami)/osc_out"
if [ ! -f "/home/$(whoami)/osc_out/xosc_bundle_report.xqar" ]; then echo "Error: Osc output does not exist."; exit 1; fi
if [ ! -f "/home/$(whoami)/osc_out/Result.xqar" ]; then echo "Error: Osc output does not exist."; exit 1; fi
if [ ! -f "/home/$(whoami)/osc_out/Report.txt" ]; then echo "Error: Osc output does not exist."; exit 1; fi
mkdir "/home/$(whoami)/otx_out"
pip install asam-qc-otx@git+https://github.com/asam-ev/qc-otx@develop
qc_runtime --config="/home/$(whoami)/work/qc-framework/qc-framework/.github/workflows/linux-files/otx_config.xml" --manifest="/home/$(whoami)/work/qc-framework/qc-framework/.github/workflows/linux-manifest/framework.json" --working_dir="/home/$(whoami)/otx_out"
if [ ! -f "/home/$(whoami)/otx_out/otx_bundle_report.xqar" ]; then echo "Error: Otx output does not exist."; exit 1; fi
if [ ! -f "/home/$(whoami)/otx_out/Result.xqar" ]; then echo "Error: Otx output does not exist."; exit 1; fi
if [ ! -f "/home/$(whoami)/otx_out/Report.txt" ]; then echo "Error: Otx output does not exist."; exit 1; fi
shell: bash
48 changes: 39 additions & 9 deletions .github/workflows/build-on-change-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
arch: win64_msvc2019_64

- name: Install gtest
if: github.event_name == 'pull_request'
env:
CXX: g++-10
run: |
Expand Down Expand Up @@ -84,8 +83,8 @@ jobs:
mkdir build
cd build
cmake -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$env:WORKING_PATH\Xerces-Out" ..
cmake --build . --config Debug
cmake --build . --config Debug --target install
cmake --build . --config Release
cmake --build . --config Release --target install
Add-Content $env:GITHUB_PATH "$env:WORKING_PATH\bin\xerces-c_3_2D.dll"
Add-Content $env:GITHUB_PATH "$env:WORKING_PATH\Xerces-Out\include"
Expand Down Expand Up @@ -132,7 +131,6 @@ jobs:
path: artifacts

- name: Unit test execution
if: github.event_name == 'pull_request'
run: |
Write-Output "Starting unit tests..."
Expand All @@ -144,14 +142,12 @@ jobs:
shell: pwsh

- name: Archive test results
if: github.event_name == 'pull_request' && (success() || failure())
uses: actions/upload-artifact@v4
with:
name: test-report
path: ${{ github.workspace }}\build\Testing\Temporary\LastTest.log

- name: Runtime test execution
if: github.event_name == 'pull_request'
run: |
Write-Output "Starting runtime tests..."
Expand All @@ -160,8 +156,42 @@ jobs:
Copy-Item -Path "$env:WORKING_PATH\qc-framework\qc-framework\out_build\examples\checker_bundle_example\Release\DemoCheckerBundle.exe" -Destination "$env:WORKING_PATH\qc-framework\qc-framework\bin"
cd "$env:WORKING_PATH\qc-framework\qc-framework\runtime"
python3 -m pip install -r requirements.txt
python3 -m pytest
python3 -m pip install poetry
python3 -m poetry install
python3 -m poetry run pytest
Write-Output "All runtime tests done."
shell: pwsh

- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Execute checker bundles runtime
run: |
git config --system core.longpaths true
pip install asam-qc-runtime@git+https://github.com/asam-ev/qc-framework@develop#subdirectory=runtime
mkdir "$env:WORKING_PATH\odr_out"
pip install asam-qc-opendrive@git+https://github.com/asam-ev/qc-opendrive@develop
qc_runtime --config="$env:WORKING_PATH\qc-framework\qc-framework\.github\workflows\windows-files\odr_config.xml" --manifest="$env:WORKING_PATH\qc-framework\qc-framework\.github\workflows\windows-manifest\framework.json" --working_dir="$env:WORKING_PATH\odr_out"
if (-not (Test-Path "$env:WORKING_PATH\odr_out\xodr_bundle_report.xqar")) { Throw "Error: Odr output does not exist." }
if (-not (Test-Path "$env:WORKING_PATH\odr_out\Result.xqar")) { Throw "Error: Odr output does not exist." }
if (-not (Test-Path "$env:WORKING_PATH\odr_out\Report.txt")) { Throw "Error: Odr output does not exist." }
mkdir "$env:WORKING_PATH\osc_out"
pip install asam-qc-openscenarioxml@git+https://github.com/asam-ev/qc-openscenarioxml@develop
qc_runtime --config="$env:WORKING_PATH\qc-framework\qc-framework\.github\workflows\windows-files\osc_config.xml" --manifest="$env:WORKING_PATH\qc-framework\qc-framework\.github\workflows\windows-manifest\framework.json" --working_dir="$env:WORKING_PATH\osc_out"
if (-not (Test-Path "$env:WORKING_PATH\osc_out\xosc_bundle_report.xqar")) { Throw "Error: Osc output does not exist." }
if (-not (Test-Path "$env:WORKING_PATH\osc_out\Result.xqar")) { Throw "Error: Osc output does not exist." }
if (-not (Test-Path "$env:WORKING_PATH\osc_out\Report.txt")) { Throw "Error: Odr output does not exist." }
mkdir "$env:WORKING_PATH\otx_out"
pip install asam-qc-otx@git+https://github.com/asam-ev/qc-otx@develop
qc_runtime --config="$env:WORKING_PATH\qc-framework\qc-framework\.github\workflows\windows-files\otx_config.xml" --manifest="$env:WORKING_PATH\qc-framework\qc-framework\.github\workflows\windows-manifest\framework.json" --working_dir="$env:WORKING_PATH\otx_out"
if (-not (Test-Path "$env:WORKING_PATH\otx_out\otx_bundle_report.xqar")) { Throw "Error: Otx output does not exist." }
if (-not (Test-Path "$env:WORKING_PATH\otx_out\Result.xqar")) { Throw "Error: Otx output does not exist." }
if (-not (Test-Path "$env:WORKING_PATH\otx_out\Report.txt")) { Throw "Error: Odr output does not exist." }
shell: pwsh
48 changes: 48 additions & 0 deletions .github/workflows/linux-files/Core_Chk005_positive.otx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<otx id="2"
name="Core_Chk005_positive"
package="Core_Chk005"
version="1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
timestamp="2010-11-11T14:40:10">

<imports>
<import package="Core_Chk005" document="contexts" prefix="context" />
</imports>

<declarations>
<constant name="PI" visibility="PUBLIC" id="3-d1">
<specification>This defines global constant</specification>
<realisation>
<dataType xsi:type="Float">
<init value="3.14159265" />
</dataType>
</realisation>
</constant>
</declarations>

<validities>
<validity name="Workshop" id="4-v1">
<specification>Valid if executed in a workshop environment</specification>
<realisation xsi:type="IsEqual">
<term xsi:type="StringValue" valueOf="context:LOCATION" />
<term xsi:type="StringLiteral" value="DealershopWorkshop" />
</realisation>
</validity>
<validity name="Assembly" id="4-v2">
<specification>Valid if executed at an assembly line</specification>
<realisation xsi:type="IsEqual">
<term xsi:type="StringValue" valueOf="context:LOCATION" />
<term xsi:type="StringLiteral" value="AssemblyLine" />
</realisation>
</validity>
</validities>

<action id="a1">
<realisation xsi:type="Assignment">
<result xsi:type="FloatVariable" name="foo" />
<term xsi:type="FloatValue" valueOf="PI" />
</realisation>
</action>

</otx>
Loading

0 comments on commit 3b96d85

Please sign in to comment.