-
Notifications
You must be signed in to change notification settings - Fork 9
141 lines (119 loc) · 3.69 KB
/
tiledb-go.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
name: TileDB-Go
on:
release:
types: [ published ]
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
# The version of TileDB to test against.
CORE_VERSION: "2.26.1"
# The abbreviated git commit hash to use.
CORE_HASH: "db1cee4"
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Install TileDB because the linter needs the C header files.
- name: Run TileDB install script
run: ./.github/scripts/install_tiledb_linux.sh
shell: bash
- uses: actions/setup-go@v5
with:
go-version: stable
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
Linux_Test:
runs-on: ubuntu-latest
strategy:
matrix:
# Will be checking following versions
go: ["1.20", "1.21", "1.22", "1.23"]
steps:
# Checks out repository
- uses: actions/checkout@v4
# Log details for the runner. Useful for debugging
- name: Run lscpu for runner details
run: lscpu
shell: bash
# Downloads TileDB-Core from release assets and install
- name: Run TileDB install script
run: ./.github/scripts/install_tiledb_linux.sh
shell: bash
# Following action sets up Go and uses the strategy matrix to test on
# specific versions
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: go get -t .
# Tests TileDB-Go
- name: Test TileDB-Go
run: go test -v ./...
Macos_Test:
runs-on: macos-latest
strategy:
matrix:
# Will be checking following versions
go: ["1.20", "1.21", "1.22", "1.23"]
steps:
# Checks out repository
- uses: actions/checkout@v4
# Log details for the runner. Useful for debugging
- name: Run sysctl for runner details
run: sysctl -a
shell: bash
# Downloads TileDB-Core from release assets and install
- name: Run TileDB install script
run: ./.github/scripts/install_tiledb_macos.sh
shell: bash
# Following action sets up Go and uses the strategy matrix to test on
# specific versions
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: go get -t .
# Tests TileDB-Go
- name: Test TileDB-Go
# We need to explicitly pass the path to libtiledb.dylib to Go because of
# changes in recent macOS versions:
# https://github.com/golang/go/issues/36572#issuecomment-817205746
run: CGO_LDFLAGS="-Wl,-rpath,/usr/local/lib" go test -v ./...
Linux_Address_Sanitizer:
# Only run this job for releases
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
strategy:
matrix:
# Will be checking following versions
go: ["1.20", "1.21", "1.22", "1.23"]
steps:
# Checks out repository
- uses: actions/checkout@v4
# Log details for the runner. Useful for debugging
- name: Run lscpu for runner details
run: lscpu
shell: bash
# Downloads TileDB-Core from release assets and install
- name: Run TileDB install script
run: ./.github/scripts/install_tiledb_linux_debug.sh
shell: bash
# Following action sets up Go and uses the strategy matrix to test on
# specific versions
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: go get -t .
# Tests TileDB-Go
- name: Running examples using address sanitizer flags
run: ./.github/scripts/build_with_sanitizer_and_run.sh