Skip to content

Commit

Permalink
Bugfix/mendscan (#57)
Browse files Browse the repository at this point in the history
* Add and modify files

* Changes to Dockerfile and requirements

* Edit workflow file

* Edit Dockerfile

* Edit Docker
  • Loading branch information
Keerthana-Bidarakoppa authored Aug 21, 2024
1 parent 2b6348c commit c9d540e
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 49 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/TCGstorageAPI-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: TCGstorageAPI build

on:
push:
branches:
- master
pull_request:
branches:
- master
Expand All @@ -12,7 +10,7 @@ jobs:
build:
name: TCGstorageAPI_build
# This job runs on Linux
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -30,14 +28,12 @@ jobs:
run: |
sudo apt-get install python3-setuptools
pip3 install --no-cache-dir -r requirements.txt
- name: Link gmake to make
run: sudo ln -s /usr/bin/make /usr/bin/gmake
- name: Build opensea
run: python3 setup.py opensea
- name: Build TCGstorageAPI package
run: python3 setup.py build
- name: Run unit tests
run: |
sudo cp -R build/lib.linux-x86_64-3.6/TCGstorageAPI /home/runner/work/TCGstorageAPI/TCGstorageAPI
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/site-packages/
sudo cp -R build/lib.linux-x86_64-3.10/TCGstorageAPI /home/runner/work/TCGstorageAPI/TCGstorageAPI
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.10/dist-packages/
python3 TCGstorageAPI/tcgapi_test.py
28 changes: 20 additions & 8 deletions docker/UBUNTU/18.04/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,27 @@
# limitations under the License.
#
#****************************************************************************
FROM python:3.6
COPY requirements.txt ./
FROM ubuntu:22.04 AS tcgstorageapi

RUN apt-get update && apt-get install -y --reinstall ca-certificates

RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install tzdata

WORKDIR /tcgstorageapi

COPY TCGstorageAPI /tcgstorageapi/TCGstorageAPI
COPY setup.py /tcgstorageapi/setup.py
COPY opensea-common /tcgstorageapi/opensea-common
COPY opensea-operations /tcgstorageapi/opensea-operations
COPY opensea-transport /tcgstorageapi/opensea-transport
COPY pysed /tcgstorageapi/pysed
COPY sed_cli /tcgstorageapi/sed_cli
COPY requirements.txt /tcgstorageapi/requirements.txt

RUN apt update -y && apt-get install -y python3-pip
RUN pip3 install --no-cache-dir -r requirements.txt
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3-all python3-all-dev libgnutls28-dev libboost-all-dev \
RUN apt-get install -y --no-install-recommends python3-all python3-all-dev libgnutls28-dev libboost-all-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /usr/src/TCGStorageAPI
COPY . .
RUN ln -s /usr/bin/make /usr/bin/gmake
RUN python3 setup.py opensea
RUN python3 setup.py build
RUN cp -r build/lib.linux-x86_64-3.6/TCGstorageAPI /usr/local/lib/python3.6/site-packages/.
RUN cp -r build/lib.linux-x86_64-3.10/TCGstorageAPI /usr/local/lib/python3.10/dist-packages/.
31 changes: 0 additions & 31 deletions docker/CENTOS/7/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
boost
cryptography==3.3.2
cryptography==42.0.8
passlib==1.7.4
pycparser==2.20
pyopenssl==20.0.1
pyopenssl==24.2.1
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def run(self):
'pysed/support.cpp',
'pysed/Tls.cpp',
],
libraries=['boost_python3', 'gnutls', 'gnutlsxx' ],
libraries=['boost_python310', 'gnutls', 'gnutlsxx' ],
include_dirs = ['pysed','opensea-transport/include','opensea-common/include','opensea-operations/include','opensea-transport/include/vendor','/usr/local/include'],
extra_objects=['opensea-transport/Make/gcc/lib/libopensea-transport.a','opensea-common/Make/gcc/lib/libopensea-common.a','opensea-operations/Make/gcc/lib/libopensea-operations.a'],
extra_compile_args=['-O0','-g','-DDISABLE_NVME_PASSTHROUGH']
Expand Down

0 comments on commit c9d540e

Please sign in to comment.