add docker and windows build

This commit is contained in:
coco875
2024-01-24 16:52:59 -06:00
committed by Lywx
parent 656440aeee
commit 6b98f3eb92
3 changed files with 47 additions and 6 deletions
+16
View File
@@ -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
View File
@@ -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'
+18 -6
View File
@@ -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
```