forked from TileDB-Inc/tiledb-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
206 lines (199 loc) · 6.47 KB
/
package.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
name: Package TileDB
on:
schedule:
# runs every day at 04:17 UTC
- cron: "17 04 * * *"
workflow_dispatch:
jobs:
generate-matrix:
name: Generate Build Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Generate
id: generate
run: |
MATRIX=$(.github/scripts/generate-build-matrix.py)
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
debug:
needs:
- generate-matrix
name: Debuggering
runs-on: ubuntu-latest
steps:
- name: Show Matrix
run: |
echo "${{ needs.generate-matrix.outputs.matrix }}"
shell: bash
build:
needs:
- generate-matrix
name: Build - ${{ matrix.platform }} - ${{ matrix.version }} - ${{ matrix.linkage }}
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
runs-on: ${{ matrix.os }}
container: ${{ matrix.manylinux || '' }}
env:
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.MACOSX_DEPLOYMENT_TARGET }}
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
steps:
- name: Checkout TileDB
run: |
# Something seems very wrong with actions/checkout when not using
# it against the current repositor. Avoiding the issue by cloning
# manually here.
mkdir -p ~/repos
git -C ~/repos clone https://github.com/TileDB-Inc/TileDB tiledb
shell: bash
- 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: Setup Homebrew
run: brew install automake ninja
if: ${{ startsWith(matrix.os, 'macos-') == true }}
- name: Setup manylinux
if: ${{ startsWith(matrix.platform, 'linux') == true }}
run: |
set -e pipefail
yum install -y ninja-build perl-IPC-Cmd curl zip unzip tar
echo "VCPKG_FORCE_SYSTEM_BINARIES=YES" >> $GITHUB_ENV
shell: bash
- name: Set Version Variable
id: set-version
run: |
cd repos/tiledb
hash=$( git rev-parse --short HEAD )
version=${{ matrix.version }}
if [ "x${{ matrix.build_shared_libs }}" == "xOFF"]; then
suffix="-static"
else
suffix=""
fi
echo "release_version=${version}-${hash}${suffix}" >> $GITHUB_OUTPUT
shell: bash
- name: Configure TileDB
run: echo "Hello, World!"
shell: bash
# - name: Configure TileDB
# run: |
# cd repos/tiledb
# cmake -S . -B build \
# -DCMAKE_BUILD_TYPE=Release \
# -DBUILD_SHARED_LIBS=ON \
# -DCMAKE_INSTALL_PREFIX=./dist \
# -DTILEDB_INSTALL_LIBDIR=lib \
# -DTILEDB_S3=ON \
# -DTILEDB_AZURE=ON \
# -DTILEDB_GCS=ON \
# -DTILEDB_HDFS=${{ startsWith(matrix.platform, 'windows') && 'OFF' || 'ON' }} \
# -DTILEDB_SERIALIZATION=ON \
# -DTILEDB_WEBP=ON \
# -DTILEDB_TESTS=OFF \
# -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} \
# ${{ matrix.cmake_args }}
# shell: bash
- name: Build TileDB
env:
TILEDB_PACKAGE_VERSION: ${{ steps.set-version.outputs.release_version }}
run: |
cd repos/tiledb
mkdir build
touch build/tiledb-${{ matrix.platform }}-${{ env.TILEDB_PACKAGE_VERSION }}.tar.gz*
shell: bash
# run: |
# cd repos/tiledb
# cmake --build build -j4 --config Release --target package
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: release-${{ matrix.platform }}
path: |
repos/tiledb/build/tiledb-*.tar.gz*
repos/tiledb/build/tiledb-*.zip*
publish:
needs:
- build
name: Publish Release Artifacts
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: release-*
merge-multiple: true
path: dist
- name: Publish Artifacts
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const path = require('path');
const repo = context.repo;
const release = await github.rest.repos.getReleaseByTag({
owner: repo.owner,
repo: repo.repo,
tag: "nightlies"
});
const globber = await glob.create('dist/*');
for await (const file of globber.globGenerator()) {
await github.rest.repos.uploadReleaseAsset({
owner: repo.owner,
repo: repo.repo,
release_id: release.data.id,
headers: {
'content-type': 'application/octet-stream',
'content-length': fs.statSync(file).size
},
name: path.basename(file),
data: fs.readFileSync(file)
});
}
generate-releases-csv:
needs:
- publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Release Directory
run: mkdir release-data
shell: bash
- name: Github release data
uses: KevinRohn/github-full-release-data@v2.0.4
with:
version: "nightlies"
asset-file: "*.zip,*.tar.gz"
asset-output: "./release-data/"
- name: Generate releases.csv
run: |
.github/scripts/generate-releases-csv.py
- name: Upload releases.*
uses: svenstaro/upload-release-action@v2
with:
file: release-data/releases.*
tag: nightlies
overwrite: true
file_glob: true
create-issue-on-fail:
permissions:
issues: write
runs-on: ubuntu-latest
needs: generate-releases-csv
if: failure()
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Issue on Failure
uses: TileDB-Inc/github-actions/open-issue@main
with:
name: Nightly Build Failure
label: nightly-failure
assignee: davisp,rroelke