-
Notifications
You must be signed in to change notification settings - Fork 369
42 lines (34 loc) · 1.01 KB
/
build-pr.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
name: Build and test PR (changed APIs only)
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
strategy:
matrix:
regex: ["'Google\\.Cloud\\.[A-L].*'", "'Google\\.Cloud\\.[M-Z].*'", "'!Google\\.Cloud'"]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 100
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
# The GitHub checkout action leaves the repo in a slightly awkward
# state. This tidies it up.
- name: Set up git branches
run: |
git checkout -b pr-head
git checkout -b main ${{ github.event.pull_request.base.sha }}
git checkout pr-head
- name: Detect CRLF files
run: |
! git ls-files --eol | grep -e i/crlf -e i/mixed
- name: Build and test
run: |
touch build_timing_log.txt
./build.sh --diff --regex ${{ matrix.regex }}
./processbuildtiminglog.sh