Skip to content

Commit

Permalink
initial gitpod configuration
Browse files Browse the repository at this point in the history
* setup worker:
   * build tools
   * QT5.15 from ppa
* build KDDockWidgets
* build perf
* build hotspot
* x11 config allowing to preview the GUI
  • Loading branch information
GitMensch committed Oct 30, 2023
1 parent 33dbc44 commit f93407b
Showing 1 changed file with 115 additions and 0 deletions.
115 changes: 115 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@

# X11 default option to be able to test th result in the browser
image: gitpod/workspace-full-vnc
ports:
- port: 5900
onOpen: ignore
- port: 6080
onOpen: open-preview

# build tasks, run in order but waiting on sync-points
# last one is seen first
tasks:

- name: setup coding environment on Ubuntu 20.04
before: |
# note: sadly we need this to be done every time as only /workspace is kept, but linked
# against those dependencies; and also we do want to recompile after adjustments
# this can all be dropped as soon as we can use a prepared docker
sudo add-apt-repository ppa:beineri/opt-qt-5.15.4-focal -y
sudo add-apt-repository ppa:kubuntu-ppa/backports -y
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y qt515base qt515svg qt515x11extras cmake libdwarf-dev mesa-common-dev \
libboost-iostreams-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev \
build-essential curl git wget autotools-dev autoconf libtool liblzma-dev libz-dev gettext cmake \
libzstd-dev ninja-build libdw-dev libelf-dev extra-cmake-modules \
libkf5archive-dev libkf5threadweaver-dev libkf5i18n-dev libkf5configwidgets-dev \
libkf5coreaddons-dev libkf5itemviews-dev libkf5itemmodels-dev libkf5kio-dev libkf5parts-dev \
libkf5solid-dev libkf5windowsystem-dev libkf5notifications-dev libkf5iconthemes-dev \
libqt5svg5-dev libqcustomplot-dev libkf5syntaxhighlighting-dev \
libqt5x11extras5-dev # this one is optional for Hotspot, but required for KDDockWidgets
gp sync-done system-prepare
- name: manual addition of KDDockWidgets (once)
env:
KDDW_VER: 1.6.0
before: |
gp sync-await system-prepare
init: |
cd /workspace
wget https://github.com/KDAB/KDDockWidgets/releases/download/v$KDDW_VER/kddockwidgets-$KDDW_VER.tar.gz
tar -xf kddockwidgets-$KDDW_VER.tar.gz
cd kddockwidgets-$KDDW_VER
export PATH="/opt/bin:/opt/qt515/bin:${PATH}"
export PKG_CONFIG_PATH="/opt/qt515/lib/pkgconfig:${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH="/opt/qt515/lib:/opt/qt515/lib/x86_64-linux-gnu"
cmake -DCMAKE_INSTALL_PREFIX=/opt/KDAB .
command: |
gp sync-done kddw-prepared
- name: manual addition of KDDockWidgets (install)
env:
KDDW_VER: 1.6.0
command: |
gp sync-await kddw-prepared
cd /workspace/kddockwidgets-$KDDW_VER
make -j $(nproc) && sudo make install
gp sync-done kddw-installed
- name: manual addition of perf
env:
PERF_VER: perf-tools-for-v5.15-2021-09-11
# KERNEL_REPO: git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git not full featured git server, so mirror
KERNEL_REPO: https://github.com/torvalds/linux.git
before: |
gp sync-await system-prepare
sudo apt install -y linux-tools-generic libpython2.7 # to have the general perf and depedencies setup
init: |
gp sync-await system-prepare
sudo apt install -y bison flex libelf-dev libnewt-dev libdw-dev libaudit-dev libiberty-dev libunwind-dev \
libcap-dev libzstd-dev liblzma-dev libnuma-dev libssl-dev systemtap-sdt-dev libbabeltrace-ctf-dev \
libperl-dev \
binutils-dev gcc-multilib \
python2-dev
# python3-dev python3-setuptools - python3 only with newer versions
# libgtk2.0-dev still not found
# asciidoc optional, only for manpages, depdencies are huge
cd /workspace
git clone --depth 1 --filter=blob:none --sparse $KERNEL_REPO
cd linux
git sparse-checkout set tools scripts arch
git fetch --depth 1 origin $PERF_VER
# hack for newer binutils which dropped bfd_get_section_*
make -C tools/perf CC="gcc -Dbfd_get_section_size=bfd_section_size -Dbfd_get_section_flags\(h,s\)=bfd_section_flags\(s\) -Dbfd_get_section_vma\(h,s\)=bfd_section_vma\(s\)"
command: |
gp sync-done perf-prepared
PERF_EXEC_PATH=/workspace/linux/tools/perf PATH=/workspace/linux/tools/perf:${PATH} perf --version
- name: aditional checking tools
before: |
gem install mdl
- name: actual building and running of hotspot
before: | # necessary when re-running the workspace
export PATH="/opt/bin:/opt/qt515/bin:${PATH}"
export PKG_CONFIG_PATH="/opt/qt515/lib/pkgconfig:${PKG_CONFIG_PATH}"
export LD_LIBRARY_PATH="/opt/qt515/lib:/opt/qt515/lib/x86_64-linux-gnu"
export PERF_EXEC_PATH="/workspace/linux/tools/perf"
export PATH"=/workspace/linux/tools/perf:${PATH}"
init: |
mkdir -p build
cd build
gp sync-await kddw-installed
cmake -DCMAKE_INSTALL_PREFIX=/opt/KDAB ..
make -j $(nproc)
command: |
gp sync-await kddw-installed
gp sync-await perf-prepared
$GITPOD_REPO_ROOTS/build/bin/hotspot $GITPOD_REPO_ROOTS/tests/integrationtests/custom_cost_aggregation_testfiles/custom_cost_aggregation.perfparser
# some config to ease working in the browser
vscode:
extensions:
- llvm-vs-code-extensions.vscode-clangd
- twxs.cmake

0 comments on commit f93407b

Please sign in to comment.