@@ -24,7 +24,7 @@ concurrency:
2424
2525jobs :
2626 windows-release-node :
27- # needs: format-taginfo-docs
27+ needs : format-taginfo-docs
2828 runs-on : windows-2022
2929 continue-on-error : false
3030 env :
5151 cd build
5252
5353 python3 -m venv .venv
54-
5554 source .venv/Scripts/Activate
56-
5755 python3 -m pip install conan==2.7.1
58-
5956 conan profile detect --force
6057
6158 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
@@ -657,130 +654,130 @@ jobs:
657654 ccache -p
658655 ccache -s
659656
660- # benchmarks:
661- # if: github.event_name == 'pull_request'
662- # needs: [format-taginfo-docs]
663- # runs-on: self-hosted
664- # env:
665- # CCOMPILER: clang-16
666- # CXXCOMPILER: clang++-16
667- # CC: clang-16
668- # CXX: clang++-16
669- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
670- # PR_NUMBER: ${{ github.event.pull_request.number }}
671- # GITHUB_REPOSITORY: ${{ github.repository }}
672- # RUN_BIG_BENCHMARK: ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
673- # steps:
674- # - name: Checkout PR Branch
675- # uses: actions/checkout@v4
676- # with:
677- # ref: ${{ github.head_ref }}
678- # path: pr
679- # - name: Activate virtualenv
680- # run: |
681- # python3 -m venv .venv
682- # source .venv/bin/activate
683- # echo PATH=$PATH >> $GITHUB_ENV
684- # pip install "conan==2.7.1" "requests==2.31.0" "numpy==1.26.4"
685- # - name: Prepare data
686- # run: |
687- # if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
688- # rm -rf ~/data.osm.pbf
689- # wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet
690- # gunzip -c ./pr/test/data/poland_gps_traces.csv.gz > ~/gps_traces.csv
691- # else
692- # if [ ! -f "~/data.osm.pbf" ]; then
693- # wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -O ~/data.osm.pbf
694- # else
695- # echo "Using cached data.osm.pbf"
696- # fi
697- # gunzip -c ./pr/test/data/berlin_gps_traces.csv.gz > ~/gps_traces.csv
698- # fi
699- # - name: Prepare environment
700- # run: |
701- # echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
702- # mkdir -p $HOME/.ccache
703- # ccache --zero-stats
704- # ccache --max-size=256M
705- # - name: Checkout Base Branch
706- # uses: actions/checkout@v4
707- # with:
708- # ref: ${{ github.event.pull_request.base.ref }}
709- # path: base
710- # - name: Build Base Branch
711- # run: |
712- # cd base
713- # npm ci --ignore-scripts
714- # cd ..
715- # mkdir base/build
716- # cd base/build
717- # cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
718- # make -j$(nproc)
719- # make -j$(nproc) benchmarks
720- # cd ..
721- # make -C test/data
722- # - name: Build PR Branch
723- # run: |
724- # cd pr
725- # npm ci --ignore-scripts
726- # cd ..
727- # mkdir -p pr/build
728- # cd pr/build
729- # cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
730- # make -j$(nproc)
731- # make -j$(nproc) benchmarks
732- # cd ..
733- # make -C test/data
734- # # we run benchmarks in tmpfs to avoid impact of disk IO
735- # - name: Create folder for tmpfs
736- # run: |
737- # # if by any chance it was mounted before(e.g. due to previous job failed), unmount it
738- # sudo umount ~/benchmarks | true
739- # rm -rf ~/benchmarks
740- # mkdir -p ~/benchmarks
741- # # see https://llvm.org/docs/Benchmarking.html
742- # - name: Run PR Benchmarks
743- # run: |
744- # sudo cset shield -c 2-3 -k on
745- # sudo mount -t tmpfs -o size=4g none ~/benchmarks
746- # cp -rf pr/build ~/benchmarks/build
747- # cp -rf pr/lib ~/benchmarks/lib
748- # mkdir -p ~/benchmarks/test
749- # cp -rf pr/test/data ~/benchmarks/test/data
750- # cp -rf pr/profiles ~/benchmarks/profiles
751-
752- # sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
753- # sudo umount ~/benchmarks
754- # sudo cset shield --reset
755- # - name: Run Base Benchmarks
756- # run: |
757- # sudo cset shield -c 2-3 -k on
758- # sudo mount -t tmpfs -o size=4g none ~/benchmarks
759- # cp -rf base/build ~/benchmarks/build
760- # cp -rf base/lib ~/benchmarks/lib
761- # mkdir -p ~/benchmarks/test
762- # cp -rf base/test/data ~/benchmarks/test/data
763- # cp -rf base/profiles ~/benchmarks/profiles
764-
765- # # TODO: remove it when base branch will have this file at needed location
766- # if [ ! -f ~/benchmarks/test/data/portugal_to_korea.json ]; then
767- # cp base/src/benchmarks/portugal_to_korea.json ~/benchmarks/test/data/portugal_to_korea.json
768- # fi
769- # # we intentionally use scripts from PR branch to be able to update them and see results in the same PR
770- # sudo cset shield --exec -- cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
771- # sudo umount ~/benchmarks
772- # sudo cset shield --reset
773- # - name: Post Benchmark Results
774- # run: |
775- # python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
776- # - name: Show CCache statistics
777- # run: |
778- # ccache -p
779- # ccache -s
780-
781- # ci-complete:
782- # runs-on: ubuntu-22.04
783- # needs: [build-test-publish, docker-image-matrix, windows-release-node, benchmarks]
784- # steps:
785- # - run: echo "CI complete"
657+ benchmarks :
658+ if : github.event_name == 'pull_request'
659+ needs : [format-taginfo-docs]
660+ runs-on : self-hosted
661+ env :
662+ CCOMPILER : clang-16
663+ CXXCOMPILER : clang++-16
664+ CC : clang-16
665+ CXX : clang++-16
666+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
667+ PR_NUMBER : ${{ github.event.pull_request.number }}
668+ GITHUB_REPOSITORY : ${{ github.repository }}
669+ RUN_BIG_BENCHMARK : ${{ contains(github.event.pull_request.labels.*.name, 'Performance') }}
670+ steps :
671+ - name : Checkout PR Branch
672+ uses : actions/checkout@v4
673+ with :
674+ ref : ${{ github.head_ref }}
675+ path : pr
676+ - name : Activate virtualenv
677+ run : |
678+ python3 -m venv .venv
679+ source .venv/bin/activate
680+ echo PATH=$PATH >> $GITHUB_ENV
681+ pip install "conan==2.7.1" "requests==2.31.0" "numpy==1.26.4"
682+ - name : Prepare data
683+ run : |
684+ if [ "$RUN_BIG_BENCHMARK" = "true" ]; then
685+ rm -rf ~/data.osm.pbf
686+ wget http://download.geofabrik.de/europe/poland-latest.osm.pbf -O ~/data.osm.pbf --quiet
687+ gunzip -c ./pr/test/data/poland_gps_traces.csv.gz > ~/gps_traces.csv
688+ else
689+ if [ ! -f "~/data.osm.pbf" ]; then
690+ wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf -O ~/data.osm.pbf
691+ else
692+ echo "Using cached data.osm.pbf"
693+ fi
694+ gunzip -c ./pr/test/data/berlin_gps_traces.csv.gz > ~/gps_traces.csv
695+ fi
696+ - name : Prepare environment
697+ run : |
698+ echo "CCACHE_DIR=$HOME/.ccache" >> $GITHUB_ENV
699+ mkdir -p $HOME/.ccache
700+ ccache --zero-stats
701+ ccache --max-size=256M
702+ - name : Checkout Base Branch
703+ uses : actions/checkout@v4
704+ with :
705+ ref : ${{ github.event.pull_request.base.ref }}
706+ path : base
707+ - name : Build Base Branch
708+ run : |
709+ cd base
710+ npm ci --ignore-scripts
711+ cd ..
712+ mkdir base/build
713+ cd base/build
714+ cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
715+ make -j$(nproc)
716+ make -j$(nproc) benchmarks
717+ cd ..
718+ make -C test/data
719+ - name : Build PR Branch
720+ run : |
721+ cd pr
722+ npm ci --ignore-scripts
723+ cd ..
724+ mkdir -p pr/build
725+ cd pr/build
726+ cmake -DENABLE_CONAN=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_NODE_BINDINGS=ON ..
727+ make -j$(nproc)
728+ make -j$(nproc) benchmarks
729+ cd ..
730+ make -C test/data
731+ # we run benchmarks in tmpfs to avoid impact of disk IO
732+ - name : Create folder for tmpfs
733+ run : |
734+ # if by any chance it was mounted before(e.g. due to previous job failed), unmount it
735+ sudo umount ~/benchmarks | true
736+ rm -rf ~/benchmarks
737+ mkdir -p ~/benchmarks
738+ # see https://llvm.org/docs/Benchmarking.html
739+ - name : Run PR Benchmarks
740+ run : |
741+ sudo cset shield -c 2-3 -k on
742+ sudo mount -t tmpfs -o size=4g none ~/benchmarks
743+ cp -rf pr/build ~/benchmarks/build
744+ cp -rf pr/lib ~/benchmarks/lib
745+ mkdir -p ~/benchmarks/test
746+ cp -rf pr/test/data ~/benchmarks/test/data
747+ cp -rf pr/profiles ~/benchmarks/profiles
748+
749+ sudo cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/pr_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
750+ sudo umount ~/benchmarks
751+ sudo cset shield --reset
752+ - name : Run Base Benchmarks
753+ run : |
754+ sudo cset shield -c 2-3 -k on
755+ sudo mount -t tmpfs -o size=4g none ~/benchmarks
756+ cp -rf base/build ~/benchmarks/build
757+ cp -rf base/lib ~/benchmarks/lib
758+ mkdir -p ~/benchmarks/test
759+ cp -rf base/test/data ~/benchmarks/test/data
760+ cp -rf base/profiles ~/benchmarks/profiles
761+
762+ # TODO: remove it when base branch will have this file at needed location
763+ if [ ! -f ~/benchmarks/test/data/portugal_to_korea.json ]; then
764+ cp base/src/benchmarks/portugal_to_korea.json ~/benchmarks/test/data/portugal_to_korea.json
765+ fi
766+ # we intentionally use scripts from PR branch to be able to update them and see results in the same PR
767+ sudo cset shield --exec -- cset shield --exec -- ./pr/scripts/ci/run_benchmarks.sh -f ~/benchmarks -r $(pwd)/base_results -s $(pwd)/pr -b ~/benchmarks/build -o ~/data.osm.pbf -g ~/gps_traces.csv
768+ sudo umount ~/benchmarks
769+ sudo cset shield --reset
770+ - name : Post Benchmark Results
771+ run : |
772+ python3 pr/scripts/ci/post_benchmark_results.py base_results pr_results
773+ - name : Show CCache statistics
774+ run : |
775+ ccache -p
776+ ccache -s
777+
778+ ci-complete :
779+ runs-on : ubuntu-22.04
780+ needs : [build-test-publish, docker-image-matrix, windows-release-node, benchmarks]
781+ steps :
782+ - run : echo "CI complete"
786783
0 commit comments