Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,94 @@ jobs:
run: |
make linkcheck-raw

test-python:
runs-on: ${{ matrix.os }}
needs: [decide-runs]
if: needs.decide-runs.outputs.rust-changed == 'true' || needs.decide-runs.outputs.python-changed == 'true'
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.9"
os: ubuntu-latest
- python-version: "3.10"
os: ubuntu-latest
- python-version: "3.11"
os: ubuntu-latest
- python-version: "3.12"
os: ubuntu-latest
- python-version: "3.9"
os: windows-latest
steps:
- *checkout

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1

- name: Set up Python
id: setup_python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
glean-core/python/requirements_dev.txt

- name: Python tests
if: runner.os != 'Windows'
run: |
make test-python

- name: "Python tests (Windows)"
if: runner.os == 'Windows'
run: |
python3 -m venv venv
.\venv\Scripts\pip install --upgrade wheel setuptools
.\venv\Scripts\pip install -r glean-core\python\requirements_dev.txt
.\venv\Scripts\pip install -e .

.\venv\Scripts\py.test -v glean-core\python\tests

packaging-python-aarch64:
runs-on: ubuntu-latest
needs: [decide-runs]
if: needs.decide-runs.outputs.rust-changed == 'true' || needs.decide-runs.outputs.python-changed == 'true'
steps:
- *checkout

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable

- uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1

- name: Set up Python
id: setup_python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.13"
cache: 'pip'
cache-dependency-path: |
glean-core/python/requirements_dev.txt

- name: Setup Python env
run: |
make setup-python
.venv3.13/bin/pip install ziglang==0.15.2
- name: Install additional targets
run: |
rustup target add aarch64-unknown-linux-gnu
rustup target add aarch64-pc-windows-gnullvm
- name: Build Python packages
run: |
. .venv3.13/bin/activate

TARGETS="aarch64-unknown-linux-gnu aarch64-pc-windows-gnullvm"
for target in $TARGETS; do
make build-python-wheel GLEAN_BUILD_TARGET="$target" GLEAN_BUILD_EXTRA="--zig"
done

lint-yaml:
runs-on: ubuntu-latest
needs: [decide-runs]
Expand Down
Loading