Skip to content

Commit 039bc82

Browse files
committed
ci: perform Rust validation on Windows
1 parent f0eb671 commit 039bc82

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/windows.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,36 @@ on:
44
schedule:
55
- cron: '13 4 * * *'
66
jobs:
7+
pythonbuild:
8+
runs-on: 'windows-2019'
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Install Rust
13+
uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: stable
16+
default: true
17+
profile: minimal
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: |
22+
C:/Rust/.cargo/registry
23+
C:/Rust/.cargo/git
24+
target
25+
key: ${{ runner.os }}-pythonbuild-${{ hashFiles('Cargo.lock') }}
26+
27+
- name: Build
28+
run: |
29+
cargo build --release
30+
31+
- name: Upload executable
32+
uses: actions/upload-artifact@v2
33+
with:
34+
name: pythonbuild
35+
path: target/release/pythonbuild.exe
36+
737
build:
838
strategy:
939
fail-fast: false
@@ -17,6 +47,7 @@ jobs:
1747
profile:
1848
- 'static-noopt'
1949
- 'shared-pgo'
50+
needs: pythonbuild
2051
runs-on: 'windows-2019'
2152
steps:
2253
- uses: actions/checkout@v2
@@ -34,6 +65,11 @@ jobs:
3465
with:
3566
python-version: '3.8'
3667

68+
- name: Download pythonbuild Executable
69+
uses: actions/download-artifact@v2
70+
with:
71+
name: pythonbuild
72+
3773
# We need to do this before we activate the VC++ environment or else binary packages
3874
# don't get compiled properly.
3975
- name: Bootstrap Python environment
@@ -46,6 +82,11 @@ jobs:
4682
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ matrix.vcvars }}"
4783
py.exe build-windows.py --python ${{ matrix.py }} --sh c:\tools\cygwin\bin\sh.exe --profile ${{ matrix.profile }}
4884
85+
- name: Validate Distribution
86+
run: |
87+
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
88+
.\pythonbuild.exe validate-distribution $Dists
89+
4990
- name: Upload Distributions
5091
uses: actions/upload-artifact@v2
5192
with:

0 commit comments

Comments
 (0)