From dfe2438574d7ac85d8e8207b86928b3ad20343dd Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 5 Sep 2020 13:51:46 +0200 Subject: [PATCH] Unifiy github action workflows into a single one --- .github/workflows/building.yml | 34 ++++++++++++++++++++++++++++++ .github/workflows/linux-x86-64.yml | 20 ------------------ .github/workflows/pc-win.yml | 18 ---------------- Dockerfile.pc | 6 ++---- 4 files changed, 36 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/building.yml delete mode 100644 .github/workflows/linux-x86-64.yml delete mode 100644 .github/workflows/pc-win.yml diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml new file mode 100644 index 0000000..d5612c8 --- /dev/null +++ b/.github/workflows/building.yml @@ -0,0 +1,34 @@ +name: Building binaries. +on: + push: + branches: + - master +jobs: + build-windows-binary: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + - name: build binary + run: | + docker build . -f Dockerfile.pc-win -t sdl2_playground-builder-pc-win + docker run --rm -v ${PWD}:/project sdl2_playground-builder-pc-win make -f Makefile.pc-win + - uses: actions/upload-artifact@master + with: + name: windows-x64-shared + path: "*.exe" + build-linux-x86-64-binary: + runs-on: ubuntu-18.04 + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: build binary + run: | + docker build . -f Dockerfile.pc -t sdl2_playground-builder-pc + docker run --rm -v ${PWD}:/project sdl2_playground-builder-pc bash -c "cd .. && bash filelist.sh" + docker run --rm -v ${PWD}:/project sdl2_playground-builder-pc cmake .. + docker run --rm -v ${PWD}:/project sdl2_playground-builder-pc make + - uses: actions/upload-artifact@master + with: + name: linux-x86-64-shared + path: "./cmake-build/SDL2_Playground" \ No newline at end of file diff --git a/.github/workflows/linux-x86-64.yml b/.github/workflows/linux-x86-64.yml deleted file mode 100644 index b92b77a..0000000 --- a/.github/workflows/linux-x86-64.yml +++ /dev/null @@ -1,20 +0,0 @@ -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" \ No newline at end of file diff --git a/.github/workflows/pc-win.yml b/.github/workflows/pc-win.yml deleted file mode 100644 index 5b8847f..0000000 --- a/.github/workflows/pc-win.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Windows 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-win -t sdl2_playground-builder-pc-win - docker run --rm -v ${PWD}:/project sdl2_playground-builder-pc-win make -f Makefile.pc-win - - uses: actions/upload-artifact@master - with: - name: windows-shared binary - path: "*.exe" \ No newline at end of file diff --git a/Dockerfile.pc b/Dockerfile.pc index 25529c1..2a64268 100644 --- a/Dockerfile.pc +++ b/Dockerfile.pc @@ -1,8 +1,6 @@ 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 && \ +ARG DEBIAN_FRONTEND=noninteractive +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 && \