-
Notifications
You must be signed in to change notification settings - Fork 450
149 lines (148 loc) · 4.29 KB
/
__autobuild-action.yml
File metadata and controls
149 lines (148 loc) · 4.29 KB
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# Warning: This file is generated automatically, and should not be modified.
# Instead, please modify the template in the pr-checks directory and run:
# pr-checks/sync.sh
# to regenerate this file.
name: PR Check - autobuild-action
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: auto
on:
push:
branches:
- main
- releases/v*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
merge_group:
types:
- checks_requested
schedule:
- cron: '0 5 * * *'
workflow_dispatch:
inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
workflow_call:
inputs:
dotnet-version:
type: string
description: The version of .NET to install
required: false
default: 9.x
defaults:
run:
shell: bash
concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' || false }}
group: autobuild-action-${{github.ref}}-${{inputs.dotnet-version}}
jobs:
should-run-autobuild-action:
name: Decide whether to run this check
timeout-minutes: 10
runs-on: ubuntu-slim
if: github.triggering_actor != 'dependabot[bot]'
outputs:
run-check: ${{ steps.changed-files-check.outputs.run-check || steps.event-type-check.outputs.run-check }}
steps:
- name: Run check if this is not a PR
id: event-type-check
if: github.event_name != 'pull_request'
run: echo "run-check=true" >> "$GITHUB_OUTPUT"
- name: Check out repository
if: github.event_name == 'pull_request'
uses: actions/checkout@v6
- name: Determine changed files
id: changed-files
if: github.event_name == 'pull_request'
uses: ./.github/actions/changed-files
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
exclude: '["README.md"]'
- name: Run check because of changed files
id: changed-files-check
if: github.event_name != 'pull_request' && steps.changed-files.outputs.files != '[]'
run: echo "run-check=true" >> "$GITHUB_OUTPUT"
autobuild-action:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
name: autobuild-action
needs:
- should-run-autobuild-action
if: needs.should-run-autobuild-action.outputs.run-check == 'true'
permissions:
contents: read
security-events: read
timeout-minutes: 45
runs-on: ${{ matrix.os }}
steps:
- name: Check out repository
uses: actions/checkout@v6
- name: Install .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ inputs.dotnet-version || '9.x' }}
- name: Prepare test
id: prepare-test
uses: ./.github/actions/prepare-test
with:
version: ${{ matrix.version }}
use-all-platform-bundle: 'false'
setup-kotlin: 'true'
- uses: ./../action/init
with:
languages: csharp
tools: ${{ steps.prepare-test.outputs.tools-url }}
- uses: ./../action/autobuild
env:
# Explicitly disable the CLR tracer.
COR_ENABLE_PROFILING: ''
COR_PROFILER: ''
COR_PROFILER_PATH_64: ''
CORECLR_ENABLE_PROFILING: ''
CORECLR_PROFILER: ''
CORECLR_PROFILER_PATH_64: ''
- uses: ./../action/analyze
- name: Check database
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d csharp ]]; then
echo "Did not find a C# database"
exit 1
fi
env:
CODEQL_ACTION_TEST_MODE: true
skip-autobuild-action:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
version: linked
- os: macos-latest
version: linked
- os: windows-latest
version: linked
name: autobuild-action
needs:
- should-run-autobuild-action
if: needs.should-run-autobuild-action.outputs.run-check != 'true'
timeout-minutes: 5
runs-on: ubuntu-slim
steps:
- name: Success
run: exit 0