-
Notifications
You must be signed in to change notification settings - Fork 4
130 lines (109 loc) · 3.47 KB
/
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
name: CI
on:
workflow_dispatch:
schedule:
- cron: "35 4 */6 * *" # Every 6 days.
pull_request:
push:
jobs:
build-iqtree:
name: Fetch or Build IQ-TREE 2 Static Library on ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14] # Intel linux, Intel Mac, ARM Mac
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
submodules: recursive
- id: build
uses: ./.github/actions/build-iqtree
with:
os: ${{ matrix.os }}
outputs:
iqtree2-sha: ${{steps.build.outputs.iqtree2-sha}}
tests:
name: Run Tests with Python ${{matrix.python-version}} on ${{matrix.os}}
needs: build-iqtree
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14] # Intel linux, Intel Mac, ARM Mac
python-version: ["3.10", "3.11", "3.12"]
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
submodules: recursive
- uses: ./.github/actions/setup-piqtree
with:
python-version: ${{ matrix.python-version }}
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree2-sha }}
- name: Update Homebrew
if: matrix.os != 'ubuntu-latest'
run: |
brew update
brew install llvm
- name: Run Nox Testing
run: |
pip install nox
nox -s test-${{ matrix.python-version }} -- --cov --cov-report=lcov:${{matrix.os}}-${{matrix.python-version}}.lcov --cov-report=term --cov-append --durations=20
- name: Coveralls Parallel
if: matrix.os != 'macos-13'
uses: coverallsapp/github-action@v2
with:
parallel: true
github-token: ${{secrets.github_token}}
flag-name: run-${{matrix.python-version}}-${{matrix.os}}
file: "${{matrix.os}}-${{matrix.python-version}}.lcov"
upload-coverage:
name: "Finish Coveralls"
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
type_check:
name: "Type Check"
needs: build-iqtree
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.12"]
os: [ubuntu-latest]
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: ./.github/actions/setup-piqtree
with:
python-version: ${{ matrix.python-version }}
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree2-sha }}
- name: "Run Type Checking for ${{ matrix.python-version }}"
run: |
pip install nox
nox -s type_check-${{ matrix.python-version }}
lint:
name: "Linting"
needs: build-iqtree
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.12"]
os: [ubuntu-latest]
steps:
- uses: "actions/checkout@v4"
with:
fetch-depth: 0
- uses: ./.github/actions/setup-piqtree
with:
python-version: ${{ matrix.python-version }}
cache-key: libiqtree-${{ matrix.os }}-${{ needs.build-iqtree.outputs.iqtree2-sha }}
- name: "Run Linting for ${{ matrix.python-version }}"
run: |
pip install nox
nox -s ruff-${{ matrix.python-version }}