summaryrefslogtreecommitdiff
path: root/.github/workflows/linux_build.yml
blob: 3dd37477f33b448961c04b56a409d6012e75fb30 (plain)
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
name: Linux Compile

on:
  push:
    branches: [ "*" ]
  pull_request:
    branches: [ "master" ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install dependencies
        run: sudo apt-get install cmake ninja-build libbz2-dev
      - name: Build
        run: |
          cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Release
          cmake --build build-cmake -j
      - name: Create Package
        run: |
          mkdir torch-release
          mv build-cmake/torch torch-release/
          cp "$(ldconfig -p | grep libbz2.so.1.0 | tr ' ' '\n' | grep /| head -n1)" torch-release/
      - name: Publish packaged artifacts
        uses: actions/upload-artifact@v4
        with:
          name: torch-linux-x64
          path: torch-release