-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: gh action and dockerfile added
- Loading branch information
1 parent
ac866d7
commit 32784f2
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: build | ||
on: | ||
workflow_dispatch: | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
# - name: docker build | ||
# run : | | ||
# docker build -t crawl:latest . | ||
- name: build | ||
run : | | ||
docker buildx build -t crawl:latest --platform linux/i386,linux/x86_64 . | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM alpine:3.16 as build | ||
|
||
ENV CRAWL_REPO="https://github.com/crawl/crawl.git" | ||
ENV APP_DEPS="bzip2 git lua-dev python3 python3-dev py3-pip py3-yaml ncurses-terminfo-base libc-utils sqlite-libs pcre-dev musl-locales lsof sudo autoconf bison build-base flex git ncurses-dev sqlite-dev zlib-dev pkgconf binutils freetype-dev libpng-dev ttf-dejavu advancecomp pngcrush libexecinfo-dev" | ||
|
||
RUN apk update && apk add --no-cache $APP_DEPS | ||
|
||
RUN git clone --filter=tree:0 ${CRAWL_REPO} /src/ | ||
|
||
WORKDIR /src/crawl-ref/source | ||
|
||
# related to https://github.com/crawl/crawl/issues/2446 | ||
RUN sed -i "/#define BACKTRACE_SUPPORTED/d" crash.cc | ||
RUN make install -j$(nproc) EXTERNAL_DEFINES="-lexecinfo" DESTDIR=/app/ USE_DGAMELAUNCH=y WEBTILES=y | ||
|
||
FROM python:alpine3.19 | ||
|
||
COPY --from=build /app /app | ||
COPY --from=build /src/crawl-ref/source/util /app/util | ||
COPY --from=build /src/crawl-ref/source/webserver /app/webserver | ||
|
||
RUN pip install --no-cache-dir -r /app/webserver/requirements/base.py3.txt | ||
|
||
RUN cp /app/bin/crawl /app/crawl | ||
|
||
EXPOSE 8080 | ||
CMD python /app/webserver/server.py |