Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check out repo at depth 0 for Python tests, bump Python and PyPI actions #1713

Merged
merged 1 commit into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
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
13 changes: 6 additions & 7 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'pip'
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev]"
run: python -m pip install ".[dev]"
- name: Cache pre-commit tools
uses: actions/cache@v3
with:
Expand All @@ -35,5 +35,4 @@ jobs:
${{ env.PRE_COMMIT_HOME }}
key: ${{ runner.os }}-${{ hashFiles('.pre-commit-config.yaml') }}-linter-cache
- name: Run pre-commit checks
run: |
pre-commit run --all-files --verbose --show-diff-on-failure
run: pre-commit run --all-files --verbose --show-diff-on-failure
10 changes: 5 additions & 5 deletions .github/workflows/test_bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Install GBM Python bindings on ${{ matrix.os }}
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install .
run: python -m pip install .
- name: Run bindings example on ${{ matrix.os }}
run:
python bindings/python/google_benchmark/example.py
23 changes: 12 additions & 11 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@ jobs:
steps:
- name: Check out repo
uses: actions/checkout@v4

with:
fetch-depth: 0
- name: Install Python 3.11
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11

- name: Build and check sdist
run: |
python setup.py sdist
- name: Upload sdist
uses: actions/upload-artifact@v3
- run: python -m pip install build
- name: Build sdist
run: python -m build --sdist
- uses: actions/upload-artifact@v3
with:
name: dist
path: dist/*.tar.gz
Expand All @@ -38,10 +37,12 @@ jobs:
steps:
- name: Check out Google Benchmark
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
platforms: all

Expand All @@ -61,7 +62,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: dist
path: ./wheelhouse/*.whl
path: wheelhouse/*.whl

pypi_upload:
name: Publish google-benchmark wheels to PyPI
Expand All @@ -74,4 +75,4 @@ jobs:
with:
name: dist
path: dist
- uses: pypa/[email protected].10
- uses: pypa/[email protected].11
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["setuptools>=64", "setuptools-scm[toml]>=8"]
requires = ["setuptools", "setuptools-scm[toml]", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand Down
Loading