forked from hrydgard/ppsspp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
68 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,37 @@ | ||
name: Generate Docker Layer | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Extract DOCKER_TAG using tag name | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
echo "DOCKER_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV | ||
- name: Use default DOCKER_TAG | ||
if: startsWith(github.ref, 'refs/tags/') != true | ||
run: | | ||
echo "DOCKER_TAG=latest" >> $GITHUB_ENV | ||
- name: Login to Github registry | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
registry: ghcr.io | ||
|
||
- uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
tags: ghcr.io/${{ github.repository }}:${{ env.DOCKER_TAG }} |
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,31 @@ | ||
# First stage | ||
FROM alpine:latest | ||
|
||
COPY . /src | ||
|
||
|
||
RUN apk add build-base wget git bash cmake python3 glu-dev | ||
|
||
# Installing SDL2 from source because current SDL2 package in alpine | ||
# has some tricks that make PPSSPP compilation to fail | ||
ENV SDL_VERSION=2.0.20 | ||
RUN wget https://github.com/libsdl-org/SDL/archive/refs/tags/release-${SDL_VERSION}.tar.gz && \ | ||
tar -xf release-${SDL_VERSION}.tar.gz && cd SDL-release-${SDL_VERSION} && mkdir build && cd build && \ | ||
cmake -DCMAKE_BUILD_TYPE=Release .. && \ | ||
make -j$(getconf _NPROCESSORS_ONLN) clean && \ | ||
make -j$(getconf _NPROCESSORS_ONLN) && \ | ||
make -j$(getconf _NPROCESSORS_ONLN) install | ||
|
||
RUN cd src/ffmpeg && ./linux_x86-64.sh | ||
RUN cd src && ./b.sh --headless | ||
|
||
# Second stage | ||
FROM alpine:latest | ||
|
||
# Install required dependencies to make headless to work | ||
RUN apk add --no-cache sdl2 libstdc++ glu-dev | ||
|
||
# Copy minimal things to make headless to work | ||
COPY --from=0 src/build/PPSSPPHeadless usr/local/bin/ | ||
|
||
RUN PPSSPPHeadless || true |