-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (70 loc) · 3.14 KB
/
x86_64-ubuntu22-gcc11.yml
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
name: x86_64-ubuntu22-gcc11
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install compiler and stdlib
run: |
sudo apt-get install --no-install-recommends -y gcc-11 g++-11 cpp-11 libstdc++-11-dev libgtk2.0-dev python3-dev
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 800
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-11 800
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 800
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-11 800
#
# The following xorg/system dependencies are required when opencv has to be built from source
# and cannot be loaded from conan-center in a pre-built version (non-std-compiler/config).
# Most likly they are required for highgui features. You can install them manually or
# set tools.system.package_manager:mode=install and tools.system.package_manager:sudo=True
# in conan config to get them installed via conan install as shown further below in "Setup conan" step.
# But the conan config breaks with dependency caching mechanism from github actions so
# we prefer an explicit installation here.
#
sudo apt-get install --no-install-recommends -y \
libx11-xcb-dev libfontenc-dev libxaw7-dev libxmu-dev libxmuu-dev libxpm-dev libxres-dev \
libxss-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev libxcb-render-util0-dev \
libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev \
libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev libxcb-dri3-dev libxcb-cursor-dev \
libxcb-util-dev libxcb-util0-dev libxcb-glx0-dev libxcb-dri2-0-dev libxcb-present-dev libxcb-composite0-dev \
libxcb-ewmh-dev libxcb-res0-dev libxkbfile-dev
#
# numpy is required to get boost.python compiled via conan recipe
#
pip3 install numpy
- name: Install conan
uses: turtlebrowser/get-conan@main
with:
version: 1.64.1
- name: Setup conan
run: etc/conan-config.sh gcc 11
- name: Cache/Restore dependencies
uses: actions/cache@v4
with:
path: ~/.conan
key: ${{ runner.os }}-${{ github.workflow }}-conanfile-${{ hashFiles('conanfile.py') }}
- name: Install dependencies
run: etc/conan-install.sh Release
- name: Build
run: |
etc/cmake-config.sh Release
etc/cmake-build.sh Release -- -j
- name: Unit-Test C++
run: |
etc/install-uic-keys.sh
build/Release/bin/ticket-decoder-test
- name: Unit-Test Python3
run: etc/python-test.sh
- name: Archive artifacts
uses: actions/upload-artifact@v4
with:
name: ticket-decoder
path: |
build/Release/etc/*
build/Release/lib/*
build/Release/bin/*