CORDIC_Rotate_APFX/.github/workflows/docker.yml
2022-02-14 15:55:30 +01:00

36 lines
1.4 KiB
YAML

name: CMakeDocker
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build the docker image
run: docker build -t local/arch ${{ github.workspace }}/.github/docker
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: docker run -v ${{ github.workspace }}:/repo local/arch cmake -B /repo/build -S /repo -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DENABLE_XILINX=OFF -DENABLE_TESTING=ON
- name: Build
# Build your program with the given configuration
run: docker run -v ${{ github.workspace }}:/repo local/arch cmake --build /repo/build --config ${{ env.BUILD_TYPE }}
- name: Test
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: docker run -v ${{ github.workspace }}:/repo --workdir=/repo/build local/arch ctest -C ${{env.BUILD_TYPE}}