Commit d23422d0 authored by Nicolás Alvarez's avatar Nicolás Alvarez Committed by Nicolás Alvarez
Browse files

gitlab-ci: use eatmydata in apt-get

apt-get uses several fsync() calls on each package it installs, and that's
very slow, especially on non-SSD. eatmydata turns fsync into no-op, which
makes package installation much faster (it can cause corruption if there's
power loss or similar, but that doesn't matter in CI where we throw away
the whole container anyway).

Currently the build_ubuntu_20_04 job in GitLab CI takes 8-9 minutes to
install dependencies. Using eatmydata it went down to 2 minutes.
parent eb548b00
Pipeline #39237 passed with stage
in 20 minutes and 51 seconds
......@@ -13,8 +13,9 @@ build_ubuntu_20_04:
before_script:
- sed -i -e 's/# deb-src/deb-src/g' /etc/apt/sources.list
- apt-get update
- apt-get build-dep --yes --no-install-recommends okular
- apt-get install --yes --no-install-recommends ninja-build
- apt-get install --yes eatmydata
- eatmydata apt-get build-dep --yes --no-install-recommends okular
- eatmydata apt-get install --yes --no-install-recommends ninja-build
script:
- mkdir -p build && cd build
- cmake -DOKULAR_UI=desktop -G Ninja ..
......@@ -31,8 +32,9 @@ build_clazy_clang_tidy:
before_script:
- echo 'deb-src http://deb.debian.org/debian unstable main' >> /etc/apt/sources.list
- apt-get update
- apt-get build-dep --yes --no-install-recommends okular
- apt-get install --yes --no-install-recommends ninja-build clazy clang clang-tidy libkf5crash-dev libkf5purpose-dev libegl-dev jq
- apt-get install --yes eatmydata
- eatmydata apt-get build-dep --yes --no-install-recommends okular
- eatmydata apt-get install --yes --no-install-recommends ninja-build clazy clang clang-tidy libkf5crash-dev libkf5purpose-dev libegl-dev jq
script:
- srcdir=`pwd` && mkdir -p /tmp/okular_build && cd /tmp/okular_build && CC=clang CXX=clazy CXXFLAGS="-Werror -Wno-deprecated-declarations" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja $srcdir && cat compile_commands.json | jq '[.[] | select(.file | contains("'"$srcdir"'"))]' > compile_commands.aux.json && cat compile_commands.aux.json | jq '[.[] | select(.file | contains("/synctex/")| not)]' > compile_commands.json && cp "$srcdir/.clang-tidy" .
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment