Skip to content

[MV-2047][CI] Quote encapsulation of cmake GIT_COMMAND_GET_BRANCH #281

[MV-2047][CI] Quote encapsulation of cmake GIT_COMMAND_GET_BRANCH

[MV-2047][CI] Quote encapsulation of cmake GIT_COMMAND_GET_BRANCH #281

Workflow file for this run

name: All Build
on:
workflow_dispatch:
pull_request:
env:
#General variables
numpy_version: "numpy==1.23.4" # replace with only 'numpy' if no version needed
python_versions: 3.8
pybind_version: "2.6.0"
#Windows variables
python_executable: "C:/hostedtoolcache/windows/Python/3.8.10/x64/python.exe" #Cmake needs this to find python on windows
jobs:
container-ubuntu-20-job:
name: Build Ubuntu 20 Image
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=20.04
tags: prophesee/openeb:ubuntu-20.04
job1:
name: Ubuntu 20
needs: container-ubuntu-20-job
runs-on: ubuntu-20.04
container:
image: prophesee/openeb:ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: true
- name: Build openEB
run: |
cmake -B build -DBUILD_TESTING=ON
cmake --build build --config Release --parallel `nproc`
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
with:
workflow: upload_datasets.yaml
workflow_conclusion: success
name: datasets
path: datasets
- name: Run ctest
run: |
cd build
ctest --output-on-failure
container-ubuntu-22-job:
name: Build Ubuntu 22 Image
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.PSEE_DOCKER_HUB_USER }}
password: ${{ secrets.PSEE_DOCKER_HUB_ACCESS_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: utils/containers/Dockerfile.OpenEB
push: true
build-args: UBUNTU_VERSION=22.04
tags: prophesee/openeb:ubuntu-22.04
job2:
name: Ubuntu 22
needs: container-ubuntu-22-job
runs-on: ubuntu-22.04
container:
image: prophesee/openeb:ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
submodules: true
- name: Build openEB
run: |
mkdir build && cd build
cmake .. -DBUILD_TESTING=ON
cmake --build . --config Release --parallel 4
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
with:
workflow: upload_datasets.yaml
workflow_conclusion: success
name: datasets
path: datasets
- name: Run ctest
run: |
cd build
ctest --output-on-failure
job3:
name: Windows
runs-on: windows-2019
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2.2.2
with:
python-version: ${{ env.python_versions }}
- name: Download vcpkg binaries
uses: dawidd6/action-download-artifact@v2
with:
workflow: upload_win_binaries.yaml
workflow_conclusion: success
name: vcpkg_binaries
path: ".."
- name: Download ffmpeg archive
uses: dawidd6/action-download-artifact@v2
with:
workflow: upload_win_binaries.yaml
workflow_conclusion: success
name: ffmpeg_archive
path: ".."
- name: Install build and tests dependencies
shell: bash
run: |
cd ..
unzip -q "vcpkg-export.zip"
7z x ffmpeg-archive.7z
$python_executable -m pip install pytest $numpy_version opencv-python==4.5.5.64 torch==1.13.1 scipy sk-video==1.1.10 numba==0.56.3 h5py command_runner kornia==0.6.8 pytorch_lightning==1.8.6 pytorch_msssim==0.2.1
cd openeb
- name: Build openEB
shell: bash
run: |
export PATH=$PATH:`realpath ../ffmpeg-*-full_build/bin`
mkdir build && cd build
cmake -A x64 -DCMAKE_TOOLCHAIN_FILE="../cmake/toolchains/vcpkg.cmake" \
-DVCPKG_DIRECTORY=`realpath ../../vcpkg` \
-D Python3_EXECUTABLE=$python_executable \
-DBUILD_TESTING=ON ..
cmake --build . --config Release --parallel 4
- name: Getting datasets from storage
uses: dawidd6/action-download-artifact@v2
with:
workflow: upload_datasets.yaml
workflow_conclusion: success
name: datasets
path: datasets
- name: Ctest suite
shell: powershell
run: |
cd build
ctest -C Release --output-on-failure