Skip to content

Fixed torch to build on emscripten #393

Fixed torch to build on emscripten

Fixed torch to build on emscripten #393

Workflow file for this run

name: Linux Compile
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
config: [Release, Debug]
standalone: [OFF, ON]
toolchain: [linux-gnu, linux-clang]
isPR:
- ${{ github.event_name == 'pull_request' }}
exclude:
- isPR: true
standalone: OFF
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=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }} -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/${{ matrix.toolchain }}.cmake
cmake --build build-cmake -j
- name: Create Package
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'linux-gnu' }}
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
if: ${{ matrix.config == 'Release' && matrix.standalone == 'ON' && matrix.toolchain == 'linux-gnu' }}
uses: actions/upload-artifact@v4
with:
name: torch-linux-x64
path: torch-release