-
Notifications
You must be signed in to change notification settings - Fork 146
114 lines (114 loc) · 4.78 KB
/
lambda_layers.yml
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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
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.2/repo/oss/x86_64/libopenjpeg1-1.5.2-lp152.4.9.x86_64.rpm
rpm -Uvh https://rpmfind.net/linux/opensuse/distribution/leap/15.3/repo/oss/x86_64/openjpeg-devel-1.5.2-2.28.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/