Add bootstrapped installation in Python for Windows (#1130)

A 1:1 port of the Bash script to Python for use on Windows.

Pulls some parts of #1068 but much more minimal. Avoids an additional
dependency on `requests`. Because we require `zstandard` to unzip the
distributions we unfortunately cannot be dependency free and cannot have
`bootstrap.sh` download the Python version needed to run this script
without it doing a non-trivial amount of work.

Retains the Bash script for now so you can bootstrap without Python
available. I may drop it in the future?
This commit is contained in:
Zanie Blue
2024-01-28 10:24:49 -06:00
committed by GitHub
parent a25a1f2958
commit c0e7668dfa
2 changed files with 172 additions and 8 deletions

View File

@@ -80,16 +80,16 @@ jobs:
- uses: actions/checkout@v4
- name: "Install Rust toolchain"
run: rustup component add clippy
- name: "Install Pythons"
- name: "Install Python for bootstrapping"
uses: actions/setup-python@v4
with:
python-version: |
3.7
3.8
3.9
3.10
3.11
3.12
python-version: 3.12
- name: "Install Python binaries"
run: |
pip install zstandard==0.22.0
python scripts/bootstrap/install.py
# ex) The path needs to be updated downstream
$env:Path = "$pwd\bin" + $env:Path
- uses: rui314/setup-mold@v1
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets --all-features --locked -- -D warnings