-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.appveyor.yml
80 lines (71 loc) · 2.79 KB
/
.appveyor.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
skip_tags: true
clone_depth: 1
os: Visual Studio 2022
# Convert line endings for Windows (wanted test output)
init:
- git config --global core.autocrlf true
environment:
matrix:
- PYTHON: "C:\\Python312-x64"
matrix:
fast_finish: true
install:
# If there's a newer build queued for the same PR, cancel this one
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# Prepend preferred Python to the PATH to make it the default
# Will stick random binary tools there too
- SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%
# Check that we have the expected version and architecture for Python
- python --version
- python -m pip install -U pip setuptools virtualenv wheel build
- python -m pip install -r requirements.txt
- echo "Installing sqlite3"
- curl -O "https://www3.sqlite.org/2022/sqlite-tools-win32-x86-3370200.zip"
- unzip sqlite-tools-win32-x86-3370200.zip
- mv sqlite-tools-win32-x86-3370200/sqlite3.exe %PYTHON%\\
- echo "Installing flash"
- curl -O "https://ccb.jhu.edu/software/FLASH/FLASH-1.2.11-windows-bin.zip"
- unzip FLASH-1.2.11-windows-bin.zip
- mv flash.exe %PYTHON%\\
- flash --version
- echo "Installing vsearch"
- curl -L -O "https://github.com/torognes/vsearch/releases/download/v2.23.0/vsearch-2.23.0-win-x86_64.zip"
- unzip vsearch-2.23.0-win-x86_64.zip
- mv vsearch-2.23.0-win-x86_64\\bin\\vsearch.exe %PYTHON%\\
- vsearch --version
build_script:
# Build wheel
- git checkout %BUILD_COMMIT%
- echo "Bootstrapping to build DB"
- python -m pip install -e .
- rm -rf dist/* thapbi_pict/ITS1_DB.sqlite
- cd database
- bash build_ITS1_DB.sh
- cd ..
- git diff # Confirm database/ITS1_DB.fasta unchanged
- cp database/ITS1_DB.sqlite thapbi_pict/ITS1_DB.sqlite
- chmod a-w thapbi_pict/ITS1_DB.sqlite
- python -m pip uninstall --yes thapbi_pict
- echo "Building tar-ball and then wheel"
- python -m build
- echo "Installing our wheel..."
- cd dist
- for %%w in (*.whl) do pip install --force-reinstall %%w
- cd ..
- echo "THAPBI PICT should now be installed"
- thapbi_pict -v
test_script:
# Change into an clean new directory:
- mkdir for_testing
- cd for_testing
# extract test files (etc) from tar ball, run them:
- for %%f in (../dist/thapbi_pict-*.tar.gz) do tar -zxvf ../dist/%%f
- for /D %%d in (thapbi_pict-*) do cd %%d
# Run the tests (and confirm the tar-ball is complete)
- bash -c tests/run_tests.sh
- cd ../..
artifacts:
- path: "dist\\*"