-
-
Notifications
You must be signed in to change notification settings - Fork 13
156 lines (152 loc) · 6.56 KB
/
build_ci.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
name: Build CI
on:
push:
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: ['3.10', '3.11', '3.12' ]
exclude:
- os: macos-latest
python-version: '3.10'
env:
DISPLAY: ':99.0'
steps:
- name: Configure pagefile
if: runner.os == 'Windows'
uses: al-cheb/[email protected]
- name: Set up pagefile
if: runner.os == 'Windows'
run: |
(Get-CimInstance Win32_PageFileUsage).AllocatedBaseSize
- name: Get repository
uses: actions/checkout@v4
- name: apt-get update (Linux)
if: runner.os == 'Linux'
run: sudo apt-get update
- name: Setup Qt requirements for Linux
uses: tlambert03/setup-qt-libs@v1
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v2
with:
# Skip to run brew update command on macOS.
macos-skip-brew-update: 'true' # defalt false
- name: Cache LLVM and Clang
if: runner.os != 'macOS'
id: cache-llvm
uses: actions/cache@v2
with:
path: ${{ runner.temp }}/llvm
key: llvm
- name: Install LLVM and Clang
if: runner.os != 'macOS'
uses: KyleMayes/install-llvm-action@v2
with:
version: "14.0"
directory: ${{ runner.temp }}/llvm
cached: ${{ steps.cache-llvm.outputs.cache-hit }}
- name: Install R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.4' # The R version to download (if necessary) and use.
- name: Install homebrew on Linux
if: runner.os == 'Linux'
uses: Homebrew/actions/setup-homebrew@master
- name: Install cURL on Linux
if: runner.os == 'Linux'
run: sudo apt-get install libcurl4-openssl-dev
- name: Install cURL on Windows
if: runner.os == 'Windows'
run: choco install openssl
- name: Install libxml on MacOS
if: runner.os == 'macOS'
run: brew install libxml2
- name: command line tools on MacOS
if: runner.os == 'macOS'
run: |
gcc -v -xc++ /dev/null -fsyntax-only
- name: Test R installation
run: Rscript -e "print('R script ran successfully')"
- name: Install kallisto
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
wget https://github.com/pachterlab/kallisto/releases/download/v0.50.1/kallisto_linux-v0.50.1.tar.gz
tar -xvzf kallisto*.gz
echo "${GITHUB_WORKSPACE}/kallisto" >> $GITHUB_PATH
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install hdf5
wget https://github.com/pachterlab/kallisto/releases/download/v0.50.1/kallisto_mac_m1-v0.50.1.tar.gz
tar -xvzf kallisto*.gz
echo "${GITHUB_WORKSPACE}/kallisto" >> $GITHUB_PATH
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install wget -y
wget https://github.com/pachterlab/kallisto/releases/download/v0.50.1/kallisto_windows-v0.50.1.zip
7z x kallisto*.zip
echo "${GITHUB_WORKSPACE}/kallisto" >> $GITHUB_PATH
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
continue-on-error: true
- name: Test kallisto installation
run: kallisto version
- name: Install bowtie2
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
brew install bowtie2
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install bowtie2
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install wget -y
wget https://github.com/BenLangmead/bowtie2/releases/download/v2.5.1/bowtie2-2.5.1-mingw-x86_64.zip
7z x bowtie2-2.5.1-mingw-x86_64.zip
echo "${GITHUB_WORKSPACE}/bowtie2-2.5.1-mingw-x86_64" >> $GITHUB_PATH
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- name: Test bowtie2 installation
run: |
bowtie2 --version
bowtie2-build-s --version
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade -r requirements_dev.txt
python -m pip install .[all]
- name: Test with pytest
run: |
coverage run --source=rnalysis/ -m pytest tests/
continue-on-error: false
- name: Generate lcov file
run: coverage lcov
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
if: runner.os != 'macOS'
continue-on-error: true
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
path-to-lcov: ./coverage.lcov
finish:
name: Finish submitting coverage
if: ${{ always() }}
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
continue-on-error: true
with:
parallel-finished: true