Skip to content

Commit a08c5cb

Browse files
authored
Merge pull request #700 from hjgraca/hjgraca-e2e-aot
chore: Fix arm e2e aot
2 parents 7bb697e + 5d4b9b6 commit a08c5cb

File tree

2 files changed

+52
-8
lines changed

2 files changed

+52
-8
lines changed

.github/workflows/e2e-tests.yml

+44-6
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,15 @@ jobs:
5151
cdk deploy --require-approval never
5252
5353
deploy-aot-stack:
54-
runs-on: ubuntu-latest
54+
strategy:
55+
matrix:
56+
os: [ubuntu-24.04-arm, ubuntu-latest]
57+
include:
58+
- os: ubuntu-24.04-arm
59+
arch: arm64
60+
- os: ubuntu-latest
61+
arch: x86_64
62+
runs-on: ${{ matrix.os }}
5563
steps:
5664
- name: Checkout code
5765
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
@@ -73,10 +81,10 @@ jobs:
7381
- name: Install AWS Lambda .NET CLI Tools
7482
run: dotnet tool install -g Amazon.Lambda.Tools
7583

76-
- name: Deploy AOT Stack x86_64
84+
- name: Deploy AOT Stack
7785
run: |
7886
cd libraries/tests/e2e/infra-aot
79-
cdk deploy -c architecture=x86_64 --require-approval never
87+
cdk deploy -c architecture=${{ matrix.arch }} --require-approval never
8088
8189
run-tests:
8290
runs-on: ubuntu-latest
@@ -132,8 +140,38 @@ jobs:
132140
run: |
133141
cd libraries/tests/e2e/infra
134142
cdk destroy --force
135-
136-
- name: Destroy AOT Core Stack
143+
144+
destroy-aot-stack:
145+
strategy:
146+
matrix:
147+
os: [ubuntu-24.04-arm, ubuntu-latest]
148+
include:
149+
- os: ubuntu-24.04-arm
150+
arch: arm64
151+
- os: ubuntu-latest
152+
arch: x86_64
153+
runs-on: ${{ matrix.os }}
154+
needs: run-tests
155+
if: always()
156+
steps:
157+
- name: Checkout code
158+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
159+
160+
- name: Configure AWS credentials
161+
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502
162+
with:
163+
role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }}
164+
aws-region: us-east-1
165+
mask-aws-account-id: true
166+
167+
- name: Install CDK
168+
run: npm install -g aws-cdk
169+
170+
- name: Install AWS Lambda .NET CLI Tools
171+
run: dotnet tool install -g Amazon.Lambda.Tools
172+
173+
- name: Destroy arm64 AOT Core Stack
137174
run: |
138175
cd libraries/tests/e2e/infra-aot
139-
cdk destroy -c architecture=x86_64 --force
176+
cdk destroy -c architecture=${{ matrix.arch }} --force
177+

libraries/tests/e2e/infra-aot/Program.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,17 @@ public static void Main(string[] args)
1919
throw new System.ArgumentException("architecture context must be either arm64 or x86_64");
2020
}
2121

22-
_ = new CoreAotStack(app, "CoreAotStack", new AotStackProps
22+
var id = "CoreAotStack";
23+
if(architecture == "arm64")
24+
{
25+
id = $"CoreAotStack-{architecture}";
26+
}
27+
28+
_ = new CoreAotStack(app, id, new AotStackProps
2329
{
2430
Architecture = architecture
2531
});
2632
app.Synth();
2733
}
2834
}
29-
}
35+
}

0 commit comments

Comments
 (0)