-
Notifications
You must be signed in to change notification settings - Fork 254
115 lines (96 loc) · 2.75 KB
/
build-pull-request.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
name: "Build Pull Request"
on:
pull_request:
branches:
- main
- DevelNUI
- API*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.402
- name: Get Changed Files
uses: lots0logs/[email protected]
id: getChangedFiles
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build
id: build
uses: TizenAPI/tizenfx-build-actions/problem-filter@master
with:
run: ./build.sh full /p:BuildWithAnalyzer=True -consoleloggerparameters:NoSummary
files: ${{ steps.getChangedFiles.outputs.all }}
- name: Save Error Report
if: ${{ failure() && steps.build.outputs.errors }}
env:
BUILD_ERRORS: ${{ steps.build.outputs.errors }}
run: |
mkdir Artifacts
echo $BUILD_ERRORS > Artifacts/errors.json
- name: Pack
run: ./build.sh pack
- name: Checkout APITool
uses: actions/checkout@v3
with:
repository: TizenAPI/APITool
path: .apitool
- name: Extract API Spec
run: |
dotnet run -p .apitool/ \
-- print --format=json --include-hidden \
-o Artifacts/api.json Artifacts/bin/public/
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: reports
if-no-files-found: ignore
path: Artifacts/*.json
check-api:
needs: [build]
runs-on: ubuntu-20.04
steps:
- name: Setup .NET Core
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x
- name: Download Artifacts
uses: actions/download-artifact@v3
with:
name: reports
path: Artifacts
- name: Checkout to base spec
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.base.sha }}
path: base
- name: Build Base Branch
uses: TizenAPI/tizenfx-build-actions/problem-filter@master
with:
run: ./build.sh full
working-directory: base
- name: Checkout APITool
uses: actions/checkout@v3
with:
repository: TizenAPI/APITool
path: .apitool
- name: Extract Base API
run: |
dotnet run -p .apitool/ \
-- print --format=json --include-hidden \
-o Artifacts/base-api.json base/Artifacts/bin/public/
- name: Check API Compatibilities
uses: TizenAPI/tizenfx-build-actions/apidb-compare@master
with:
file: Artifacts/api.json
base-file: Artifacts/base-api.json
output: Artifacts/api-comp.json
- uses: actions/upload-artifact@v3
with:
name: reports
path: Artifacts/api-comp.json