File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build Jetson Code in Docker
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v[0-9]+.[0-9]+.[0-9]+'
7+ paths-ignore :
8+ - ' doc/**'
9+ - ' example/**'
10+ - ' .github/**'
11+ - ' .vscode/**'
12+ - ' *.md'
13+
14+ jobs :
15+ build :
16+ runs-on : self-hosted
17+ strategy :
18+ matrix :
19+ build_type : [Debug, Release]
20+
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+ with :
25+ submodules : recursive
26+
27+ - name : Get L4T Version
28+ id : l4t
29+ run : |
30+ RAW=$(head -n 1 /etc/nv_tegra_release)
31+ MAJOR=$(echo $RAW | sed -n 's/^# R\([0-9]*\).*/\1/p')
32+ REVISION=$(echo $RAW | sed -n 's/.*REVISION: \([0-9]*\.[0-9]*\).*/\1/p')
33+ echo "version=${MAJOR}.${REVISION}" >> $GITHUB_OUTPUT
34+
35+ - name : Create build directory
36+ run : |
37+ mkdir -p build
38+ cd build
39+ cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
40+ make -j$(nproc)
41+
42+ - name : Zip binary
43+ id : zip-binary
44+ run : |
45+ cd build
46+ if [ "${{ matrix.build_type }}" == "Release" ]; then
47+ FILENAME="pi-webrtc-${{ github.ref_name }}_jetson-l4t-${{ steps.l4t.outputs.version }}.tar.gz"
48+ else
49+ FILENAME="pi-webrtc-${{ github.ref_name }}_jetson-l4t-${{ steps.l4t.outputs.version }}_debug.tar.gz"
50+ fi
51+ tar -czvf $FILENAME pi-webrtc
52+ echo "filename=$FILENAME" >> $GITHUB_OUTPUT
53+
54+ - name : Upload to GitHub Release
55+ if : startsWith(github.ref, 'refs/tags/')
56+ uses : softprops/action-gh-release@v2
57+ with :
58+ files : build/${{ steps.zip-binary.outputs.filename }}
You can’t perform that action at this time.
0 commit comments