Skip to content
Closed

(WIP) #495

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
65 changes: 19 additions & 46 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Tests

on:
schedule:
- cron: "30 20 * * *" # 7:30pm UTC
workflow_dispatch:
pull_request:
paths:
- "*.bazel"
- "*.cpp"
- "*.c"
- "*.cc"
Expand All @@ -24,11 +26,11 @@ jobs:
strategy:
max-parallel: 1
matrix:
python-version: ["3.10"]
python-version: ["3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
Expand All @@ -41,59 +43,36 @@ jobs:
run: |
mypy src tests
- name: Run clang-format style check for C/C++ programs.
uses: jidicula/clang-format-action@v3.3.0
uses: jidicula/clang-format-action@v4.11.0
with:
clang-format-version: "11"
check-path: "/src/bindings/"
fallback-style: "Google" # optional
fallback-style: "Google"

build:
runs-on: ${{ matrix.os }}
needs: [linting]
strategy:
fail-fast: false
max-parallel: 3
max-parallel: 12
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", 3.11, 3.12, 3.13, 3.14]
os: [ubuntu-latest, macos-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
submodules: true

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Setup msbuild Windows
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v1.0.2

- name: Fix Paths Windows
# Make sure that tar.exe from Git is used not from Windows
if: runner.os == 'Windows'
run: |
@("C:\Program Files\Git\usr\bin") + (Get-Content $env:GITHUB_PATH) | Set-Content $env:GITHUB_PATH -Encoding utf8

- name: Build Google DP Unix
if: runner.os != 'Windows'
timeout-minutes: 20
run: |
bash build_PyDP.sh

- name: Build Google DP Windows
if: runner.os == 'Windows'
- name: Build Google DP
timeout-minutes: 20
run: |
$PYTHONHOME=$(python -c 'import sys; print(sys.executable);').replace('\', '/')
$PYTHONPATH=$(python -c "import sys; print([x for x in sys.path if 'site-packages' in x][0]);").replace('\', '/')
echo "PYTHONHOME=$PYTHONHOME"
echo "PYTHONPATH=$PYTHONPATH"
echo "Running: ${{ matrix.os }}"
bazel.exe --output_base ./bazel-cache build src/python:pydp --config windows --verbose_failures --action_env=PYTHON_BIN_PATH=$PYTHONHOME --action_env=PYTHON_LIB_PATH=$PYTHONPATH
copy ./bazel-bin/src/bindings/_pydp.so ./src/pydp/_pydp.pyd
bash build_PyDP.sh

- name: Upgrade pip
run: |
Expand All @@ -106,7 +85,7 @@ jobs:
- name: Get poetry cache dir
id: poetry-cache
run: |
echo "::set-output name=dir::$(poetry config cache-dir)"
echo "dir=$(poetry config cache-dir)" >> $GITHUB_OUTPUT

- name: poetry cache
uses: actions/cache@v4
Expand All @@ -125,25 +104,19 @@ jobs:
run: |
poetry run python setup.py build bdist_wheel --plat-name macosx_10_14_x86_64

- name: Build PyDP Linux / Windows
if: runner.os != 'macOS'
- name: Build PyDP Linux
if: runner.os == 'Linux'
run: |
poetry run python setup.py build bdist_wheel

- name: Install Wheel Unix
if: runner.os != 'Windows'
run: |
pip install `find -L ./ -name "*.whl"`

- name: Install Wheel Windows
if: runner.os == 'Windows'
run: |
Get-ChildItem -Path ./ -Filter "*.whl" -Recurse -File | foreach {pip install $_.FullName}

- name: Import Package
run: |
python -c "import pydp; print(pydp.__version__)"

- name: Run Pytest
run: |
poetry run pytest tests -n auto
poetry run pytest tests -n auto
175 changes: 0 additions & 175 deletions .github/workflows/versions.yml

This file was deleted.

Loading