Skip to content

Commit dbfbd18

Browse files
juanjose.tenoriocorona10
authored andcommitted
add reusable workflow for amd64, arm64 and win32
1 parent 940ee96 commit dbfbd18

File tree

4 files changed

+90
-36
lines changed

4 files changed

+90
-36
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -180,54 +180,27 @@ jobs:
180180

181181
build_win32:
182182
name: 'Windows (x86)'
183-
runs-on: windows-latest
184-
timeout-minutes: 60
185183
needs: check_source
186184
if: needs.check_source.outputs.run_tests == 'true'
187-
env:
188-
IncludeUwp: 'true'
189-
steps:
190-
- uses: actions/checkout@v4
191-
- name: Build CPython
192-
run: .\PCbuild\build.bat -e -d -p Win32
193-
- name: Display build info
194-
run: .\python.bat -m test.pythoninfo
195-
- name: Tests
196-
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
185+
uses: ./.github/workflows/reusable-build-win-32.yml
186+
with:
187+
config_hash: ${{ needs.check_source.outputs.config_hash }}
197188

198189
build_win_amd64:
199190
name: 'Windows (x64)'
200-
runs-on: windows-latest
201-
timeout-minutes: 60
202191
needs: check_source
203192
if: needs.check_source.outputs.run_tests == 'true'
204-
env:
205-
IncludeUwp: 'true'
206-
steps:
207-
- uses: actions/checkout@v4
208-
- name: Register MSVC problem matcher
209-
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
210-
- name: Build CPython
211-
run: .\PCbuild\build.bat -e -d -p x64
212-
- name: Display build info
213-
run: .\python.bat -m test.pythoninfo
214-
- name: Tests
215-
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
193+
uses: ./.github/workflows/reusable-build-win-amd64.yml
194+
with:
195+
config_hash: ${{ needs.check_source.outputs.config_hash }}
216196

217197
build_win_arm64:
218198
name: 'Windows (arm64)'
219-
runs-on: windows-latest
220-
timeout-minutes: 60
221199
needs: check_source
222200
if: needs.check_source.outputs.run_tests == 'true'
223-
env:
224-
IncludeUwp: 'true'
225-
steps:
226-
- uses: actions/checkout@v4
227-
- name: Register MSVC problem matcher
228-
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
229-
- name: Build CPython
230-
run: .\PCbuild\build.bat -e -d -p arm64
201+
uses: ./.github/workflows/reusable-build-win-arm64.yml
202+
with:
203+
config_hash: ${{ needs.check_source.outputs.config_hash }}
231204

232205
build_macos:
233206
name: 'macOS'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because
2+
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
3+
# mandatory but not scheduled because of "paths-ignore".
4+
on:
5+
workflow_call:
6+
inputs:
7+
config_hash:
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_win_32:
16+
runs-on: windows-latest
17+
timeout-minutes: 60
18+
env:
19+
IncludeUwp: 'true'
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Build CPython
23+
run: .\PCbuild\build.bat -e -d -p Win32
24+
- name: Display build info
25+
run: .\python.bat -m test.pythoninfo
26+
- name: Tests
27+
run: .\PCbuild\rt.bat -p Win32 -d -q --fast-ci
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because
2+
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
3+
# mandatory but not scheduled because of "paths-ignore".
4+
on:
5+
workflow_call:
6+
inputs:
7+
config_hash:
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_win_amd64:
16+
runs-on: windows-latest
17+
timeout-minutes: 60
18+
env:
19+
IncludeUwp: 'true'
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Register MSVC problem matcher
23+
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
24+
- name: Build CPython
25+
run: .\PCbuild\build.bat -e -d -p x64
26+
- name: Display build info
27+
run: .\python.bat -m test.pythoninfo
28+
- name: Tests
29+
run: .\PCbuild\rt.bat -p x64 -d -q --fast-ci
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# gh-84728: "paths-ignore" is not used to skip documentation-only PRs, because
2+
# it prevents to mark a job as mandatory. A PR cannot be merged if a job is
3+
# mandatory but not scheduled because of "paths-ignore".
4+
on:
5+
workflow_call:
6+
inputs:
7+
config_hash:
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
build_win_arm64:
16+
runs-on: windows-latest
17+
timeout-minutes: 60
18+
env:
19+
IncludeUwp: 'true'
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Register MSVC problem matcher
23+
run: echo "::add-matcher::.github/problem-matchers/msvc.json"
24+
- name: Build CPython
25+
run: .\PCbuild\build.bat -e -d -p arm64

0 commit comments

Comments
 (0)