Skip to content

chore: Fix arm e2e aot #700

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

Merged
merged 7 commits into from
Jan 20, 2025
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
50 changes: 44 additions & 6 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ jobs:
cdk deploy --require-approval never

deploy-aot-stack:
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-24.04-arm, ubuntu-latest]
include:
- os: ubuntu-24.04-arm
arch: arm64
- os: ubuntu-latest
arch: x86_64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
Expand All @@ -73,10 +81,10 @@ jobs:
- name: Install AWS Lambda .NET CLI Tools
run: dotnet tool install -g Amazon.Lambda.Tools

- name: Deploy AOT Stack x86_64
- name: Deploy AOT Stack
run: |
cd libraries/tests/e2e/infra-aot
cdk deploy -c architecture=x86_64 --require-approval never
cdk deploy -c architecture=${{ matrix.arch }} --require-approval never

run-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -132,8 +140,38 @@ jobs:
run: |
cd libraries/tests/e2e/infra
cdk destroy --force

- name: Destroy AOT Core Stack

destroy-aot-stack:
strategy:
matrix:
os: [ubuntu-24.04-arm, ubuntu-latest]
include:
- os: ubuntu-24.04-arm
arch: arm64
- os: ubuntu-latest
arch: x86_64
runs-on: ${{ matrix.os }}
needs: run-tests
if: always()
steps:
- name: Checkout code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
with:
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
aws-region: us-east-1
mask-aws-account-id: true

- name: Install CDK
run: npm install -g aws-cdk

- name: Install AWS Lambda .NET CLI Tools
run: dotnet tool install -g Amazon.Lambda.Tools

- name: Destroy arm64 AOT Core Stack
run: |
cd libraries/tests/e2e/infra-aot
cdk destroy -c architecture=x86_64 --force
cdk destroy -c architecture=${{ matrix.arch }} --force

10 changes: 8 additions & 2 deletions libraries/tests/e2e/infra-aot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,17 @@ public static void Main(string[] args)
throw new System.ArgumentException("architecture context must be either arm64 or x86_64");
}

_ = new CoreAotStack(app, "CoreAotStack", new AotStackProps
var id = "CoreAotStack";
if(architecture == "arm64")
{
id = $"CoreAotStack-{architecture}";
}

_ = new CoreAotStack(app, id, new AotStackProps
{
Architecture = architecture
});
app.Synth();
}
}
}
}
Loading