File tree 2 files changed +27
-4
lines changed
2 files changed +27
-4
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ name: Benchmarks
19
19
on :
20
20
push :
21
21
branches : [main]
22
+ pull_request :
23
+ branches : [main]
22
24
paths :
23
25
- " .github/workflows/benchmark.yml"
24
26
- " ci/scripts/bench_adapt.py"
35
37
arch : ['amd64']
36
38
steps :
37
39
- uses : actions/checkout@v4
40
+ - name : Install dependencies
41
+ run : |
42
+ apt-get update
43
+ apt-get install -y ca-certificates curl
38
44
- name : Set up Python
39
45
uses : actions/setup-python@v4
40
46
with :
45
51
go-version : ${{ matrix.go }}
46
52
cache : true
47
53
cache-dependency-path : go.sum
54
+ check-latest : false
48
55
- name : Run Benchmarks
49
- run : |
50
- ci/scripts/bench.sh --json
56
+ if : github.event_name != 'push'
57
+ run : bash ci/scripts/bench.sh . --json
51
58
- name : Upload results
52
59
if : github.event_name == 'push' && github.repository == 'apache/arrow-go' && github.ref_name == 'main'
53
60
env :
Original file line number Diff line number Diff line change 23
23
24
24
set -ex
25
25
26
- source_dir=${1}
26
+ # Validate input arguments
27
+ if [ -z " $1 " ]; then
28
+ echo " Error: Missing source directory argument"
29
+ exit 1
30
+ fi
31
+
32
+ source_dir=" $1 "
33
+
34
+ PARQUET_TEST_DATA=" ${source_dir} /cpp/submodules/parquet-testing/data"
35
+
36
+ # If parquet_test_data doesn't exist, download it from Apache Arrow GitHub
37
+ if [ ! -d " $PARQUET_TEST_DATA " ]; then
38
+ echo " parquet_test_data not found. Fetching from Apache Arrow repository..."
39
+ mkdir -p " $PARQUET_TEST_DATA "
40
+ curl -L https://github.com/apache/parquet-testing/tree/master/data
41
+ fi
42
+
43
+ export PARQUET_TEST_DATA
27
44
28
- export PARQUET_TEST_DATA=${1} /cpp/submodules/parquet-testing/data
29
45
pushd " ${source_dir} "
30
46
31
47
# lots of benchmarks, they can take a while
You can’t perform that action at this time.
0 commit comments