mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
[build] Added configuration to allow building in container
This commit is contained in:
parent
00086c2ad9
commit
95f5321833
4 changed files with 62 additions and 0 deletions
19
container/build-in-container.sh
Executable file
19
container/build-in-container.sh
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
|
||||
|
||||
podman build \
|
||||
-f "${SCRIPT_DIR}/builder-ubuntu.Dockerfile" \
|
||||
-t wowee-builder-ubuntu
|
||||
|
||||
BUILD_DIR="$(mktemp --tmpdir -d wowee.XXXXX \
|
||||
--suffix=".$(cd "${PROJECT_ROOT}"; git rev-parse --short HEAD)")"
|
||||
podman run \
|
||||
--mount "type=bind,src=${PROJECT_ROOT},dst=/WoWee-src,ro=true" \
|
||||
--mount "type=bind,src=${BUILD_DIR},dst=/build" \
|
||||
localhost/wowee-builder-ubuntu \
|
||||
./build-wowee.sh
|
||||
14
container/build-wowee.sh
Executable file
14
container/build-wowee.sh
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
cp -r /WoWee-src /WoWee
|
||||
|
||||
pushd /WoWee
|
||||
./build.sh
|
||||
popd
|
||||
|
||||
pushd /WoWee/build
|
||||
cmake --install . --prefix=/build
|
||||
popd
|
||||
23
container/builder-ubuntu.Dockerfile
Normal file
23
container/builder-ubuntu.Dockerfile
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
RUN apt-get update && \
|
||||
apt install -y \
|
||||
cmake \
|
||||
build-essential \
|
||||
pkg-config \
|
||||
git \
|
||||
libsdl2-dev \
|
||||
libglew-dev \
|
||||
libglm-dev \
|
||||
libssl-dev \
|
||||
zlib1g-dev \
|
||||
libavformat-dev \
|
||||
libavcodec-dev \
|
||||
libswscale-dev \
|
||||
libavutil-dev \
|
||||
libstorm-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY build-wowee.sh /
|
||||
|
||||
ENTRYPOINT ./build-wowee.sh
|
||||
Loading…
Add table
Add a link
Reference in a new issue