-
Notifications
You must be signed in to change notification settings - Fork 16
177 lines (177 loc) · 6.06 KB
/
macos.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
name: macOS
on:
push:
branches:
- main
- 'release-*'
paths:
- '.github/workflows/macos.yml'
- 'apis/**'
- 'libtiledbvcf/**'
pull_request:
paths:
- '.github/workflows/macos.yml'
- 'apis/**'
- 'libtiledbvcf/**'
workflow_dispatch:
env:
MACOSX_DEPLOYMENT_TARGET: "11"
jobs:
libtiledbvcf:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
- name: Setup to build htslib from source
run: brew install autoconf automake
- name: Configure libtiledbvcf
run: |
cmake -S libtiledbvcf -B $(pwd)/libtiledbvcf/build \
-D CMAKE_BUILD_TYPE=Debug \
-D CMAKE_INSTALL_PREFIX=$(pwd)/dist \
-D OVERRIDE_INSTALL_PREFIX=OFF \
-D DOWNLOAD_TILEDB_PREBUILT=ON \
-D TILEDBVCF_ENABLE_TESTS=ON
- name: Build libtiledbvcf
run: cmake --build $(pwd)/libtiledbvcf/build -j 2 --config Debug
- name: Upload coredump as artifact if build failed
if: failure()
uses: actions/upload-artifact@v4
with:
name: coredump
path: libtiledbvcf/build/core
retention-days: 14
if-no-files-found: error
- name: Install libtiledbvcf
run: cmake --build $(pwd)/libtiledbvcf/build --config Debug --target install-libtiledbvcf
- name: Upload libtiledbvcf as artifact
uses: actions/upload-artifact@v4
with:
name: libtiledbvcf
path: dist/*
retention-days: 14
if-no-files-found: error
- name: Confirm linking
run: otool -L dist/lib/libtiledbvcf.dylib
- name: libtiledbvcf version
run: ./dist/bin/tiledbvcf version
- name: Install bcftools
run: brew install bcftools
- name: Unit tests
run: |
make -j 2 -C libtiledbvcf/build/libtiledbvcf tiledb_vcf_unit
./libtiledbvcf/build/libtiledbvcf/test/tiledb_vcf_unit
- name: CLI tests (require bcftools)
run: |
# USAGE: run-cli-tests.sh <build-dir> <inputs-dir>
libtiledbvcf/test/run-cli-tests.sh libtiledbvcf/build libtiledbvcf/test/inputs
python:
runs-on: macos-12
needs: libtiledbvcf
env:
DYLD_LIBRARY_PATH: "${{ github.workspace }}/dist/lib"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch everything for python setuptools_scm
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install libtiledb
uses: mamba-org/setup-micromamba@v1
with:
environment-name: ci
create-args: tiledb
- name: Install dependencies
run: python -m pip install --prefer-binary pyarrow==10.0.1
- name: Intall build dependencies
run: |
set -e pipefail
brew update
brew install automake pkg-config ninja llvm bzip2 xz autoconf zlib libdeflate bcftools
- name: Build tiledbvcf-py
env:
LIBTILEDBVCF_PATH: "${{ github.workspace }}/dist"
TileDB_DIR: "/Users/runner/micromamba/envs/ci/lib/cmake/TileDB"
run: |
python -m pip install -v .[test]
- name: Confirm linking
run: otool -L /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tiledbvcf/libtiledbvcf.cpython-*-darwin.so
java:
runs-on: macos-12
needs: libtiledbvcf
steps:
- uses: actions/checkout@v4
- name: Download libtiledbvcf artifact
uses: actions/download-artifact@v4
with:
name: libtiledbvcf
path: dist
- name: Check format
run: cd apis/java && ./gradlew checkFormat
- name: Assemble
run: cd apis/java && ./gradlew assemble
- name: Test
run: cd apis/java && ./gradlew test
spark:
runs-on: macos-12
needs: libtiledbvcf
steps:
- uses: actions/checkout@v4
- name: Download libtiledbvcf artifact
uses: actions/download-artifact@v4
with:
name: libtiledbvcf
path: dist
- name: Assemble
run: cd apis/spark && ./gradlew assemble
- name: Jar
run: cd apis/spark && ./gradlew jar
- name: Test
run: cd apis/spark && ./gradlew test
- name: Check format
run: cd apis/spark && ./gradlew checkFormat
spark3:
runs-on: macos-12
needs: libtiledbvcf
steps:
- uses: actions/checkout@v4
- name: Download libtiledbvcf artifact
uses: actions/download-artifact@v4
with:
name: libtiledbvcf
path: dist
- name: Assemble
run: cd apis/spark3 && ./gradlew assemble
- name: Jar
run: cd apis/spark3 && ./gradlew jar
- name: Test
run: cd apis/spark3 && ./gradlew test
- name: Check format
run: cd apis/spark3 && ./gradlew checkFormat
python-standalone:
runs-on: macos-12
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # fetch everything for python setuptools_scm
- name: Setup to build htslib from source
run: brew install autoconf automake
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build tiledbvcf-py
run: python -m pip install -v .[test]
- name: Confirm linking
run: |
otool -L /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tiledbvcf/libtiledbvcf.cpython-*-darwin.so
otool -L /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tiledbvcf/lib/libtiledbvcf.dylib
otool -L /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tiledbvcf/lib/libtiledb.dylib
otool -L /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/tiledbvcf/lib/libhts.*.dylib
- name: Version
run: python -c "import tiledbvcf; print(tiledbvcf.version)"
- name: Install bcftools (for tests)
run: brew install bcftools
- name: Test tiledbvcf-py
run: cd apis/python && pytest