Skip to content

Commit

Permalink
Support arm64 for .NET and Go Sample Lambda Funcs (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanielRN authored Dec 2, 2021
1 parent 9538af1 commit 9ca06c4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
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

0 comments on commit 9ca06c4

Please sign in to comment.