diff --git a/.github/workflows/cmake-linux.yml b/.github/workflows/cmake-linux.yml index f723cb6..60aaea9 100644 --- a/.github/workflows/cmake-linux.yml +++ b/.github/workflows/cmake-linux.yml @@ -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/cuda-toolkit@v0.2.16 + 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 \ No newline at end of file + 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 diff --git a/third_party/install_ffmepg.sh b/third_party/install_ffmpeg.sh similarity index 91% rename from third_party/install_ffmepg.sh rename to third_party/install_ffmpeg.sh index dd2728f..737a925 100755 --- a/third_party/install_ffmepg.sh +++ b/third_party/install_ffmpeg.sh @@ -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