|
|
|
@@ -636,19 +636,18 @@ jobs:
|
|
|
|
|
# ccache -s
|
|
|
|
|
|
|
|
|
|
benchmarks:
|
|
|
|
|
#if: github.event_name == 'pull_request'
|
|
|
|
|
#needs: [format-taginfo-docs]
|
|
|
|
|
runs-on: self-hosted
|
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
|
# needs: [format-taginfo-docs]
|
|
|
|
|
runs-on: ubuntu-22.04
|
|
|
|
|
env:
|
|
|
|
|
CCOMPILER: gcc-13
|
|
|
|
|
CXXCOMPILER: g++-13
|
|
|
|
|
CC: gcc-13
|
|
|
|
|
CXX: g++-13
|
|
|
|
|
CCOMPILER: clang-13
|
|
|
|
|
CXXCOMPILER: clang++-13
|
|
|
|
|
CC: clang-13
|
|
|
|
|
CXX: clang++-13
|
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
|
|
|
RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
|
|
|
|
|
CXXFLAGS: '-Wno-array-bounds -Wno-uninitialized'
|
|
|
|
|
steps:
|
|
|
|
|
- name: Enable data.osm.pbf cache
|
|
|
|
|
if: ${{ ! env.RUN_BIG_BENCHMARK }}
|
|
|
|
@@ -679,8 +678,8 @@ jobs:
|
|
|
|
|
path: pr
|
|
|
|
|
- name: Install dependencies
|
|
|
|
|
run: |
|
|
|
|
|
python3 -m pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4" --break-system-packages
|
|
|
|
|
#sudo apt-get update -y && sudo apt-get install ccache
|
|
|
|
|
python3 -m pip install "conan<2.0.0" "requests==2.31.0" "numpy==1.26.4"
|
|
|
|
|
sudo apt-get update -y && sudo apt-get install ccache
|
|
|
|
|
- name: Prepare data
|
|
|
|
|
run: |
|
|
|
|
|
if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
|
|
|
|
@@ -708,7 +707,6 @@ jobs:
|
|
|
|
|
path: base
|
|
|
|
|
- name: Build Base Branch
|
|
|
|
|
run: |
|
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
|
|
|
|
mkdir base/build
|
|
|
|
|
cd base/build
|
|
|
|
|
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
@@ -716,57 +714,50 @@ jobs:
|
|
|
|
|
make -j$(nproc) benchmarks
|
|
|
|
|
cd ..
|
|
|
|
|
make -C test/data
|
|
|
|
|
- name: Build PR Branch
|
|
|
|
|
run: |
|
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
|
|
|
|
mkdir -p pr/build
|
|
|
|
|
cd pr/build
|
|
|
|
|
cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
|
make -j$(nproc)
|
|
|
|
|
make -j$(nproc) benchmarks
|
|
|
|
|
cd ..
|
|
|
|
|
make -C test/data
|
|
|
|
|
# - name: Build PR Branch
|
|
|
|
|
# run: |
|
|
|
|
|
# mkdir -p pr/build
|
|
|
|
|
# cd pr/build
|
|
|
|
|
# cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
|
# make -j$(nproc)
|
|
|
|
|
# make -j$(nproc) benchmarks
|
|
|
|
|
# cd ..
|
|
|
|
|
# make -C test/data
|
|
|
|
|
# we run benchmarks in tmpfs to avoid impact of disk IO
|
|
|
|
|
- name: Create folder for tmpfs
|
|
|
|
|
run: mkdir -p ~/benchmarks_tmp
|
|
|
|
|
- name: Run PR Benchmarks
|
|
|
|
|
run: |
|
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
|
|
|
|
sudo mount -t tmpfs -o size=4g none ~/benchmarks_tmp
|
|
|
|
|
cp -rf pr/build ~/benchmarks_tmp/build
|
|
|
|
|
mkdir -p ~/benchmarks_tmp/test
|
|
|
|
|
cp -rf pr/test/data ~/benchmarks_tmp/test/data
|
|
|
|
|
cp -rf pr/profiles ~/benchmarks_tmp/profiles
|
|
|
|
|
run: mkdir -p /opt/benchmarks
|
|
|
|
|
# - name: Run PR Benchmarks
|
|
|
|
|
# run: |
|
|
|
|
|
# sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
|
|
|
|
# cp -rf pr/build /opt/benchmarks/build
|
|
|
|
|
# mkdir -p /opt/benchmarks/test
|
|
|
|
|
# cp -rf pr/test/data /opt/benchmarks/test/data
|
|
|
|
|
# cp -rf pr/profiles /opt/benchmarks/profiles
|
|
|
|
|
|
|
|
|
|
sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks_tmp -r $(pwd)/pr_results -s $(pwd)/pr -b ~/benchmarks_tmp/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
|
|
|
|
sleep 10
|
|
|
|
|
# lsof ~/benchmarks_tmp
|
|
|
|
|
sudo umount ~/benchmarks_tmp
|
|
|
|
|
# ./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
|
|
|
|
# sudo umount /opt/benchmarks
|
|
|
|
|
- name: Run Base Benchmarks
|
|
|
|
|
run: |
|
|
|
|
|
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/sfedartsou/.conan/data/onetbb/2021.12.0/_/_/package/14d80dcc6e4fac53fcd6bcf3899648ac2c72c6aa/lib/"
|
|
|
|
|
sudo mount -t tmpfs -o size=4g none ~/benchmarks_tmp
|
|
|
|
|
cp -rf pr/build ~/benchmarks_tmp/build
|
|
|
|
|
mkdir -p ~/benchmarks_tmp/test
|
|
|
|
|
cp -rf pr/test/data ~/benchmarks_tmp/test/data
|
|
|
|
|
cp -rf pr/profiles ~/benchmarks_tmp/profiles
|
|
|
|
|
sudo mount -t tmpfs -o size=4g none /opt/benchmarks
|
|
|
|
|
cp -rf base/build /opt/benchmarks/build
|
|
|
|
|
mkdir -p /opt/benchmarks/test
|
|
|
|
|
cp -rf base/test/data /opt/benchmarks/test/data
|
|
|
|
|
cp -rf base/profiles /opt/benchmarks/profiles
|
|
|
|
|
|
|
|
|
|
# TODO: remove it when base branch will have this file at needed location
|
|
|
|
|
if [ ! -f ~/benchmarks_tmp/test/data/portugal_to_korea.json ]; then
|
|
|
|
|
cp base/src/benchmarks/portugal_to_korea.json ~/benchmarks_tmp/test/data/portugal_to_korea.json
|
|
|
|
|
if [ ! -f /opt/benchmarks/test/data/portugal_to_korea.json ]; then
|
|
|
|
|
cp base/src/benchmarks/portugal_to_korea.json /opt/benchmarks/test/data/portugal_to_korea.json
|
|
|
|
|
fi
|
|
|
|
|
# we intentionally use scripts from PR branch to be able to update them and see results in the same PR
|
|
|
|
|
sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks_tmp -r $(pwd)/base_results -s $(pwd)/pr -b ~/benchmarks_tmp/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
|
|
|
|
sleep 10
|
|
|
|
|
# lsof ~/benchmarks_tmp
|
|
|
|
|
sudo umount ~/benchmarks_tmp
|
|
|
|
|
- name: Post Benchmark Results
|
|
|
|
|
run: |
|
|
|
|
|
python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
|
|
|
|
- name: Show CCache statistics
|
|
|
|
|
run: |
|
|
|
|
|
ccache -p
|
|
|
|
|
ccache -s
|
|
|
|
|
./pr/scripts/ci/run_benchmarks.sh -f /opt/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b /opt/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
|
|
|
|
|
sudo umount /opt/benchmarks
|
|
|
|
|
# - name: Post Benchmark Results
|
|
|
|
|
# run: |
|
|
|
|
|
# python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
|
|
|
|
|
# - name: Show CCache statistics
|
|
|
|
|
# run: |
|
|
|
|
|
# ccache -p
|
|
|
|
|
# ccache -s
|
|
|
|
|
|
|
|
|
|
# ci-complete:
|
|
|
|
|
# runs-on: ubuntu-22.04
|
|
|
|
|