Unifiy github action workflows into a single one

This commit is contained in:
Maschell 2020-09-05 13:51:46 +02:00
parent 7695362c49
commit dfe2438574
4 changed files with 36 additions and 42 deletions

34
.github/workflows/building.yml vendored Normal file
View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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 && \