check the generaetd files #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Release version info | |
on: | |
push: | |
tags: | |
- "v*.*.*" # vYY.MM.Patch example v23.08.00 etc. | |
jobs: | |
set_env: | |
runs-on: ubuntu-22.04 | |
outputs: | |
ref_name: ${{ steps.get_ref_name.outputs.ref_name }} | |
steps: | |
- name: Get the ref name | |
id: get_ref_name | |
run: echo "ref_name=${{ github.ref_name }}" >> $GITHUB_OUTPUT | |
release: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/[email protected] | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.11.4" | |
- name: Create config for Linux | |
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 }} | |
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 v24.05.06", ""] | |
with_openCV : ["", "--install-opencv"] | |
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 }} --verbose | |
- name: Check if version_info.json exists | |
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 | |
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 | |
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 | |
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 | |
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 }}", "-version v24.05.06", "-version v24.01.04", ""] | |
with_openCV : ["", "-InstallOpenCV"] | |
exclude: | |
- os: windows-latest | |
with_openCV: "-InstallOpenCV" | |
version: "-version 24.05.06" | |
- os: windows-latest | |
with_openCV: "-InstallOpenCV" | |
version: "-version 24.01.04" | |
- os: windows-latest | |
with_openCV: "-InstallOpenCV" | |
version: "" | |
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 }} -verbose | |
- name: Download All Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: test-cases | |
path: download | |
- name: Check if version_info.json exists | |
if: ${{ ! (matrix.version == '-version v24.01.04') }} | |
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 | |
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 | |
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.os == 'windows-2019') && (matrix.with_openCV == '-InstallOpenCV') && !(matrix.version == '-version v24.01.04')}} | |
run: | | |
$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 ./ | |
cmake --build . --config Release | |
cd Release && ls && ./opencv_test | |
- name: Test opencv (-version v24.01.04) | |
if: ${{ matrix.version == '-version v24.01.04' }} | |
run: | | |
$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_v240104 && cmake ./ | |
cmake --build . --config Release | |
cd Release && ls && ./opencv_test |