-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #503 from gotcha/centos-on-gh
Centos container on Github Actions
- Loading branch information
Showing
10 changed files
with
205 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
pythons | ||
python_builds | ||
download_cache | ||
parts | ||
eggs | ||
venvs | ||
.cache | ||
lib | ||
**/__pycache__ | ||
**/*.pyc | ||
.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM centos as centos-python | ||
RUN yum install -y make gcc openssl-devel libffi-devel | ||
ARG PYTHON_VER | ||
ENV LC_CTYPE="en_US.UTF-8" | ||
RUN mkdir buildout | ||
WORKDIR /buildout | ||
COPY Makefile Makefile.configure /buildout/ | ||
RUN make PYTHON_VER=${PYTHON_VER} download_python | ||
RUN make PYTHON_VER=${PYTHON_VER} python | ||
FROM centos-python | ||
ARG PYTHON_VER | ||
COPY doc /buildout/doc | ||
COPY src /buildout/src | ||
COPY zc.recipe.egg_ /buildout/zc.recipe.egg_ | ||
COPY setup.* dev.py *.rst *.txt buildout.cfg /buildout/ | ||
RUN make PYTHON_VER=${PYTHON_VER} build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Buildout on Centos | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.5, 3.6, 3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build container with Python ${{ matrix.python-version }} | ||
env: | ||
PYTHON_VER: ${{matrix.python-version}} | ||
run: | | ||
docker build -f .github/workflows/Dockerfile --tag centos_buildout:python${PYTHON_VER} --build-arg PYTHON_VER=${PYTHON_VER} . | ||
- name: Test | ||
env: | ||
PYTHON_VER: ${{matrix.python-version}} | ||
run: | | ||
docker run centos_buildout:python${PYTHON_VER} /buildout/bin/test -c -vvv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
ifeq ($(PYTHON_VER),2.7) | ||
PYTHON_CONFIGURE_ARGS ?= | ||
endif | ||
ifeq ($(PYTHON_VER),3.5) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip | ||
endif | ||
ifeq ($(PYTHON_VER),3.6) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip | ||
endif | ||
ifeq ($(PYTHON_VER),3.7) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip | ||
endif | ||
ifeq ($(PYTHON_VER),3.8) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
OPENSSL = $(shell brew --prefix openssl) | ||
|
||
ifeq ($(PYTHON_VER),2.7) | ||
BUILD_VARIABLES = LDFLAGS="-L$(OPENSSL)/lib" CPPFLAGS="-I$(OPENSSL)/include" | ||
PYTHON_CONFIGURE_ARGS ?= | ||
endif | ||
ifeq ($(PYTHON_VER),3.5) | ||
BUILD_VARIABLES = LDFLAGS="-L$(OPENSSL)/lib" CPPFLAGS="-I$(OPENSSL)/include" | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip | ||
endif | ||
ifeq ($(PYTHON_VER),3.6) | ||
BUILD_VARIABLES = LDFLAGS="-L$(OPENSSL)/lib" CPPFLAGS="-I$(OPENSSL)/include" | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip | ||
endif | ||
ifeq ($(PYTHON_VER),3.7) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip --with-openssl=$(OPENSSL) | ||
endif | ||
ifeq ($(PYTHON_VER),3.8) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip --with-openssl=$(OPENSSL) | ||
endif | ||
ifeq ($(PYTHON_VER),3.9) | ||
PYTHON_CONFIGURE_ARGS ?= --without-ensurepip --with-openssl=$(OPENSSL) | ||
endif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters