windows: properly test against Python version string #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '13 15 * * *' | |
jobs: | |
# We need to build our own sccache until e6326bc8a20ee06af37e16a3a7a14e3374c66c66 | |
# is in a released version. | |
sccache: | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- name: Install System Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y --no-install-recommends libssl-dev musl-tools pkg-config | |
- uses: actions-rs/toolchain@v1 | |
id: install-rust | |
with: | |
toolchain: stable | |
target: x86_64-unknown-linux-musl | |
default: true | |
profile: minimal | |
- uses: actions/checkout@v2 | |
with: | |
repository: indygreg/sccache | |
ref: b0eae3f0d174b81e7582159cb9329dbea0af25c9 | |
fetch-depth: 0 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-20.04-${{ steps.install-rust.outputs.rustc}}-sccache-${{ hashFiles('Cargo.lock') }} | |
- name: Build sccache | |
run: | | |
cargo build --release --target x86_64-unknown-linux-musl | |
- name: Upload sccache executable | |
uses: actions/upload-artifact@v2 | |
with: | |
name: sccache | |
path: target/x86_64-unknown-linux-musl/release/sccache | |
pythonbuild: | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- name: Install System Dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y --no-install-recommends libssl-dev pkg-config | |
- uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
profile: minimal | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-pythonbuild-${{ hashFiles('Cargo.lock') }} | |
- name: Build | |
run: | | |
cargo build --release | |
- name: Upload pythonbuild Executable | |
uses: actions/upload-artifact@v2 | |
with: | |
name: pythonbuild | |
path: target/release/pythonbuild | |
toolchain: | |
needs: | |
- sccache | |
runs-on: 'ubuntu-20.04' | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
SCCACHE_BUCKET: 'python-build-standalone-sccache' | |
SCCACHE_S3_USE_SSL: '1' | |
SCCACHE_IDLE_TIMEOUT: '0' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Download sccache | |
uses: actions/download-artifact@v2 | |
with: | |
name: sccache | |
- name: Start sccache | |
run: | | |
chmod +x sccache | |
./sccache --start-server | |
- name: Build | |
run: | | |
python3.9 ./build-linux.py --make-target toolchain | |
- name: Stop sccache | |
run: | | |
./sccache -s | |
- name: Upload Toolchain Archive | |
uses: actions/upload-artifact@v2 | |
with: | |
name: toolchain | |
path: build/*.tar | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
build: | |
# Cross-compiles can't do PGO and require Python 3.9. | |
- target_triple: 'aarch64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'aarch64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'aarch64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'aarch64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'aarch64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'aarch64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# Cross-compiles can't do PGO and require Python 3.9. | |
- target_triple: 'armv7-unknown-linux-gnueabi' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'armv7-unknown-linux-gnueabi' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'armv7-unknown-linux-gnueabi' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'armv7-unknown-linux-gnueabi' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'armv7-unknown-linux-gnueabi' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'armv7-unknown-linux-gnueabi' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# Cross-compiles can't do PGO and require Python 3.9. | |
- target_triple: 'armv7-unknown-linux-gnueabihf' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'armv7-unknown-linux-gnueabihf' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'armv7-unknown-linux-gnueabihf' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'armv7-unknown-linux-gnueabihf' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'armv7-unknown-linux-gnueabihf' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'armv7-unknown-linux-gnueabihf' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# We don't publish noopt builds when PGO is available. | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'debug' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'lto' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'pgo' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'pgo+lto' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo+lto' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo' | |
- target_triple: 'i686-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo+lto' | |
# Cross-compiles can't do PGO and require Python 3.9. | |
- target_triple: 'mips-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'mips-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'mips-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'mips-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'mips-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'mips-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# Cross-compiles can't do PGO and require Python 3.9. | |
- target_triple: 'mipsel-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'mipsel-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'mipsel-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'mipsel-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'mipsel-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'mipsel-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# Cross-compiles can't do PGO and require Python 3.9. | |
- target_triple: 's390x-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 's390x-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 's390x-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 's390x-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 's390x-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 's390x-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# We don't publish noopt builds when PGO is available. | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'debug' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'lto' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.8' | |
optimizations: 'pgo+lto' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo+lto' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo+lto' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo+lto' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64_v2-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo+lto' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'pgo+lto' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo' | |
- target_triple: 'x86_64_v3-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'pgo+lto' | |
# GitHub Actions runners don't support x86-64-v4 so we can't PGO. | |
- target_triple: 'x86_64_v4-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v4-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v4-unknown-linux-gnu' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
# GitHub Actions runners don't support x86-64-v4 so we can't PGO. | |
- target_triple: 'x86_64_v4-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v4-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v4-unknown-linux-gnu' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
# musl doesn't support PGO. | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.8' | |
optimizations: 'debug' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.8' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.8' | |
optimizations: 'lto' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v2-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v2-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v2-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v2-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v2-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v2-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v3-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v3-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v3-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v3-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v3-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v3-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v4-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v4-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v4-unknown-linux-musl' | |
py: 'cpython-3.9' | |
optimizations: 'lto' | |
- target_triple: 'x86_64_v4-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'debug' | |
- target_triple: 'x86_64_v4-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'noopt' | |
- target_triple: 'x86_64_v4-unknown-linux-musl' | |
py: 'cpython-3.10' | |
optimizations: 'lto' | |
needs: | |
- pythonbuild | |
- toolchain | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Download pythonbuild | |
uses: actions/download-artifact@v2 | |
with: | |
name: pythonbuild | |
path: build | |
- name: Download toolchain | |
uses: actions/download-artifact@v2 | |
with: | |
name: toolchain | |
path: build | |
- name: Build | |
run: | | |
./build-linux.py --skip-toolchain --target-triple ${{ matrix.build.target_triple }} --python ${{ matrix.build.py }} --optimizations ${{ matrix.build.optimizations }} | |
- name: Validate Distribution | |
run: | | |
chmod +x build/pythonbuild | |
build/pythonbuild validate-distribution dist/*.tar.zst | |
- name: Upload Distribution | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.build.py }}-${{ matrix.build.target_triple }} | |
path: dist/* |