1010 required : false
1111 type : string
1212 default : c6id.8xlarge
13+ build_lance :
14+ required : false
15+ type : boolean
16+ default : false
1317 benchmark_matrix :
1418 required : false
1519 type : string
98102 ]
99103
100104jobs :
105+ build :
106+ timeout-minutes : 60
107+ runs-on : >-
108+ ${{ github.repository == 'vortex-data/vortex'
109+ && format('runs-on={0}/runner=bench-dedicated/tag=sql-build{1}', github.run_id, (inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false) && '/extras=s3-cache' || '')
110+ || 'ubuntu-latest' }}
111+ steps :
112+ - uses : runs-on/action@v2
113+ if : inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false
114+ with :
115+ sccache : s3
116+ - uses : actions/checkout@v6
117+ if : inputs.mode == 'pr'
118+ with :
119+ ref : ${{ github.event.pull_request.head.sha }}
120+ - uses : actions/checkout@v6
121+ if : inputs.mode != 'pr'
122+ - uses : ./.github/actions/setup-rust
123+ with :
124+ repo-token : ${{ secrets.GITHUB_TOKEN }}
125+ - name : Build binaries
126+ shell : bash
127+ env :
128+ RUSTFLAGS : " -C target-cpu=native -C force-frame-pointers=yes"
129+ run : |
130+ packages="--bin data-gen --bin datafusion-bench --bin duckdb-bench"
131+ if [ "${{ inputs.build_lance }}" = "true" ]; then
132+ packages="$packages --bin lance-bench"
133+ fi
134+ cargo build $packages --profile release_debug
135+ - name : Stage binaries for upload
136+ shell : bash
137+ run : |
138+ mkdir -p staging/bin staging/lib
139+ cp target/release_debug/data-gen staging/bin/
140+ cp target/release_debug/datafusion-bench staging/bin/
141+ cp target/release_debug/duckdb-bench staging/bin/
142+ if [ -f target/release_debug/lance-bench ]; then
143+ cp target/release_debug/lance-bench staging/bin/
144+ fi
145+ cp target/duckdb-lib-*/libduckdb.so staging/lib/ 2>/dev/null || true
146+ - uses : actions/upload-artifact@v7
147+ with :
148+ name : sql-bench-binaries
149+ path : staging/
150+ retention-days : 1
151+
101152 bench :
153+ needs : build
102154 timeout-minutes : 120
103155 strategy :
104156 fail-fast : false
@@ -112,8 +164,6 @@ jobs:
112164 steps :
113165 - uses : runs-on/action@v2
114166 if : inputs.mode != 'pr' || github.event.pull_request.head.repo.fork == false
115- with :
116- sccache : s3
117167 - uses : actions/checkout@v6
118168 if : inputs.mode == 'pr'
119169 with :
@@ -123,9 +173,6 @@ jobs:
123173 if : inputs.mode != 'pr'
124174 - name : Setup benchmark environment
125175 run : sudo bash scripts/setup-benchmark.sh
126- - uses : ./.github/actions/setup-rust
127- with :
128- repo-token : ${{ secrets.GITHUB_TOKEN }}
129176
130177 - name : Install DuckDB
131178 run : |
@@ -135,16 +182,17 @@ jobs:
135182
136183 - uses : ./.github/actions/system-info
137184
138- - name : Build binaries
185+ - uses : actions/download-artifact@v8
186+ with :
187+ name : sql-bench-binaries
188+ path : staging
189+ - name : Install binaries
139190 shell : bash
140- env :
141- RUSTFLAGS : " -C target-cpu=native -C force-frame-pointers=yes"
142191 run : |
143- packages="--bin data-gen --bin datafusion-bench --bin duckdb-bench"
144- if [ "${{ matrix.build_lance }}" = "true" ]; then
145- packages="$packages --bin lance-bench"
146- fi
147- cargo build $packages --profile release_debug
192+ mkdir -p target/release_debug
193+ cp staging/bin/* target/release_debug/
194+ chmod +x target/release_debug/*
195+ echo "LD_LIBRARY_PATH=${{ github.workspace }}/staging/lib" >> "$GITHUB_ENV"
148196
149197 - name : Generate data
150198 shell : bash
0 commit comments