Skip to content

Daily Test Build TileDB-Py Against Core #1212

Daily Test Build TileDB-Py Against Core

Daily Test Build TileDB-Py Against Core #1212

name: Daily Test Build TileDB-Py Against Core
#on: [push]
on:
workflow_dispatch:
schedule:
# runs every day at 5:00 UTC (1:00AM EST / Midnight CST)
- cron: "0 5 * * *"
jobs:
test-wheels-on-azure:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%a-%Y-%m-%d')"
- name: Get libtiledb short SHA
run: echo "LIBTILEDB_SHA=$(git ls-remote https://github.com/TileDB-Inc/TileDB HEAD | cut -c1-7)" >> $GITHUB_ENV
- name: Create Test Branch for Azure Wheel Nightly Build
uses: peterjgrainger/action-create-branch@v2.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: "azure-wheel-test-${{ steps.date.outputs.date }}-against-${{ env.LIBTILEDB_SHA }}"
test:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
libtiledb_version: ["dev", "release-2.19", "release-2.20"]
uninstall_pandas: [true, false]
fail-fast: false
env:
TILEDB_VERSION: ${{ matrix.libtiledb_version }}
MACOSX_DEPLOYMENT_TARGET: "11"
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
steps:
# By default Visual Studio chooses the earliest installed toolset version
# for the main build and vcpkg chooses the latest. Force it to use the
# latest (14.39 currently).
- name: Setup MSVC toolset (VS 2022)
uses: TheMrMilchmann/setup-msvc-dev@v3
if: matrix.os == 'windows-latest'
with:
arch: x64
toolset: 14.39
- name: Enable vcpkg binary caching
uses: actions/github-script@v6
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Install Ninja (VS 2022)
uses: seanmiddleditch/gha-setup-ninja@v4
if: matrix.os == 'windows-latest'
- name: "Set CMAKE_GENERATOR"
run: echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
if: matrix.os == 'windows-latest'
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Print Python version
run: |
which python
which pip
python --version
- name: Print env
run: printenv
# Remove after upstream PR fully-deployed:
# - https://github.com/actions/runner-images/pull/7125
- name: "Install homebrew dependencies"
run: brew install pkg-config
if: matrix.os == 'macos-12'
- name: Checkout TileDB-Py `dev`
uses: actions/checkout@v3
- name: Install dependencies
run: python -m pip install --upgrade -r misc/requirements_ci.txt
- name: Test without pandas
run: python -m pip uninstall -y pandas
if: ${{ matrix.uninstall_pandas }}
- name: Build TileDB-Py
run: |
echo "CMAKE_GENERATOR=$CMAKE_GENERATOR"
python setup.py build_ext --inplace --werror
python setup.py develop
env:
TILEDB_FORCE_ALL_DEPS: True
- name: Test TileDB-Py
run: pytest -vv
create_issue_on_fail:
permissions:
issues: write
runs-on: ubuntu-latest
needs: test
if: failure() || cancelled()
steps:
- uses: actions/checkout@v3
- name: Create Issue if Build Fails
uses: TileDB-Inc/github-actions/open-issue@main
with:
name: nightly build
label: bug,nightly-failure
assignee: nguyenv,ihnorton