Provide workflows 4 other arcs, os, compilers #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ubuntu22-clang14 | |
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 clang-14 libc++-14-dev libc++abi-14-dev lld-14 \ | |
libgtk2.0-dev python3-dev | |
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/clang-14 800 | |
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-14 800 | |
sudo update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-14 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.0 | |
- name: Setup conan | |
run: | | |
conan profile new ticket-decoder --detect | |
conan profile update settings.compiler=clang ticket-decoder | |
conan profile update settings.compiler.version=14 ticket-decoder | |
conan profile update settings.compiler.libcxx=libc++ ticket-decoder | |
# Unfortunately, this breaks with github-action caching machanism, so we prefer direct installation | |
# for xorg/system dependencies in pipeline (see comment in step "Install compiler and stdlib") | |
# | |
# conan profile update conf.tools.system.package_manager:mode=install ticket-decoder | |
# conan profile update conf.tools.system.package_manager:sudo_askpass=True ticket-decoder | |
- name: Cache conan dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.conan | |
key: ${{ runner.os }}-conanfile-${{ hashFiles('conanfile.py') }} | |
- name: Build | |
run: | | |
./setup.Release.sh -j | |
- name: Unit-Test C++ | |
run: | | |
wget 'https://railpublickey.uic.org/download.php' -O cert/UIC_PublicKeys.xml | |
build/Release/bin/ticket-decoder-test | |
- name: Unit-Test Python3 | |
run: | | |
export PYTHONPATH=`pwd`/build/Release/bin | |
python3 -m unittest discover -s source/test/python/ | |
- name: Archive artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ticket-decoder | |
path: | | |
build/Release/etc/* | |
build/Release/lib/* | |
build/Release/bin/* |