Skip to content

Commit af33155

Browse files
committed
Attempt fixes for amzn2023 in Test workflow
1 parent fc98941 commit af33155

File tree

8 files changed

+40
-20
lines changed

8 files changed

+40
-20
lines changed

amzn2023/Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
22

3-
RUN dnf install -y gcc openssl-devel python3-pip
4-
RUN dnf clean all
5-
63
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7-
ENV PATH="/root/.cargo/bin:${PATH}"
4+
ENV PATH="~/.cargo/bin:${PATH}"
5+
6+
RUN ~/.cargo/bin/rustup update \
7+
&& ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
88

9-
RUN /root/.cargo/bin/rustup update \
10-
&& /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
119
RUN rustup default stable
12-
WORKDIR /var/task
10+
11+
# Install required build dependencies
12+
RUN dnf install -y gcc openssl-devel python3-pip util-linux && \
13+
pip3 install setuptools && \
14+
dnf clean all
1315

1416
ENV CRYPTEIA_BUILD_OS=amzn
1517
ENV CRYPTEIA_BUILD_TARGET=x86_64-unknown-linux-gnu
18+

amzn2023/Dockerfile-arm64

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
22

3-
RUN dnf install -y gcc openssl-devel python3-pip
4-
RUN dnf clean all
5-
63
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
7-
ENV PATH="/root/.cargo/bin:${PATH}"
4+
ENV PATH="~/.cargo/bin:${PATH}"
5+
6+
RUN ~/.cargo/bin/rustup update \
7+
&& ~/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
88

9-
RUN /root/.cargo/bin/rustup update \
10-
&& /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu
119
RUN rustup default stable
12-
WORKDIR /var/task
10+
11+
# Install required build dependencies
12+
RUN dnf install -y gcc openssl-devel python3-pip util-linux && \
13+
pip3 install setuptools && \
14+
dnf clean all
1315

1416
ENV CRYPTEIA_BUILD_OS=amzn
1517
ENV CRYPTEIA_BUILD_TARGET=aarch64-unknown-linux-gnu

amzn2023/Dockerfile-test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM public.ecr.aws/lambda/provided:al2023
1+
FROM public.ecr.aws/lambda/nodejs:20
22

33
COPY build/crypteia-amzn /opt/extensions/crypteia
44
COPY build/libcrypteia-amzn.so /opt/lib/libcrypteia.so
@@ -10,5 +10,4 @@ ENV EXISTING=existingvalue
1010
ENV LD_PRELOAD=/opt/lib/libcrypteia.so
1111

1212
# For assert.sh support
13-
RUN dnf install -y util-linux
14-
RUN dnf clean all
13+
RUN dnf install -y util-linux && dnf clean all

amzn2023/Dockerfile-test-arm64

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM public.ecr.aws/lambda/nodejs:20-arm64
2+
3+
COPY build/crypteia-amzn-arm64 /opt/extensions/crypteia
4+
COPY build/libcrypteia-amzn-arm64.so /opt/lib/libcrypteia.so
5+
6+
ENV CRYPTEIA_BUILD_OS=amzn
7+
ENV SKIP_CARGO_TEST=1
8+
9+
ENV EXISTING=existingvalue
10+
ENV LD_PRELOAD=/opt/lib/libcrypteia.so
11+
12+
# For assert.sh support
13+
RUN dnf install -y util-linux && dnf clean all
14+

amzn2023/setup

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ docker run \
1111
--entrypoint "./bin/setup" \
1212
--volume "${PWD}:/var/task" \
1313
crypteia-lambda-amzn2023
14+

amzn2023/setup-arm64

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
set -e
33

44
echo "== [amzn2023/Dockerfile-arm64] building... =="
5-
docker build --platform=linux/arm64 --tag crypteia-lambda-amzn2023-arm64 --file amzn2023/Dockerfile-arm64 .
5+
docker build --platform linux/arm64 --tag crypteia-lambda-amzn2023-arm64 --file amzn2023/Dockerfile-arm64 .
66

77
echo "== [amzn2023/Dockerfile-arm64] bin/setup =="
88
docker run \
9+
--platform linux/arm64 \
910
--rm \
1011
--user root \
1112
--entrypoint "./bin/setup" \
1213
--volume "${PWD}:/var/task" \
13-
--platform=linux/arm64 \
1414
crypteia-lambda-amzn2023-arm64

amzn2023/test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ docker run \
2121
--volume "${PWD}:/var/task" \
2222
--env TEST_LANG=node \
2323
crypteia-lambda-amzn2023-test
24+

bin/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ if [ -z "${CRYPTEIA_BUILD_TARGET}" ]; then
1414
export CRYPTEIA_BUILD_TARGET="x86_64-unknown-linux-gnu"
1515
;;
1616
*)
17-
echo "Unsupported architecture: $(uname -m)"
17+
echo "Unsupported architecture: $(uname -m)" >&2
1818
exit 1
1919
;;
2020
esac

0 commit comments

Comments
 (0)