Skip to content

try GH actions

try GH actions #4

Workflow file for this run

name: Test Workflow
on: [push, pull_request]
env:
LLVM_VERSION: 15
jobs:
debug:
if: github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ['clang', 'gcc']
include:
- toolchain: gcc
c-compiler: gcc
cxx-compiler: g++
- toolchain: clang
c-compiler: clang
cxx-compiler: clang++
steps:
- uses: actions/checkout@v4
- run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh $LLVM_VERSION
sudo apt update -y && sudo apt upgrade -y
sudo apt-get -y install gcc-multilib g++-multilib clang-tidy-$LLVM_VERSION
sudo update-alternatives --install /usr/bin/clang-tidy clang-tidy /usr/bin/clang-tidy-$LLVM_VERSION 50
clang-tidy --version
- run: >
cmake
-B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
ocvsmd
- working-directory: ${{github.workspace}}/build
run: |
make VERBOSE=1
make test
- uses: actions/upload-artifact@v3
if: always()
with:
name: ${{github.job}}
path: ${{github.workspace}}/**/*
retention-days: 2
optimizations:
if: github.event_name == 'push'
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ['clang', 'gcc']
build_type: [Release, MinSizeRel]
include:
- toolchain: gcc
c-compiler: gcc
cxx-compiler: g++
- toolchain: clang
c-compiler: clang
cxx-compiler: clang++
steps:
- uses: actions/checkout@v4
- run: |
sudo apt update -y && sudo apt upgrade -y
sudo apt install gcc-multilib g++-multilib
- run: >
cmake
-B ${{ github.workspace }}/build
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_C_COMPILER=${{ matrix.c-compiler }}
-DCMAKE_CXX_COMPILER=${{ matrix.cxx-compiler }}
-DNO_STATIC_ANALYSIS=1
ocvsmd
- working-directory: ${{github.workspace}}/build
run: |
make VERBOSE=1
make test
- uses: actions/upload-artifact@v3
if: always()
with:
name: ${{github.job}}
path: ${{github.workspace}}/**/*
retention-days: 2
style_check:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DoozyX/[email protected]
with:
source: './include ./test ./src'
extensions: 'c,h,cpp,hpp'
clangFormatVersion: ${{ env.LLVM_VERSION }}