mirror of
https://github.com/izzy2lost/Torch.git
synced 2026-07-06 00:18:35 -07:00
add docker and windows build
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
name: Windows Compile
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "*" ]
|
||||
pull_request:
|
||||
branches: [ "master" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2019
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: |
|
||||
cmake -S . -B "build/x64" -G "Visual Studio 16 2019" -T v142 -A x64 -DCMAKE_BUILD_TYPE=Debug
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
FROM ubuntu:22.04 as build
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
cmake \
|
||||
ninja-build \
|
||||
libbz2-dev
|
||||
|
||||
RUN mkdir /torch
|
||||
WORKDIR /torch
|
||||
|
||||
CMD echo 'Usage: docker run -it --rm -v .:/torch torch cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug && cmake --build build-cmake -j\n'\
|
||||
'See https://github.com/HarbourMasters/Torch/blob/master/README.md for more information'
|
||||
@@ -31,16 +31,10 @@ A generic asset processor for N64 games
|
||||
|
||||
### Dependencies
|
||||
|
||||
#### Ubuntu
|
||||
``` bash
|
||||
sudo apt-get install cmake ninja-build libbz2-dev
|
||||
```
|
||||
|
||||
#### Fedora
|
||||
``` bash
|
||||
sudo dnf install cmake ninja-build
|
||||
```
|
||||
|
||||
### Compile
|
||||
|
||||
``` bash
|
||||
@@ -72,4 +66,22 @@ Requires Xcode (or xcode-tools) && `cmake, ninja` (can be installed via homebrew
|
||||
``` bash
|
||||
cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake --build build-cmake -j
|
||||
```
|
||||
|
||||
# Docker
|
||||
|
||||
Build the Docker image:
|
||||
``` bash
|
||||
docker build -t torch .
|
||||
```
|
||||
|
||||
When building and using other tools, append the following in front of every command you run:
|
||||
``` bash
|
||||
docker run --rm -v .:/torch torch
|
||||
```
|
||||
|
||||
For example:
|
||||
``` bash
|
||||
docker run --rm -v .:/torch torch cmake -H. -Bbuild-cmake -GNinja -DCMAKE_BUILD_TYPE=Debug
|
||||
docker run --rm -v .:/torch torch cmake --build build-cmake -j
|
||||
```
|
||||
Reference in New Issue
Block a user