From 27340759094657233088369686aebd6a5c686842 Mon Sep 17 00:00:00 2001 From: Carsten Teibes Date: Thu, 18 Jun 2020 03:31:57 +0200 Subject: [PATCH] Add docker-based compilation actions --- .github/workflows/compilation.yml | 26 ++++++++++++++++++++++++++ .github/workflows/docker.yml | 24 ++++++++++++++++++++++++ Dockerfile | 15 +++++++++++++++ 3 files changed, 65 insertions(+) create mode 100644 .github/workflows/compilation.yml create mode 100644 .github/workflows/docker.yml create mode 100644 Dockerfile diff --git a/.github/workflows/compilation.yml b/.github/workflows/compilation.yml new file mode 100644 index 00000000..a4e73f2d --- /dev/null +++ b/.github/workflows/compilation.yml @@ -0,0 +1,26 @@ +name: CI + +on: + push: + pull_request: + repository_dispatch: + types: [run_build] + +jobs: + build: + runs-on: ubuntu-latest + container: pspdev/psptoolchain:latest + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + run: | + apk add build-base autoconf automake zlib-dev + + - name: Compile PSPSDK + run: | + ./bootstrap + ./configure + make clean + make -j2 + make install diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..470c9eb4 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,24 @@ +name: CI-Docker + +on: + push: + branches: + - master + repository_dispatch: + types: [run_build] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - uses: docker/build-push-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + repository: ${{ env.GITHUB_REPOSITORY }} + tags: latest + tag_with_ref: true + add_git_labels: true diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..fedcd0b8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +# First stage +FROM pspdev/psptoolchain:latest + +COPY . /src + +RUN apk add build-base autoconf automake zlib-dev +RUN cd /src && ./bootstrap && ./configure && make all install clean + +# Second stage +FROM alpine:latest + +ENV PSPDEV /usr/local/pspdev +ENV PATH $PATH:${PSPDEV}/bin + +COPY --from=0 ${PSPDEV} ${PSPDEV}