Skip to content

Commit 2718bc4

Browse files
authored
ci: github actions pr build (#34825)
Run the PR build in GitHub Actions for improved user experience and reliability. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 1965014 commit 2718bc4

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/pr-build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: PR Build
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
- v2-release
8+
9+
jobs:
10+
build:
11+
runs-on: aws-cdk_ubuntu-latest_16-core
12+
13+
env:
14+
PR_BUILD: true
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: "18"
24+
cache: "yarn"
25+
26+
- name: Set up Docker
27+
uses: docker/setup-buildx-action@v3
28+
29+
# @TODO
30+
# - name: Start ECR proxy
31+
# run: /root/ecr-proxy/start.sh
32+
33+
- name: Cache build artifacts
34+
uses: actions/cache@v3
35+
with:
36+
path: |
37+
~/.s3buildcache
38+
key: ${{ runner.os }}-${{ github.event.pull_request.base.ref }}-s3buildcache
39+
40+
- name: Configure system settings
41+
run: |
42+
(command -v sysctl || sudo apt-get update && sudo apt-get install -y procps) && \
43+
sudo sysctl -w vm.max_map_count=2251954
44+
45+
- name: Build
46+
run: /bin/bash ./build.sh --ci
47+
48+
- name: Run Rosetta
49+
run: /bin/bash ./scripts/run-rosetta.sh
50+
51+
- name: Check for uncommitted changes
52+
run: git diff-index --exit-code --ignore-space-at-eol --stat HEAD

0 commit comments

Comments
 (0)