mirror of
https://github.com/Maschell/SDL2_Playground.git
synced 2024-11-27 07:04:16 +01:00
Add dockerfile for building linux-x86-64 binaries
This commit is contained in:
parent
40c0efcb59
commit
7695362c49
20
.github/workflows/linux-x86-64.yml
vendored
Normal file
20
.github/workflows/linux-x86-64.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: linux-x86-64 building.
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build-binary:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: build binary
|
||||
run: |
|
||||
docker build . -f Dockerfile.pc -t sdl2_playground-builder-pc
|
||||
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc bash -c "cd .. && bash filelist.sh"
|
||||
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc cmake ..
|
||||
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc make
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: linux-x86-64-shared binary
|
||||
path: "./cmake-build/SDL2_Playground"
|
2
.github/workflows/pc-win.yml
vendored
2
.github/workflows/pc-win.yml
vendored
@ -14,5 +14,5 @@ jobs:
|
||||
docker run --rm -v ${PWD}:/project sdl2_playground-builder-pc-win make -f Makefile.pc-win
|
||||
- uses: actions/upload-artifact@master
|
||||
with:
|
||||
name: binary
|
||||
name: windows-shared binary
|
||||
path: "*.exe"
|
12
Dockerfile.pc
Normal file
12
Dockerfile.pc
Normal file
@ -0,0 +1,12 @@
|
||||
FROM debian:sid-slim
|
||||
RUN DEBIAN_FRONTEND="noninteractive"
|
||||
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends apt-utils ca-certificates && \
|
||||
apt-get install -y --no-install-recommends build-essential make git && \
|
||||
apt-get install -y --no-install-recommends cmake && \
|
||||
apt-get install -y --no-install-recommends libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-dev && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN mkdir -p /project/cmake-build
|
||||
WORKDIR /project/cmake-build
|
17
README.md
17
README.md
@ -9,6 +9,23 @@ bash ./filelist.sh
|
||||
mkdir build && cd build && cmake .. && make
|
||||
```
|
||||
|
||||
Via docker:
|
||||
```
|
||||
# Build the docker image
|
||||
docker build . -f .\Dockerfile.pc -t sdl2_playground-builder-pc
|
||||
|
||||
# Build filelist.h
|
||||
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc bash -c "cd .. && bash filelist.sh"
|
||||
|
||||
# Generate the makefile
|
||||
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc cmake ..
|
||||
|
||||
# build!
|
||||
docker run -it --rm -v ${PWD}:/project sdl2_playground-builder-pc make
|
||||
|
||||
# The result will be in ${PWD}/cmake-build
|
||||
```
|
||||
|
||||
## Windows binaries
|
||||
|
||||
### Windows with devkitPros version of msys2
|
||||
|
Loading…
Reference in New Issue
Block a user