Skip to content

Commit

Permalink
docker: add incremental compilation support with tarball-cached bsnes…
Browse files Browse the repository at this point in the history
…/obj and bsnes/out folders.
  • Loading branch information
JamesDunne committed Apr 18, 2020
1 parent dc3f823 commit a89fdcd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.git/
.github/
.idea/
.DS_Store
cmake-build-debug/
cmake-build-release/
cmake-build-relwithdebinfo/
bsnes/out/
bsnes/obj/
bsnes/cmake-build-debug/
screenshots/
Dockerfile
*.sh
CMakeCache.txt
CMakeFiles/
CMakeLists.txt
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ FROM build-base

WORKDIR /build

ADD win64-build-context.tar.gz /build

COPY . /build

RUN mkdir -p /build/bsnes/out && mkdir -p /build/bsnes/obj

RUN make -C bsnes -j4 local=false build=performance_debug console=true platform=windows compiler="x86_64-w64-mingw32-g++" windres="x86_64-w64-mingw32-windres"

RUN tar czf win64-build-context.tar.gz ./bsnes/out ./bsnes/obj

RUN cp -a bsnes/out/bsnes bsnes.exe
Binary file added win64-build-context.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions win64-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
docker build . -t bsnes-win64
id=$(docker create bsnes-win64)
docker cp $id:/build/bsnes.exe /Volumes/Users/Jaymz/Desktop/alttp-multiplayer-nightly/
docker cp $id:/build/win64-build-context.tar.gz .
docker rm $id

0 comments on commit a89fdcd

Please sign in to comment.