Skip to content

windows

windows #1711

Workflow file for this run

on:
push:
pull_request:
schedule:
- cron: '13 11 * * *'
jobs:
pythonbuild:
runs-on: 'windows-2019'
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
- name: Emit rustc version
run: |
rustc --version > .rustc-version
- uses: actions/cache@v3
with:
path: |
C:/Rust/.cargo/registry
C:/Rust/.cargo/git
target
key: ${{ runner.os }}-pythonbuild-${{ hashFiles('Cargo.lock', '.rustc-version') }}
- name: Build
run: |
cargo build --release
- name: Upload executable
uses: actions/upload-artifact@v3
with:
name: pythonbuild
path: target/release/pythonbuild.exe
build:
strategy:
fail-fast: false
matrix:
py:
- 'cpython-3.8'
- 'cpython-3.9'
- 'cpython-3.10'
- 'cpython-3.11'
- 'cpython-3.12'
vcvars:
- 'vcvars32.bat'
- 'vcvars64.bat'
profile:
- 'static-noopt'
- 'shared-pgo'
needs: pythonbuild
runs-on: 'windows-2019'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Cygwin Environment
uses: cygwin/cygwin-install-action@49f298a7ebb00d4b3ddf58000c3e78eff5fbd6b9
with:
packages: autoconf automake libtool
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Download pythonbuild Executable
uses: actions/download-artifact@v3
with:
name: pythonbuild
# We need to do this before we activate the VC++ environment or else binary packages
# don't get compiled properly.
- name: Bootstrap Python environment
run: |
py.exe -3.9 build-windows.py --help
- name: Build
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\${{ matrix.vcvars }}"
py.exe -3.9 build-windows.py --python ${{ matrix.py }} --sh c:\cygwin\bin\sh.exe --profile ${{ matrix.profile }}
- name: Validate Distribution
run: |
$Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
.\pythonbuild.exe validate-distribution --run $Dists
- name: Upload Distributions
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.py }}-${{ matrix.vcvars }}
path: dist/*