Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support arm64 for .NET and Go Sample Lambda Funcs #192

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion dotnet/sample-apps/aws-sdk/wrapper/SampleApps/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
#!/bin/sh

GOARCH=${GOARCH-amd64}

# Chosen from Microsoft's documentation for Runtime Identifier (RIDs)
# See more: https://docs.microsoft.com/en-us/dotnet/core/rid-catalog#linux-rids
if [ $GOARCH = "amd64" ]; then
DOTNET_LINUX_ARCH=x64
elif [ $GOARCH = "arm64" ]; then
DOTNET_LINUX_ARCH=arm64
else
echo "Invalid GOARCH value `$GOARCH` received."
exit 2
fi

mkdir -p build/dotnet
dotnet publish --output "./build/dotnet" --configuration "Release" --framework "netcoreapp3.1" /p:GenerateRuntimeConfigurationFiles=true --runtime linux-x64 --self-contained false
dotnet publish \
--output "./build/dotnet" \
--configuration "Release" \
--framework "netcoreapp3.1" /p:GenerateRuntimeConfigurationFiles=true \
--runtime linux-$DOTNET_LINUX_ARCH \
--self-contained false
cd build/dotnet || exit
zip -r ../function.zip *
4 changes: 3 additions & 1 deletion go/sample-apps/function/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh

GOARCH=${GOARCH-amd64}

mkdir -p build
GOOS=linux GOARCH=amd64 go build -o ./build/bootstrap .
GOOS=linux go build -o ./build/bootstrap .
cd build || exit
zip bootstrap.zip bootstrap