Skip to content

Nightly-Build

Nightly-Build #828

Workflow file for this run

name: Nightly-Build
env:
TILEDB_NIGHTLY_BUILD: 1
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
on:
schedule:
- cron: "15 2 * * *"
pull_request:
branches: [main]
paths:
- './.github/workflows/nightly.yml'
workflow_dispatch:
jobs:
Build-Native:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
platform: linux-x86_64
- os: macos-latest
platform: macos-arm64
- os: windows-latest
platform: windows-x86_64
- tag: dev
tag: [release-2.26, dev]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout TileDB
uses: actions/checkout@v4
with:
repository: TileDB-Inc/TileDB
ref: ${{ matrix.tag }}
# This must happen after checking out the repository, because Ninja gets installed
# in the repository's directory that gets removed before the checkout/
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@v5
- name: Setup MSVC toolset (VS 2022)
uses: TheMrMilchmann/setup-msvc-dev@v3
if: matrix.os == 'windows-latest'
with:
arch: x64
- name: Export GitHub Actions cache variables
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build TileDB
run: |
mkdir -p build
mkdir -p artifacts/${{ matrix.platform }}
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DTILEDB_SERIALIZATION=ON -DTILEDB_S3=ON -DTILEDB_VCPKG=ON -DCOMPILER_SUPPORTS_AVX2=OFF -DTILEDB_CMAKE_IDE=ON
cmake --build build -j --target tiledb
cmake --install build --prefix artifacts/${{ matrix.platform }}
# We combine the binaries of the many platforms per tag by uploading them to the same artifact.
- name: Upload native artifacts
uses: actions/upload-artifact@v4
with:
name: tiledb-native-${{ matrix.tag }}-${{ matrix.platform }}
path: artifacts/
retention-days: 1
Pack-NuGet:
needs: Build-Native
strategy:
fail-fast: false
matrix:
tag: [release-2.26, dev]
runs-on: ubuntu-latest
steps:
- name: Checkout TileDB-CSharp
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.4xx
- name: Display dotnet versions
run: dotnet --info
- name: Download native artifacts
uses: actions/download-artifact@v4
with:
pattern: tiledb-native-${{ matrix.tag }}-*
merge-multiple: true
path: scripts/nuget/temp
- name: Build native NuGet packages
shell: bash
run: dotnet pack ./scripts/nuget/GenerateNuGetPackages.proj -p:DevelopmentBuild=true -p:VersionTag=${{ matrix.tag }}
- name: Upload native NuGet packages
uses: actions/upload-artifact@v4
with:
name: tiledb-nuget-${{ matrix.tag }}
path: scripts/nuget/packages/
retention-days: 5
Test-NuGet:
needs: Pack-NuGet
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
tag: [release-2.26, dev]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout TileDB-CSharp
uses: actions/checkout@v4
- name: Set up .NET SDK from global.json
uses: actions/setup-dotnet@v4
- name: Display dotnet versions
run: dotnet --info
- name: Download native NuGet packages
uses: actions/download-artifact@v4
with:
name: tiledb-nuget-${{ matrix.tag }}
path: packages
- name: Build TileDB-CSharp
run: dotnet build sources/TileDB.CSharp/TileDB.CSharp.csproj -c Release
- name: Test TileDB-CSharp
run: dotnet test tests/TileDB.CSharp.Test/TileDB.CSharp.Test.csproj -c Release
- name: Run examples
shell: bash
run: find examples/ -name *.csproj | xargs -I{} dotnet run --project {} -f net6.0
Create-Issue:
needs: Test-NuGet
if: failure() && github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- name: Checkout TileDB-CSharp
uses: actions/checkout@v4
- name: Create issue for failed build
uses: JasonEtco/create-an-issue@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filename: .github/workflows/nightly-issue-template.md