# PCO setup in Ansible playbook - name: Install all DNF dependencies on Fedora tags: s3,pco become: true when: ansible_facts['os_family'] == "RedHat" ansible.builtin.dnf: name: ## Only for the first lab, we need pandas and matplotlib for timestamps exo - python3-pip # Qt5, Cmake and other tools - git - cmake - qt5-qtbase-devel - qtchooser # GoogleTest - gtest - gtest-devel ## Dependency for labo with Train simulation: QtMultimedia - qt5-qtmultimedia - qt5-qtmultimedia-devel ## Dependency for labo with Engines: QtSvg - qt5-qtsvg - qt5-qtsvg-devel ## Google benchmark on labo with quick sort - google-benchmark - google-benchmark-devel - name: Install all APT dependencies on Ubuntu tags: s3,pco become: true when: ansible_facts['os_family'] == "Debian" ansible.builtin.apt: update_cache: true # run apt update before name: # Qt5 basics + GoogleTest - build-essential - git - cmake - qtbase5-dev - qt5-qmake - libgtest-dev ## Dependency for labo with Train simulation: QtMultimedia ## From: https://stackoverflow.com/questions/26948466/project-error-unknown-modules-in-qt-multimedia - qtmultimedia5-dev - libqt5multimediawidgets5 - libqt5multimedia5-plugins - libqt5multimedia5 ## Dependency for labo with Engines: QtSvg - libqt5svg5 - libqt5svg5-dev ## Google benchmark on labo with quick sort - libbenchmark-dev ## Only for the first lab, we need pandas and matplotlib for timestamps exo - python3-pandas - python3-matplotlib - name: Install pandas and matplotlib on Fedora via pip because they are libraries tags: s3,pco when: ansible_facts['os_family'] == "RedHat" # on Ubuntu, use python3-* packages ! community.general.pipx: name: - pandas - matplotlib # 3 steps to compile, install pcosynchro and cleanup. Mostly to only give root access to the installation steps, not the others. - name: Compile pcosynchro library tags: s3,pco ansible.builtin.shell: cmd: | ## Compile pcosynchro C++ library in /tmp cd /tmp git clone https://reds-gitlab.heig-vd.ch/reds-public/pco-synchro.git cd pco-synchro/lib/pcosynchro/ qmake-qt5 || qmake make -j8 args: creates: /usr/local/lib/libpcosynchro.a - name: Install pcosynchro library globally tags: s3,pco become: true ansible.builtin.shell: cmd: | cd /tmp/pco-synchro/lib/pcosynchro/ make install args: creates: /usr/local/lib/libpcosynchro.a - name: Install cmr via lxup get tags: s3,pco ansible.builtin.command: fish -c 'lxup get cmr' args: creates: "~/.config/fish/functions/cmr.fish" - name: Install xtimes via cargo install tags: s3,pco ansible.builtin.command: cargo install --git https://codeberg.org/samuelroland/productivity xtimes # Remove idempotence for now to make sure more people have the latest version # args: # creates: "~/.cargo/bin/xtimes" - name: Make sure we can build a small PCO project tags: s3,pco ansible.builtin.shell: cmd: | cd /tmp export SCR_TMP_FOLDER=. export SCR_EDITOR=cat command rm -rf /tmp/scratch-pco-* fish -c "scr pco" fish -c "cd scratch-pco-* && r" | grep "Thread"