-
Notifications
You must be signed in to change notification settings - Fork 5
152 lines (133 loc) · 4.63 KB
/
nightly.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
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