Run CI on CentOS 7 (#574)

This commit is contained in:
leo60228 2021-01-11 00:30:15 -05:00 committed by GitHub
parent b1558f574c
commit 89886e6c52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 96 additions and 15 deletions

View File

@ -7,30 +7,19 @@ env:
SRC_DIR_PATH: desktop_version
jobs:
build:
name: Build
build-mac:
name: Build (macos-latest)
runs-on: ${{ matrix.os }}
runs-on: macos-latest
env:
CXXFLAGS: -I/usr/local/include/SDL2
LDFLAGS: -L/usr/local/lib
strategy:
matrix:
os: [ubuntu-18.04, macos-latest]
steps:
- uses: actions/checkout@v1
- name: Install dependencies (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y ninja-build libsdl2-dev libsdl2-mixer-dev
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos')
- name: Install dependencies
run: brew install ninja sdl2 sdl2_mixer
- name: CMake configure (default version)
@ -69,6 +58,55 @@ jobs:
- name: Build (no editor)
run: ninja -C ${SRC_DIR_PATH}/build
build-lin:
name: Build (CentOS 7)
runs-on: ubuntu-latest
container: ghcr.io/leo60228/vvvvvv-build@sha256:485448ad437653d47ceb068a0f2b910f4eb336107d340a1f0d828ca95c987985
env:
CXXFLAGS: -I/usr/local/include/SDL2
LDFLAGS: -L/usr/local/lib
steps:
- uses: actions/checkout@v1
- name: CMake configure (default version)
run: |
mkdir ${SRC_DIR_PATH}/build && cd ${SRC_DIR_PATH}/build
cmake ..
- name: Build (default version)
run: make -j $(nproc) -C ${SRC_DIR_PATH}/build
- name: CMake configure (official)
run: |
cd ${SRC_DIR_PATH}/build
cmake -DOFFICIAL_BUILD=ON ..
- name: Build (official)
run: |
make -j $(nproc) -C ${SRC_DIR_PATH}/build
- name: CMake configure (M&P)
run: |
cd ${SRC_DIR_PATH}/build
cmake -DOFFICIAL_BUILD=OFF -DMAKEANDPLAY=ON ..
- name: Build (M&P)
run: make -j $(nproc) -C ${SRC_DIR_PATH}/build
- name: CMake configure (no custom levels)
run: |
cd ${SRC_DIR_PATH}/build
cmake -DMAKEANDPLAY=OFF -DCUSTOM_LEVEL_SUPPORT=DISABLED ..
- name: Build (no custom levels)
run: make -j $(nproc) -C ${SRC_DIR_PATH}/build
- name: CMake configure (no editor)
run: |
cd ${SRC_DIR_PATH}/build
cmake -DCUSTOM_LEVEL_SUPPORT=NO_EDITOR ..
- name: Build (no editor)
run: make -j $(nproc) -C ${SRC_DIR_PATH}/build
build-win:
name: Build (windows-latest)

View File

@ -0,0 +1,2 @@
**
!Dockerfile

View File

@ -0,0 +1,41 @@
FROM centos:7
# run first to improve caching (other things update more often than SDL2)
WORKDIR /tmp
RUN curl -O https://www.libsdl.org/release/SDL2-2.0.14.tar.gz
RUN tar -xf SDL2-2.0.14.tar.gz
RUN mkdir SDL2-2.0.14/build
RUN curl -O https://www.libsdl.org/projects/SDL_mixer/release/SDL2_mixer-2.0.4.tar.gz
RUN tar -xf SDL2_mixer-2.0.4.tar.gz
RUN mkdir SDL2_mixer-2.0.4/build
# add EPEL (for SDL2)
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
# install dependencies
RUN yum -y install \
# used below
yum-utils \
# SDL2_mixer dependencies
libogg-devel libvorbis-devel \
# VVVVVV dependencies
gcc-c++ cmake make
RUN yum-builddep -y SDL2
RUN yum clean all
WORKDIR /tmp/SDL2-2.0.14/build
RUN ../configure
RUN make -j $(nproc)
RUN make install
WORKDIR /tmp/SDL2_mixer-2.0.4/build
RUN ../configure
RUN make -j $(nproc)
RUN make install
WORKDIR /tmp
RUN rm -rf SDL2-2.0.14.tar.gz SDL2-2.0.14/ SDL2_mixer-2.0.4.tar.gz SDL2_mixer-2.0.4/
WORKDIR /