Skip to content

lambda-layers

lambda-layers #62

Workflow file for this run

name: lambda-layers
on:
workflow_dispatch:
jobs:
lambda-build-p312:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=.
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312
path: lambda_layer/
lambda-build-p312-pandas:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=. && \
pip3 install pandas --target=.
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312-pandas
path: lambda_layer/
lambda-build-p312-pdf:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install Poppler
run: |
dnf install -y poppler-utils which mlocate libjpeg-devel fontconfig-devel libtiff-devel libpng-devel pkg-config
rpm -Uvh https://rpmfind.net/linux/opensuse/distribution/leap/15.5/repo/oss/x86_64/libopenjpeg1-1.5.2-150000.4.10.1.x86_64.rpm
rpm -Uvh https://rpmfind.net/linux/opensuse/distribution/leap/15.5/repo/oss/x86_64/openjpeg-devel-1.5.2-150000.4.10.1.x86_64.rpm
updatedb && mkdir -p lambda_layer/python/bin
- name: Copy dependencies
run: |
cp /usr/lib64/libpoppler.so* lambda_layer/python/bin/ && \
cp $(which pdftoppm) lambda_layer/python/bin/ && \
cp $(which pdfinfo) lambda_layer/python/bin/ && \
cp $(which pdftocairo) lambda_layer/python/bin/ && \
cp /usr/lib64/libfreetype.so.6 lambda_layer/python/bin && \
cp /usr/lib64/libfontconfig.so.1 lambda_layer/python/bin && \
cp /usr/lib64/libjpeg.so.62 lambda_layer/python/bin && \
cp /usr/lib64/libopenjp2.so.7 lambda_layer/python/bin && \
cp /usr/lib64/liblcms2.so.2 lambda_layer/python/bin && \
cp /usr/lib64/libpng16.so.16 lambda_layer/python/bin && \
cp /usr/lib64/libtiff.so.5 lambda_layer/python/bin && \
cp /usr/lib64/libsmime3.so lambda_layer/python/bin && \
cp /usr/lib64/libnss3.so lambda_layer/python/bin && \
cp /usr/lib64/libplc4.so lambda_layer/python/bin && \
cp /usr/lib64/libnspr4.so lambda_layer/python/bin && \
cp /usr/lib64/libm.so.6 lambda_layer/python/bin && \
cp /usr/lib64/libbz2.so.1 lambda_layer/python/bin && \
cp /usr/lib64/libz.so.1 lambda_layer/python/bin && \
cp /usr/lib64/libharfbuzz.so.0 lambda_layer/python/bin && \
cp /usr/lib64/libbrotlidec.so.1 lambda_layer/python/bin && \
cp /usr/lib64/libxml2.so.2 lambda_layer/python/bin && \
cp /usr/lib64/libwebp.so.7 lambda_layer/python/bin && \
cp /usr/lib64/libzstd.so.1 lambda_layer/python/bin && \
cp /usr/lib64/libjbig.so.2.1 lambda_layer/python/bin && \
cp /usr/lib64/libnssutil3.so lambda_layer/python/bin && \
cp /usr/lib64/libplds4.so lambda_layer/python/bin && \
cp /usr/lib64/libglib-2.0.so.0 lambda_layer/python/bin && \
cp /usr/lib64/libgraphite2.so.3 lambda_layer/python/bin && \
cp /usr/lib64/libbrotlicommon.so.1 lambda_layer/python/bin && \
cp /usr/lib64/liblzma.so.5 lambda_layer/python/bin && \
cp /usr/lib64/libpcre2-8.so.0 lambda_layer/python/bin
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=. && \
pip3 install pdf2image --target=. && \
cd .. \
&& zip -r /textractor.zip python/
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312-pdf
path: lambda_layer/
lambda-build-p312-pdfium:
runs-on: ubuntu-latest
container: public.ecr.aws/sam/build-python3.12:latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
- name: Install and build
run: |
mkdir -p lambda_layer/python && \
cd lambda_layer/python && \
pip3 install ../../ --target=. && \
pip3 install pypdfium2 --target=. && \
cd .. \
&& zip -r /textractor.zip python/
- uses: actions/upload-artifact@v3
with:
name: textractor-lambda-p312-pdfium
path: lambda_layer/