Skip to content

Commit 4fc2486

Browse files
committed
Chore: add script to download optix headers in ci
1 parent 4ac952d commit 4fc2486

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/rust.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ name: Rust CI
22

33
on:
44
pull_request:
5+
paths-ignore:
6+
- '**.md'
57
push:
8+
paths-ignore:
9+
- '**.md'
610
branches:
711
- master
812

@@ -39,6 +43,9 @@ jobs:
3943
- name: Add rustup components
4044
run: rustup component add rustfmt clippy
4145

46+
- name: Download OptiX Headers
47+
run: scripts/download_ci_optix.bash
48+
4249
- name: Load Rust Cache
4350
uses: Swatinem/rust-cache@v1
4451

scripts/download_ci_optix.bash

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
BASE_DIR=$(cd $(dirname "$0"); pwd)
2+
DEPS_DIR="${BASE_DIR}/deps"
3+
OPTIX_VERSION="7.0"
4+
5+
echo "Used OptiX version: ${OPTIX_VERSION}"
6+
mkdir -p ${DEPS_DIR}/optix/include
7+
OPTIX_URL=https://developer.download.nvidia.com/redist/optix/v${OPTIX_VERSION}
8+
9+
for f in optix.h optix_device.h optix_function_table.h \
10+
optix_function_table_definition.h optix_host.h \
11+
optix_stack_size.h optix_stubs.h optix_types.h optix_7_device.h \
12+
optix_7_host.h optix_7_types.h \
13+
internal/optix_7_device_impl.h \
14+
internal/optix_7_device_impl_exception.h \
15+
internal/optix_7_device_impl_transformations.h
16+
do
17+
curl --retry 100 -m 120 --connect-timeout 30 \
18+
$OPTIX_URL/include/$f > $DEPS_DIR/optix/include/$f
19+
done
20+
export OPTIX_ROOT=${DEPS_DIR}/optix

0 commit comments

Comments
 (0)