This repository has been archived by the owner on Nov 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (77 loc) · 2.89 KB
/
compile.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# @Organization: SUSTech
# @Author: nanoseeds
# @Date: 2020-07-28 22:43:03
# @LastEditors: nanoseeds
#@LastEditTime: 2020-07-28 23:43:03
# This is a basic workflow to help you get started with Actions
name: Build and CTest
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on: [push, pull_request]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
windows:
name: windows-no-opencv
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout code
uses: actions/checkout@v2
- name: ensure the cmake
run: cmake --version
- name: prepare folder
run: cmake -E make_directory ./CMAKE_DEBUG_PATH
- name: cmake prepare for compile
working-directory: ./CMAKE_DEBUG_PATH
run: cmake .. -DCMAKE_BUILD_TYPE=DEBUG
- name: cmake compile
working-directory: ./CMAKE_DEBUG_PATH
run: cmake --build . --config DEBUG --parallel
- name: cmake test
working-directory: ./CMAKE_DEBUG_PATH
run: ctest
unix-like:
name: unix-with-opencv
# The type of runner that the job will run on
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-latest]
gcc_v: [11] # Version of G++,GCC
env:
GCC_V: ${{ matrix.gcc_v }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: checkout code
uses: actions/checkout@v2
- name: Install GCC-11,G++-11
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${GCC_V} g++-${GCC_V}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_V} 111
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_V} 111
- name: prepare libopencv
run: |
sudo apt update
sudo apt install libopencv-dev
- name: ensure the cmake
run: cmake --version
- name: prepare folder
run: cmake -E make_directory ./CMAKE_DEBUG_PATH
- name: cmake prepare for compile
working-directory: ./CMAKE_DEBUG_PATH
run: cmake .. -DCMAKE_BUILD_TYPE=DEBUG
- name: cmake compile
working-directory: ./CMAKE_DEBUG_PATH
run: cmake --build . --config DEBUG --parallel
- name: cmake test
working-directory: ./CMAKE_DEBUG_PATH
run: ctest