diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c306d5b16..775cf0aa3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: with: submodules: true - name: Install Test Dependencies - run: ${{github.workspace}}/build-scripts/for-linux/prepare-debian-for-tests.sh + run: ${{github.workspace}}/build-scripts/for-linux/prepare-debian-based.sh - name: Build working-directory: ${{github.workspace}} diff --git a/build-scripts/for-linux/prepare-cpptrace.bash b/build-scripts/for-linux/prepare-cpptrace.bash new file mode 100755 index 000000000..090e61ec6 --- /dev/null +++ b/build-scripts/for-linux/prepare-cpptrace.bash @@ -0,0 +1,23 @@ +#!/bin/bash + +set -e + +CPP_TRACE_VERSION="0.4.1" + +# Install cpptrace from sources +if ! ls /usr/local/lib*/libcpptrace.a &> /dev/null +then + BUILD_DIR=`mktemp -d` + pushd $BUILD_DIR + wget https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/v$CPP_TRACE_VERSION.tar.gz + tar -xf v$CPP_TRACE_VERSION.tar.gz + cd cpptrace-$CPP_TRACE_VERSION + mkdir -p build + cd build + cmake .. -DCMAKE_BUILD_TYPE=Release + make -j`nproc` + sudo make install + popd +else + echo "Cpptrace is already installed" +fi diff --git a/build-scripts/for-linux/prepare-debian-based.sh b/build-scripts/for-linux/prepare-debian-based.sh index a3898d41b..da84de1a7 100755 --- a/build-scripts/for-linux/prepare-debian-based.sh +++ b/build-scripts/for-linux/prepare-debian-based.sh @@ -64,6 +64,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ docbook-xsl \ dpkg-dev \ file \ + gcovr \ gettext \ imagemagick \ pkg-config \ @@ -83,6 +84,7 @@ sudo DEBIAN_FRONTEND=noninteractive apt-get install -y \ libcurl4-openssl-dev:$TARGET_ARCH # download and install additional packages + mkdir -p deb pushd deb @@ -105,4 +107,7 @@ fi # installing on other systems. Remove the version if dpkg -s libwxgtk3.2-dev 2>/dev/null && ! grep -q libwx /etc/dpkg/shlibs.override; then cut -d " " -f 1-3 /var/lib/dpkg/info/libwx*3.2*.shlibs | sudo sh -c "cat >>/etc/dpkg/shlibs.override" -fi \ No newline at end of file +fi + +# install cpptrace +$DIR/prepare-cpptrace.bash diff --git a/build-scripts/for-linux/prepare-debian-for-tests.sh b/build-scripts/for-linux/prepare-debian-for-tests.sh deleted file mode 100755 index b3c3986de..000000000 --- a/build-scripts/for-linux/prepare-debian-for-tests.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -set -e - -DIR=`dirname $0` -$DIR/../for-linux/prepare-debian-based.sh wx32 amd64 - -# Install requirements for tests infrastructure -sudo DEBIAN_FRONTEND=noninteractive apt-get install -y gcovr - -# Install cpptrace from sources -if ! ls /usr/local/lib | grep libcpptrace &> /dev/null -then - CPP_TRACE="0.4.1" - CPP_TRACE_VERSION="v$CPP_TRACE" - mkdir -p cpptrace - pushd cpptrace - wget https://github.com/jeremy-rifkin/cpptrace/archive/refs/tags/$CPP_TRACE_VERSION.tar.gz - tar -xf $CPP_TRACE_VERSION.tar.gz - cd cpptrace-$CPP_TRACE - mkdir -p build - cd build - cmake .. -DCMAKE_BUILD_TYPE=Release - make -j$PARALELL_PRMS - sudo make install - popd -else - echo "Cpptrace is already installed" -fi diff --git a/build-scripts/for-linux/prepare-fedora.sh b/build-scripts/for-linux/prepare-fedora.sh index 341054f50..f4d9912e7 100755 --- a/build-scripts/for-linux/prepare-fedora.sh +++ b/build-scripts/for-linux/prepare-fedora.sh @@ -6,8 +6,12 @@ WX_PKG_NAME=wxGTK-devel [[ "$1" == "wx30" ]] && WX_PKG_NAME=wxGTK3-devel +DIR=`dirname $0` + set -e sudo dnf install -y \ - cmake gcc-c++ make gettext docbook-style-xsl zip po4a ImageMagick rpm-build \ + cmake gcc-c++ make gettext docbook-style-xsl gcovr zip po4a ImageMagick rpm-build \ pipewire-jack-audio-connection-kit-devel fftw-devel zlib-devel wavpack-devel \ $WX_PKG_NAME alsa-lib-devel systemd-devel yaml-cpp-static dpkg-dev libcurl-devel + +$DIR/prepare-cpptrace.bash