Skip to content

updated the trigger #18

updated the trigger

updated the trigger #18

Workflow file for this run

name: Generate Release version info
on:
push:
tags:
- "v*.*.*" # vYY.MM.Patch example v23.08.00 etc.
### modify here for update #####################################################
env:
SENSING_DEV_V24_01: v24.01.04
SENSING_DEV_V24_05: v24.05.10
SENSING_DEV_V24_09: v24.09.08
################################################################################
jobs:
set_env:
runs-on: ubuntu-22.04
outputs:
ref_name: ${{ steps.get_ref_name.outputs.ref_name }}
SENSING_DEV_V24_01: ${{ steps.set_vars.outputs.SENSING_DEV_V24_01 }}
SENSING_DEV_V24_05: ${{ steps.set_vars.outputs.SENSING_DEV_V24_05 }}
SENSING_DEV_V24_09: ${{ steps.set_vars.outputs.SENSING_DEV_V24_09 }}
steps:
- name: Get the ref name
id: get_ref_name
run: |
echo "ref_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT
- name: Set environment variables
id: set_vars
run: |
echo "SENSING_DEV_V24_01=${{ env.SENSING_DEV_V24_01}}" >> $GITHUB_OUTPUT
echo "SENSING_DEV_V24_05=${{ env.SENSING_DEV_V24_05}}" >> $GITHUB_OUTPUT
echo "SENSING_DEV_V24_09=${{ env.SENSING_DEV_V24_09}}" >> $GITHUB_OUTPUT
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/[email protected]
with:
ref: ${{ needs.set_env.outputs.ref_name }}
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11.4"
- name: Create config for Linux and Windows
run: |
cd installer
mkdir build && cd build
python -m pip install --upgrade pip
pip install -r ${{ github.workspace }}/installer/src/requirements.txt
python ${{ github.workspace }}/installer/src/generate_config.py -v ${{ github.ref_name }}
- name: Upload a Build Artifact
uses: actions/upload-artifact@v4
with:
name: test-cases
path: |
${{ github.workspace }}/installer/testcases
${{ github.workspace }}/build
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ github.workspace }}/build/*
${{ github.workspace }}/installer/tools/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
################################################################################
#
# Test to install Linux with released installer
#
################################################################################
linux_installation:
runs-on: ${{ matrix.os }}
needs: [set_env, release]
strategy:
matrix:
os: [ubuntu-22.04]
version : ["--version ${{ needs.set_env.outputs.ref_name }}", "--version ${{ needs.set_env.outputs.SENSING_DEV_V24_05 }}", ""]
with_openCV : ["", "--install-opencv"]
with_gst_option: ["", "--install-gst-tools", "--install-gst-tools --install-gst-plugin"]
exclude:
# InstallGstTools is not on the release version yet
- version: "--version ${{ needs.set_env.outputs.SENSING_DEV_V24_05 }}"
with_gst_option: "--install-gst-tools"
- version: "--version ${{ needs.set_env.outputs.SENSING_DEV_V24_05 }}"
with_gst_option: "--install-gst-tools --install-gst-plugin"
- version: ""
with_gst_option: "--install-gst-tools"
- version: ""
with_gst_option: "--install-gst-tools --install-gst-plugin"
steps:
- name: Download installer & install
run: |
mkdir setup_dir && cd setup_dir
wget -O setup.sh https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/setup.sh
chmod +x ${GITHUB_WORKSPACE}/setup_dir/setup.sh
sudo bash setup.sh ${{ matrix.version }} ${{ matrix.with_openCV }} ${{ matrix.with_gst_option }} --verbose
- name: Check if version_info.json exists (v24.05 or later)
id: check_version_info
uses: andstor/file-existence-action@v3
with:
files: "/opt/sensing-dev/version_info.json"
fail: true
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
name: test-cases
path: download
- name: Test Aravis installation and Path (v24.01 or later)
run: |
export LD_LIBRARY_PATH=/opt/sensing-dev/lib:/opt/sensing-dev/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
cd ${{ github.workspace }}/download/installer/testcases/cpp/aravis_test
python_output=$(python ${{ github.workspace }}/download/installer/testcases/cpp/get_compile_command.py aravis_test.cpp)
echo "Python script output: $python_output"
eval "$python_output"
./aravis_test
- name: Test ion-kit (v24.01 or later)
run: |
export LD_LIBRARY_PATH=/opt/sensing-dev/lib:/opt/sensing-dev/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
cd ${{ github.workspace }}/download/installer/testcases/cpp/ionkit_test
python_output=$(python ${{ github.workspace }}/download/installer/testcases/cpp/get_compile_command.py ionkit_test.cpp)
echo "Python script output: $python_output"
eval "$python_output"
./ionkit_test
- name: Test opencv (v24.01 or later)
if: ${{ (matrix.with_openCV == '--install-opencv') }}
run: |
export LD_LIBRARY_PATH=/opt/sensing-dev/lib:/opt/sensing-dev/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
cd ${{ github.workspace }}/download/installer/testcases/cpp/opencv_test
python_output=$(python ${{ github.workspace }}/download/installer/testcases/cpp/get_compile_command.py opencv_test.cpp)
echo "Python script output: $python_output"
eval "$python_output"
./opencv_test
- name: Test gst-inspect-1.0 (v24.12 or later)
if: ${{ matrix.with_gst_option == '--install-gst-tools' || matrix.with_gst_option == '--install-gst-tools --install-gst-plugin'}}
run: |
gst-inspect-1.0
- name: Test gstreamer core with plugin (v24.12 or later)
if: ${{ matrix.with_gst_option == '--install-gst-tools --install-gst-plugin' }}
run: |
gst-inspect-1.0 queue
- name: Test gst-plugin-base (v24.12 or later)
if: ${{ matrix.with_gst_option == '--install-gst-tools --install-gst-plugin' }}
run: |
gst-inspect-1.0 videoconvert
- name: Test gst-plugin-good (v24.12 or later)
if: ${{ matrix.with_gst_option == '--install-gst-tools --install-gst-plugin' }}
run: |
gst-inspect-1.0 multifilesrc
- name: Test gst-inspect-1.0 aravissrc (v24.12 or later)
if: ${{ matrix.with_gst_option == '--install-gst-tools --install-gst-plugin' }}
run: |
export GST_PLUGIN_PATH=/opt/sensing-dev/lib/x86_64-linux-gnu/gstreamer-1.0/:$GST_PLUGIN_PATH
export LD_LIBRARY_PATH=/opt/sensing-dev/lib:/opt/sensing-dev/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH
gst-inspect-1.0 aravissrc
- name: Test gst-inspect-1.0 gendcseparator (v24.12 or later)
if: ${{ matrix.with_gst_option == '--install-gst-tools --install-gst-plugin' }}
run: |
export GST_PLUGIN_PATH=/opt/sensing-dev/lib/x86_64-linux-gnu/gstreamer-1.0/:$GST_PLUGIN_PATH
gst-inspect-1.0 gendcseparator
################################################################################
#
# Test to install Windows with released installer
#
################################################################################
windows_installation:
runs-on: ${{ matrix.os }}
needs: [set_env, release]
strategy:
matrix:
os: [windows-2019, windows-latest]
version : ["-version ${{ needs.set_env.outputs.ref_name }}", ""]
with_openCV : ["", "-InstallOpenCV"]
with_gst_option : ["", "-InstallGstTools", "-InstallGstTools -InstallGstPlugins"]
include:
# past version only supports full-option with the latest installer.ps1
# -InstallOpenCV is valid on v24.09 or later on windows-2022
- os: windows-2019
with_openCV: "-InstallOpenCV"
with_gst_option : ""
version: "-version ${{ needs.set_env.outputs.SENSING_DEV_V24_05 }}"
- os: windows-2019
with_openCV: "-InstallOpenCV"
with_gst_option : ""
version: "-version ${{ needs.set_env.outputs.SENSING_DEV_V24_01 }}"
- os: windows-2022
with_openCV: "-InstallOpenCV"
with_gst_option : ""
version: "-version ${{ needs.set_env.outputs.SENSING_DEV_V24_09 }}"
- os: windows-2019
with_openCV: "-InstallOpenCV"
with_gst_option : ""
version: "-version ${{ needs.set_env.outputs.SENSING_DEV_V24_09 }}"
exclude:
# skip the following combination since the latest is v24.09 for now
- version: ""
with_gst_option: "-InstallGstTools"
- version: ""
with_gst_option: "-InstallGstTools -InstallGstPlugins"
steps:
- name: Download installer & install
run: |
$url = "https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/installer.ps1"
Invoke-WebRequest $url -OutFile .\installer.ps1
powershell.exe -ExecutionPolicy Bypass -File .\installer.ps1 ${{ matrix.version }} ${{ matrix.with_openCV }} ${{ matrix.with_gst_option }} -verbose
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
name: test-cases
path: download
- name: Check if version_info.json exists (v24.05 or later)
if: ${{ matrix.version != format('-version {0}', env.SENSING_DEV_V24_01) }}
run: |
$SENSING_DEV_ROOT= [Environment]::GetEnvironmentVariable("SENSING_DEV_ROOT", "User")
$target_file = Join-Path -Path "$SENSING_DEV_ROOT" -ChildPath "version_info.json"
if (Test-Path $target_file){
echo "version_info.json exists."
} else{
echo "version_info.json does not exist."
exit 1
}
- name: Test Aravis installation and Path (v24.01 or later)
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$SENSING_DEV_ROOT= [Environment]::GetEnvironmentVariable("SENSING_DEV_ROOT", "User")
$env:PATH="$env:PATH;$PATH"
$env:SENSING_DEV_ROOT=${SENSING_DEV_ROOT}
cd ${{ github.workspace }}/download/installer/testcases/cpp/aravis_test && cmake ./
cmake --build . --config Release
cd Release && ls && ./aravis_test
- name: Test ion-kit (v24.01 or later)
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$SENSING_DEV_ROOT= [Environment]::GetEnvironmentVariable("SENSING_DEV_ROOT", "User")
$env:PATH="$env:PATH;$PATH"
$env:SENSING_DEV_ROOT=${SENSING_DEV_ROOT}
cd ${{ github.workspace }}/download/installer/testcases/cpp/ionkit_test && cmake ./
cmake --build . --config Release
cd Release && ls && ./ionkit_test
- name: Test opencv (general)
if: ${{(matrix.with_openCV == '-InstallOpenCV')}}
run: |
$sensingdevShortVersion = '${{ matrix.version }}' -replace "-version ", ""
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$SENSING_DEV_ROOT= [Environment]::GetEnvironmentVariable("SENSING_DEV_ROOT", "User")
$env:SENSING_DEV_ROOT=${SENSING_DEV_ROOT}
$env:PATH="$env:PATH;$PATH"
cd ${{ github.workspace }}/download/installer/testcases/cpp/opencv_test && cmake ./ -DSDK_VERSION="$sensingdevShortVersion"
cmake --build . --config Release
cd Release && ls && ./opencv_test
- name: Test gst-inspect-1.0 and gstreamer (v24.12 or later)
if: ${{ matrix.with_gst_option == '-InstallGstTools' || matrix.with_gst_option == '-InstallGstTools -InstallGstPlugins'}}
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$env:PATH="$env:PATH;$PATH"
$env:GST_PLUGIN_PATH=[Environment]::GetEnvironmentVariable("GST_PLUGIN_PATH", "User")
gst-inspect-1.0
- name: Test gstreamer core with plugin (v24.12 or later)
if: ${{ matrix.with_gst_option == '-InstallGstTools -InstallGstPlugins' }}
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$env:PATH="$env:PATH;$PATH"
$env:GST_PLUGIN_PATH=[Environment]::GetEnvironmentVariable("GST_PLUGIN_PATH", "User")
gst-inspect-1.0 queue
- name: Test gst-plugin-base (v24.12 or later)
if: ${{ matrix.with_gst_option == '-InstallGstTools -InstallGstPlugins' }}
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$env:PATH="$env:PATH;$PATH"
$env:GST_PLUGIN_PATH=[Environment]::GetEnvironmentVariable("GST_PLUGIN_PATH", "User")
gst-inspect-1.0 videoconvert
- name: Test gst-plugin-good (v24.12 or later)
if: ${{ matrix.with_gst_option == '-InstallGstTools -InstallGstPlugins' }}
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$env:PATH="$env:PATH;$PATH"
$env:GST_PLUGIN_PATH=[Environment]::GetEnvironmentVariable("GST_PLUGIN_PATH", "User")
gst-inspect-1.0 multifilesrc
- name: Test gst-inspect-1.0 aravissrc (v24.12 or later)
if: ${{ matrix.with_gst_option == '-InstallGstTools' || matrix.with_gst_option == '-InstallGstTools -InstallGstPlugins'}}
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$env:PATH="$env:PATH;$PATH"
$env:GST_PLUGIN_PATH=[Environment]::GetEnvironmentVariable("GST_PLUGIN_PATH", "User")
gst-inspect-1.0 aravissrc
- name: Test gst-inspect-1.0 gendcseparator (v24.12 or later)
if: ${{ matrix.with_gst_option == '-InstallGstTools' || matrix.with_gst_option == '-InstallGstTools -InstallGstPlugins'}}
run: |
$PATH = [Environment]::GetEnvironmentVariable("PATH", "User")
$env:PATH="$env:PATH;$PATH"
$env:GST_PLUGIN_PATH=[Environment]::GetEnvironmentVariable("GST_PLUGIN_PATH", "User")
gst-inspect-1.0 gendcseparator