-
Notifications
You must be signed in to change notification settings - Fork 20
71 lines (57 loc) · 2.01 KB
/
linux-trt.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Build (Linux-TRT)
on:
push:
paths:
- 'vstrt/**'
- '.github/workflows/linux-trt.yml'
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-24.04
defaults:
run:
working-directory: vstrt
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Ninja
run: pip install ninja --break-system-packages
- name: Download VapourSynth headers
run: |
wget -q -O vs.zip https://github.com/vapoursynth/vapoursynth/archive/refs/tags/R57.zip
unzip -q vs.zip
mv vapoursynth*/ vapoursynth
- name: Setup CUDA and TensorRT
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
export TRT_VER=10.6.0.26-1+cuda12.6
sudo apt-get install -y --no-install-recommends cuda-nvcc-12-6 cuda-cudart-dev-12-6 libnvinfer-dev=${TRT_VER} libnvinfer-headers-dev=${TRT_VER} libnvinfer10=${TRT_VER}
echo "PATH=/usr/local/cuda/bin${PATH:+:${PATH}}" >> $GITHUB_ENV
echo "CUDA_PATH=/usr/local/cuda" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=/usr/local/cuda/lib${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}" >> $GITHUB_ENV
- name: Configure
run: cmake -S . -B build -G Ninja -LA
-D CMAKE_BUILD_TYPE=Release
-D VAPOURSYNTH_INCLUDE_DIRECTORY="`pwd`/vapoursynth/include"
-D CMAKE_CXX_COMPILER=g++-13
-D CMAKE_CXX_FLAGS="-Wall -ffast-math -march=x86-64-v3"
- name: Build
run: cmake --build build --verbose
- name: Install
run: cmake --install build --prefix install
- name: Prepare for upload
run: |
mkdir artifact
cp -v install/lib/*.so artifact
- name: Describe
run: git describe --tags --long
- name: Upload
uses: actions/upload-artifact@v4
with:
name: VSTRT-Linux-x64
path: vstrt/artifact
overwrite: true