-
Notifications
You must be signed in to change notification settings - Fork 38
80 lines (76 loc) · 2.28 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build & Test
on:
pull_request:
branches:
- develop
- "feat*"
merge_group:
types: [checks_requested]
branches:
- develop
- "feat*"
jobs:
run-workflow:
name: Parent PR Status Check
# If any dependent jobs fails, this WF skips which won't block merging PRs
# calling always() is required for this WF to run all the time
if: github.repository_owner == 'aws' && always()
runs-on: ubuntu-latest
needs:
- build-multi-arch
steps:
- name: report-failure
if: |
needs.build-multi-arch.result != 'success'
run: exit 1
- name: report-success
run: exit 0
get-sam-cli-version:
runs-on: ubuntu-latest
outputs:
sam_cli_version: ${{ steps.sam_cli_version.outputs.sam_cli_version }}
steps:
- id: sam_cli_version
run: echo "sam_cli_version=$(curl -s https://pypi.org/pypi/aws-sam-cli/json | jq -r .info.version)" >> $GITHUB_OUTPUT
build-multi-arch:
strategy:
fail-fast: false
matrix:
runtime:
- "dotnet6"
- "dotnet7"
- "dotnet8"
- "java8_al2"
- "java11"
- "java17"
- "java21"
- "nodejs16x"
- "nodejs18x"
- "nodejs20x"
- "provided_al2"
- "provided_al2023"
- "python38"
- "python39"
- "python310"
- "python311"
- "python312"
- "ruby32"
include:
- skip_arm_test: false
- runtime: "dotnet8"
skip_arm_test: true
runs-on: ubuntu-latest
needs: [get-sam-cli-version]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: aws-actions/setup-sam@v2
with:
use-installer: true
- run: make init
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} make build-multi-arch
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=x86_64 make test
- run: SAM_CLI_VERSION=${{needs.get-sam-cli-version.outputs.sam_cli_version}} RUNTIME=${{matrix.runtime}} ARCH=arm64 make test
if: ${{ ! matrix.skip_arm_test }}