Skip to content

fix: Dockerfile to reduce vulnerabilities #594

fix: Dockerfile to reduce vulnerabilities

fix: Dockerfile to reduce vulnerabilities #594

Workflow file for this run

name: CMake
on: [push]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Debug
jobs:
build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create Build Directory
# Some projects don't allow in-source building, so create a separate build directory
# We'll use this as our working directory for all subsequent commands
run: mkdir ${{runner.workspace}}/build
- name: Current Working directory
shell: bash
working-directory: ${{runner.workspace}}/build
run: pwd
- name: Create Open cv directory
shell: bash
working-directory: ${{runner.workspace}}/build
run: mkdir opencv
- name: change directory
shell: bash
run: cd ${{runner.workspace}}/build/opencv
- name: List contents of working dir
shell: bash
working-directory: ${{runner.workspace}}/build
run: ls -ltr
- name: Change to current working directory
working-directory: ${{runner.workspace}}/build/opencv
shell: bash
run: cd ${{runner.workspace}}/build/opencv
- name: Create CMakeLists.txt
shell: bash
working-directory: ${{runner.workspace}}/build/opencv
run: touch CMakeLists.txt
- name: Install Open CV for Computer Vision artifacts
shell: bash
working-directory: ${{runner.workspace}}/build/opencv
run: sudo apt install libopencv-dev python3-opencv
- name: Run Cmake in Build environment
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake -E make_directory ${{runner.workspace}}/build
#- name: Configure CMake
# Use a bash shell so we can use the same syntax for environment variable
# access regardless of the host operating system
# shell: bash
# working-directory: ${{runner.workspace}}/build/opencv
# Note the current convention is to use the -S and -B options here to specify source
# and build directories, but this is only available with CMake 3.13 and higher.
# The CMake binaries on the Github Actions machines are (as of this writing) 3.12
# run: cmake ${{runner.workspace}}/build/opencv -DCMAKE_BUILD_TYPE=$BUILD_TYPE
# - name: Build
# shell: bash
# working-directory: ${{runner.workspace}}/build/opencv
# Execute the build. You can specify a specific target with "--target <NAME>"
# run: cmake --build --config $BUILD_TYPE --target $GITHUB/CMakeLists.txt
- name: Test
shell: bash
working-directory: ${{runner.workspace}}
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C $BUILD_TYPE