Merge pull request #5992 from libgit2/ethomson/centos_ci ci: add centos 7 and centos 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f0e9da9..d1a0be7 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -43,6 +43,8 @@ jobs:
dockerfile: bionic
base: multiarch/ubuntu-core:arm64-bionic
qemu: true
+ - name: centos7
+ - name: centos8
runs-on: ubuntu-latest
steps:
- name: Check out repository
diff --git a/ci/docker/centos7 b/ci/docker/centos7
new file mode 100644
index 0000000..7164583
--- /dev/null
+++ b/ci/docker/centos7
@@ -0,0 +1,39 @@
+ARG BASE=centos:7
+FROM ${BASE} AS yum
+RUN yum install -y \
+ which \
+ git \
+ libarchive \
+ cmake \
+ gcc \
+ gcc-c++ \
+ make \
+ openssl-devel \
+ openssh-server \
+ git-daemon \
+ java-1.8.0-openjdk-headless \
+ sudo \
+ python
+
+FROM yum AS libssh2
+RUN cd /tmp && \
+ curl https://libssh2.org/download/libssh2-1.8.0.tar.gz | tar -xz && \
+ cd libssh2-1.8.0 && \
+ ./configure && \
+ make && \
+ make install
+
+FROM libssh2 AS cmake
+RUN cd /tmp && \
+ curl -L https://github.com/Kitware/CMake/releases/download/v3.21.1/cmake-3.21.1.tar.gz | tar -xz && \
+ cd cmake-3.21.1 && \
+ ./configure && \
+ make && \
+ make install
+
+FROM libssh2 AS adduser
+RUN useradd --shell /bin/bash libgit2 --create-home
+
+FROM adduser AS configure
+ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
+RUN mkdir /var/run/sshd
diff --git a/ci/docker/centos8 b/ci/docker/centos8
new file mode 100644
index 0000000..0414838
--- /dev/null
+++ b/ci/docker/centos8
@@ -0,0 +1,30 @@
+ARG BASE=centos:8
+FROM ${BASE} AS yum
+RUN yum install -y \
+ which \
+ git \
+ libarchive \
+ cmake \
+ gcc \
+ make \
+ openssl-devel \
+ openssh-server \
+ git-daemon \
+ java-1.8.0-openjdk-headless \
+ sudo \
+ python39
+
+FROM yum AS libssh2
+RUN cd /tmp && \
+ curl https://libssh2.org/download/libssh2-1.8.0.tar.gz | tar -xz && \
+ cd libssh2-1.8.0 && \
+ ./configure && \
+ make && \
+ make install
+
+FROM libssh2 AS adduser
+RUN useradd --shell /bin/bash libgit2 --create-home
+
+FROM adduser AS configure
+ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig
+RUN mkdir /var/run/sshd