forked from HEPCloud/decisionengine
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to Github Actions to allow building with python3.6
- Loading branch information
Showing
15 changed files
with
206 additions
and
132 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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
name: 'Run pylint' | ||
description: 'Run pylint in preconfigured SL7 docker image' | ||
inputs: | ||
PYVER: | ||
description: "The python version to build with." | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.PYVER }} |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/bash -x | ||
#!/bin/bash | ||
export PYVER=$1 | ||
echo PYVER=$PYVER | ||
decisionengine/build/scripts/run_pylint.sh | ||
tar cvfj $GITHUB_WORKSPACE/logs.tar.bz2 pep8.*.log pylint.*.log | ||
exit 0 | ||
status=$? | ||
tar cvfj $GITHUB_WORKSPACE/logs-$PYVER.tar.bz2 pep8.*.log pylint.*.log | ||
exit $status |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
name: 'RPM build' | ||
description: 'Run rpm build in preconfigured SL7 docker image' | ||
inputs: | ||
PYVER: | ||
description: "The python version to build with." | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.PYVER }} |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
#!/bin/bash -x | ||
decisionengine/build/packaging/rpm/package.sh $PWD | ||
tar cvf $GITHUB_WORKSPACE/rpmbuild.tar /var/tmp/root/rpm/decisionengine/* | ||
exit 0 | ||
#!/bin/bash | ||
echo PYVER=$1 | ||
export PYVER=$1 | ||
decisionengine/build/packaging/rpm/package.sh decisionengine | ||
status=$? | ||
tar cf $GITHUB_WORKSPACE/rpmbuild-$PYVER.tar /var/tmp/root/rpm/decisionengine/* | ||
exit $status |
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 |
---|---|---|
@@ -1,5 +1,11 @@ | ||
name: 'Unit Tests' | ||
description: 'Run unit tests in preconfigured SL7 docker image' | ||
inputs: | ||
PYVER: | ||
description: "The python version to build with." | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.PYVER }} |
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 |
---|---|---|
@@ -1,15 +1,28 @@ | ||
#!/bin/bash -x | ||
echo $PWD | ||
#!/bin/bash | ||
export PYVER=$1 | ||
echo PYVER=$PYVER | ||
echo PWD=$PWD | ||
export PYTHONPATH=$PWD | ||
|
||
[ -d decisionengine/framework/logicengine/cxx/build ] && rm -rf decisionengine/framework/logicengine/cxx/build | ||
OLDWD=$PWD | ||
mkdir decisionengine/framework/logicengine/cxx/build | ||
cd decisionengine/framework/logicengine/cxx/build | ||
cmake3 .. | ||
cmake3 .. -DPYVER=$PYVER | ||
make VERBOSE=1 | ||
cd ../../ | ||
[ -f RE.so ] && rm RE.so | ||
ln -s cxx/build/ErrorHandler/RE.so | ||
[ -f libLogicEngine.so ] && rm libLogicEngine.so | ||
ln -s cxx/build/ErrorHandler/libLogicEngine.so | ||
export LD_LIBRARY_PATH=$PWD | ||
cd ../../ | ||
cd $OLDWD | ||
|
||
py.test -v --tb=native > $GITHUB_WORKSPACE/test.log 2>&1 | ||
exit 0 | ||
if [ "$PYVER" == "3.6" ] ;then | ||
py.test-3 -v --tb=native decisionengine > ./test-$PYVER.log 2>&1 | ||
status=$? | ||
else | ||
py.test -v --tb=native decisionengine > ./test-$PYVER.log 2>&1 | ||
status=$? | ||
fi | ||
exit $status |
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 |
---|---|---|
@@ -1,28 +1,29 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
- 0* | ||
on: [pull_request, push] | ||
|
||
jobs: | ||
rpm_build_job: | ||
runs-on: ubuntu-latest | ||
name: A job to build the decision engine rpm | ||
strategy: | ||
matrix: | ||
pyver: ["2.7", "3.6"] | ||
fail-fast: false | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: 'decisionengine' | ||
id: checkout | ||
- name: rpm build action step | ||
uses: ./.github/actions/rpmbuild-in-sl7-docker | ||
id: rpm_build | ||
- name: Archive rpm | ||
if: always() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: rpms | ||
path: rpmbuild.tar | ||
- uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
path: 'decisionengine' | ||
id: checkout | ||
- name: rpm build action step | ||
uses: ./.github/actions/rpmbuild-in-sl7-docker | ||
id: rpm_build | ||
with: | ||
PYVER: ${{ matrix.pyver }} | ||
- name: Archive rpm | ||
if: always() | ||
uses: actions/upload-artifact@v1 | ||
with: | ||
name: rpms | ||
path: rpmbuild-${{ matrix.pyver }}.tar |
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 |
---|---|---|
|
@@ -105,3 +105,5 @@ venv.bak/ | |
|
||
# Decision Engine modules | ||
modules/ | ||
|
||
.DS_Store |
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 |
---|---|---|
@@ -1,35 +1,51 @@ | ||
FROM sl:7 | ||
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | ||
RUN yum -y install yum-plugin-priorities | ||
RUN yum -y clean all | ||
RUN yum -y install https://repo.opensciencegrid.org/osg/3.4/osg-3.4-el7-release-latest.rpm | ||
RUN yum -y clean all | ||
RUN yum -y install condor-python | ||
RUN yum -y install python-pandas | ||
RUN yum -y install gcc gcc-c++ libgcc | ||
RUN yum -y install python-pip | ||
RUN yum -y install git | ||
RUN yum -y install python-unittest2 | ||
RUN yum -y install python-behave | ||
RUN yum -y install tmux | ||
RUN yum -y install cmake | ||
RUN yum -y install boost | ||
RUN yum -y install boost-devel | ||
RUN yum -y install libevent-devel | ||
RUN yum -y install ncurses-devel | ||
RUN yum -y install ipython | ||
RUN yum -y install python-matplotlib | ||
RUN yum -y install python-pytest | ||
RUN yum -y install pytest | ||
RUN yum -y install graphviz.x86_64 | ||
RUN yum -y install rpm-build | ||
RUN yum -y install rpm-build-libs | ||
RUN yum -y install rpm-devel | ||
RUN yum -y install mock | ||
RUN yum -y install python-boto3 | ||
RUN yum -y install python-psycopg2 | ||
RUN yum -y install python-setuptools | ||
RUN easy_install DBUtils | ||
RUN yum -y install cmake3 python3-devel | ||
RUN yum -y clean all | ||
RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm yum-plugin-priorities \ | ||
&& yum -y clean all | ||
RUN yum -y install https://repo.opensciencegrid.org/osg/3.4/osg-3.4-el7-release-latest.rpm \ | ||
&& yum -y clean all | ||
RUN yum -y install condor-python \ | ||
python-pandas \ | ||
gcc gcc-c++ libgcc \ | ||
python-pip \ | ||
git \ | ||
python-unittest2 \ | ||
python-behave \ | ||
tmux \ | ||
cmake \ | ||
boost \ | ||
boost-devel \ | ||
libevent-devel \ | ||
ncurses-devel \ | ||
ipython \ | ||
python-matplotlib \ | ||
python-pytest \ | ||
pytest \ | ||
graphviz.x86_64 \ | ||
rpm-build \ | ||
rpm-build-libs \ | ||
rpm-devel \ | ||
mock \ | ||
python-boto3 \ | ||
python-psycopg2 \ | ||
python-setuptools \ | ||
&& easy_install DBUtils \ | ||
&& yum -y install cmake3 python3-devel make \ | ||
boost-python36-devel \ | ||
python3-devel \ | ||
boost-regex \ | ||
boost-system \ | ||
boost-python-devel \ | ||
python-devel \ | ||
redhat-lsb-core \ | ||
python36-virtualenv \ | ||
python-virtualenv \ | ||
postgresql-devel \ | ||
pytest \ | ||
python36-pytest \ | ||
python36-tabulate \ | ||
python2-tabulate \ | ||
python36-pip \ | ||
&& pip install --upgrade pip \ | ||
&& pip3.6 install argparse WebOb astroid pylint pycodestyle unittest2 coverage sphinx DBUtils pytest mock \ | ||
&& yum -y clean all | ||
ENTRYPOINT ["/bin/bash"] |
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
Oops, something went wrong.