Merge pull request #12 from rewbycraft/feature/gh-actions

Add Linux CI
This commit is contained in:
Job Snijders
2019-12-21 16:00:33 +01:00
committed by GitHub
12 changed files with 92 additions and 0 deletions

19
.github/images/centos.Dockerfile vendored Normal file
View File

@@ -0,0 +1,19 @@
ARG image=centos:8
FROM $image
# Install dependencies
RUN yum update -y
RUN yum groupinstall -y 'Development Tools'
RUN yum install -y autoconf automake findutils
# Add source code
ADD . /src
WORKDIR /src
# Run steps
RUN ./bootstrap
RUN ./configure
RUN make
RUN make check
RUN make distcheck

1
.github/images/centos:7.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
centos.Dockerfile

1
.github/images/centos:8.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
centos.Dockerfile

22
.github/images/debian.Dockerfile vendored Normal file
View File

@@ -0,0 +1,22 @@
ARG image=debian:buster
FROM $image
# From https://github.com/docker-library/postgres/blob/69bc540ecfffecce72d49fa7e4a46680350037f9/9.6/Dockerfile#L21-L24
RUN apt-get update && apt-get install -y locales && rm -rf /var/lib/apt/lists/* \
&& localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
ENV LANG en_US.utf8
# Install dependencies
RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y build-essential autoconf automake markdown && rm -rf /var/lib/apt/lists/*
# Add source code
ADD . /src
WORKDIR /src
# Run steps
RUN ./bootstrap
RUN ./configure
RUN make
RUN make check
RUN make distcheck

1
.github/images/debian:buster.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
debian.Dockerfile

1
.github/images/debian:stretch.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
debian.Dockerfile

1
.github/images/fedora:30.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
centos.Dockerfile

1
.github/images/fedora:31.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
centos.Dockerfile

1
.github/images/ubuntu:bionic.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
debian.Dockerfile

1
.github/images/ubuntu:xenial.Dockerfile vendored Symbolic link
View File

@@ -0,0 +1 @@
debian.Dockerfile

20
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Build and test (single linux distro)
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: bootstrap
run: ./bootstrap
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck

23
.github/workflows/matrixbuild.yml vendored Normal file
View File

@@ -0,0 +1,23 @@
name: Build and test (linux matrix)
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dockerenv:
- debian:buster
- debian:stretch
- ubuntu:bionic
- ubuntu:xenial
- centos:8
- centos:7
- fedora:31
- fedora:30
steps:
- uses: actions/checkout@v1
- name: Run build on ${{matrix.dockerenv}}
run: docker build . --file .github/images/${{matrix.dockerenv}}.Dockerfile --build-arg image=${{matrix.dockerenv}}