Skip to content

Commit

Permalink
Update GitHub Action workflow to build with CUDA (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
ling0322 authored Aug 19, 2024
1 parent 0673a76 commit 4c2ffad
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 6 deletions.
37 changes: 33 additions & 4 deletions .github/workflows/cmake-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,47 @@ on:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Clean up diskspace
run: sudo rm -rf /usr/share/dotnet /opt/ghc /usr/local/share/boost "$AGENT_TOOLSDIRECTORY"
- uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.5.0'
linux-local-args: '["--toolkit"]'
- uses: actions/setup-go@v5
with:
go-version: '1.22.5'
- run: nvcc -V
- run: df -h
- uses: actions/checkout@v3
- name: Build ffmpeg
run: cd third_party && bash install_ffmpeg.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
run: cmake -B ${{github.workspace}}/build
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DWITH_CUDA=ON
-DENABLE_FFMPEG_PLUGIN=ON
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
run: ctest --verbose -C ${{env.BUILD_TYPE}} --test-dir ${{github.workspace}}/build/src/libllm
run: ctest --verbose -C ${{env.BUILD_TYPE}} --test-dir ${{github.workspace}}/build/src/libllm
- name: Create release package
run: zip release-linux-x64-cuda.zip
${{github.workspace}}/build/llm
${{github.workspace}}/build/libllmplugincublas.so
${{github.workspace}}/build/libllmpluginffmpeg.so
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
release-linux-x64-cuda.zip
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -e

if [ ! -d ffmpeg-7.0.2 ]; then
wget https://www.ffmpeg.org/releases/ffmpeg-7.0.2.tar.gz
tar xzvf ffmpeg-7.0.2.tar.gz
wget -nv https://www.ffmpeg.org/releases/ffmpeg-7.0.2.tar.gz
tar xzf ffmpeg-7.0.2.tar.gz

rm ffmpeg-7.0.2.tar.gz
fi
Expand Down

0 comments on commit 4c2ffad

Please sign in to comment.