Nightly-Build #411
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | |
- BOOTSTRAP: ../bootstrap --enable-s3 --enable-serialization --force-build-all-deps --enable-vcpkg | |
- os: ubuntu-latest | |
platform: linux-x86_64 | |
- os: macos-latest | |
platform: macos-x86_64 | |
- os: windows-latest | |
platform: windows-x86_64 | |
BOOTSTRAP: ../bootstrap.ps1 -EnableS3 -EnableSerialization -EnableBuildDeps -EnableVcpkg | |
- tag: dev | |
tag: [release-2.17, dev] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout TileDB | |
uses: actions/checkout@v4 | |
with: | |
repository: TileDB-Inc/TileDB | |
ref: ${{ matrix.tag }} | |
- name: Export GitHub Actions cache variables | |
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: Build TileDB | |
run: | | |
mkdir -p build | |
cd build | |
${{ matrix.BOOTSTRAP }} | |
cmake --build . --config Release | |
cmake --build . --config Release --target install-tiledb | |
cd ../ | |
mkdir -p artifacts/${{ matrix.platform }} | |
mv build/dist/* 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@v3 | |
with: | |
name: tiledb-native-${{ matrix.tag }} | |
path: artifacts/ | |
retention-days: 1 | |
Pack-NuGet: | |
needs: Build-Native | |
strategy: | |
fail-fast: false | |
matrix: | |
tag: [release-2.17, dev] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout TileDB-CSharp | |
uses: actions/checkout@v4 | |
# GitHub runners come with several versions of .NET preinstalled; Remove them to target version | |
- name: Remove existing .NET versions | |
shell: bash | |
run: rm -rf $DOTNET_ROOT | |
- name: Set up .NET SDK from global.json | |
uses: actions/setup-dotnet@v3 | |
- name: Display dotnet versions | |
run: dotnet --info | |
- name: Download native artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: tiledb-native-${{ matrix.tag }} | |
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@v3 | |
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.17, dev] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout TileDB-CSharp | |
uses: actions/checkout@v4 | |
# GitHub runners come with several versions of .NET preinstalled; Remove them to target version | |
- name: Remove existing .NET versions | |
shell: bash | |
run: rm -rf $DOTNET_ROOT | |
- name: Set up .NET SDK from global.json | |
uses: actions/setup-dotnet@v3 | |
- name: Display dotnet versions | |
run: dotnet --info | |
- name: Download native NuGet packages | |
uses: actions/download-artifact@v3 | |
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 (.NET 5) | |
shell: bash | |
run: find examples/ -name *.csproj | xargs -I{} dotnet run --project {} -f net5.0 | |
- name: Run examples (.NET 6) | |
shell: bash | |
run: find examples/ -name *.csproj | xargs -I{} dotnet run --project {} -f net6.0 | |
Create-Issue: | |
needs: Test-NuGet | |
if: failure() | |
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 |