File: bench.sh

package info (click to toggle)
lfortran 0.59.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 56,736 kB
  • sloc: cpp: 168,052; f90: 74,272; python: 17,537; ansic: 7,705; yacc: 2,345; sh: 1,334; fortran: 895; makefile: 37; javascript: 15
file content (53 lines) | stat: -rwxr-xr-x 1,106 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
#
# Compile the latest master and a given PR in Release mode from scratch.
#
# Install the usual `lf` environment, and also `mamba install zlib fmt`.
#
# Example:
#
# ./bench.sh 448
# bench/main/src/bin/parse
# bench/pr/src/bin/parse
# bench/main/src/bin/parse2
# bench/pr/src/bin/parse2

set -ex

PR=$1
if [[ $PR == "" ]]; then
    echo "Specify the PR number as an argument"
    exit 1
fi

echo "Benchmarking the latest master against the PR !$1"

rm -rf bench
mkdir bench
cd bench

git clone https://github.com/lfortran/lfortran
cd lfortran
./build0.sh
cd ..

mkdir main
cd main
#cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DWITH_FMT=yes -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" ../lfortran
cmake -DWITH_FMT=yes ../lfortran
make -j
cd ..

cd lfortran
git clean -dfx
git fetch origin pull/$PR/head:pr-origin-$PR
git checkout pr-origin-$PR
./build0.sh
cd ..

mkdir pr
cd pr
#cmake -DCMAKE_PREFIX_PATH=$CONDA_PREFIX -DWITH_FMT=yes -DCMAKE_CXX_FLAGS_RELEASE="-Wall -Wextra -O3 -funroll-loops -DNDEBUG" ../lfortran
cmake -DWITH_FMT=yes ../lfortran
make -j
cd ..