-
Notifications
You must be signed in to change notification settings - Fork 43
131 lines (124 loc) · 5.41 KB
/
build.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
on:
push:
paths:
- '.github/workflows/build.yml'
- 'CMakeLists.txt'
- 'dataset/**'
- 'include/**'
- 'source/**'
- 'scripts/**'
- 'tests/**'
pull_request:
paths:
- '.github/workflows/build.yml'
- 'CMakeLists.txt'
- 'dataset/**'
- 'include/**'
- 'scripts/**'
- 'source/**'
- 'tests/**'
name: Build
jobs:
build_and_test:
runs-on: ubuntu-20.04
strategy:
matrix:
arch: [x86, x86_64, armv7, aarch64]
cpu_instr: [non-SIMD, SSE2, auto-selected]
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Alpine Linux for x86
if: matrix.arch == 'x86'
uses: jirutka/setup-alpine@v1
with:
arch: x86
packages: >
cmake
file
g++
make
shell-name: alpine-x86.sh
- name: Build trimal for Linux x86
if: matrix.arch == 'x86' && matrix.cpu_instr == 'non-SIMD'
run: cmake . -DDISABLE_SSE2=1 -DDISABLE_AVX2=1 && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
shell: alpine-x86.sh {0}
- name: Build trimal for Linux x86 and SSE2
if: matrix.arch == 'x86' && matrix.cpu_instr == 'SSE2'
run: cmake . -DDISABLE_AVX2=1 && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
shell: alpine-x86.sh {0}
- name: Build trimal for Linux x86 and auto-selected SIMD (AVX2 if available)
if: matrix.arch == 'x86' && matrix.cpu_instr == 'auto-selected'
run: cmake . && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
shell: alpine-x86.sh {0}
- name: Build trimal for Linux x86_64
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'non-SIMD'
run: cmake . -DDISABLE_SSE2=1 -DDISABLE_AVX2=1 && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
- name: Build trimal for Linux x86_64 and SSE2
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'SSE2'
run: cmake . -DDISABLE_AVX2=1 && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
- name: Build trimal for Linux x86_64 and auto-selected SIMD (AVX2 if available)
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'auto-selected'
run: cmake . && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
- name: Setup Alpine Linux for armv7
if: matrix.arch == 'armv7'
uses: jirutka/setup-alpine@v1
with:
arch: armv7
packages: >
cmake
file
g++
make
shell-name: alpine-armv7.sh
- name: Build trimal for Linux armv7
if: matrix.arch == 'armv7' && matrix.cpu_instr == 'non-SIMD'
run: cmake . -DDISABLE_NEON=1 && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
shell: alpine-armv7.sh {0}
- name: Build trimal for Linux armv7 and auto-selected SIMD (NEON)
if: matrix.arch == 'armv7' && matrix.cpu_instr == 'auto-selected'
run: cmake . && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
shell: alpine-armv7.sh {0}
- name: Build trimal for Linux aarch64
if: matrix.arch == 'aarch64' && matrix.cpu_instr == 'non-SIMD'
uses: uraimo/run-on-arch-action@v2
# Emulate ARM architecture since it's not natively supported by GitHub.
# Warning about image and host platforms not matching may be ignored (https://github.com/uraimo/run-on-arch-action/issues/127#issuecomment-1605691328)
with:
arch: ${{ matrix.arch }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/trimal"
install: |
apt-get update -q -y
apt-get install -q -y cmake make g++ file
run: |
cmake . -DDISABLE_NEON=1 && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
- name: Build trimal for Linux aarch64 and auto-selected SIMD (NEON)
if: matrix.arch == 'aarch64' && matrix.cpu_instr == 'auto-selected'
uses: uraimo/run-on-arch-action@v2
# Emulate ARM architecture since it's not natively supported by GitHub.
# Warning about image and host platforms not matching may be ignored (https://github.com/uraimo/run-on-arch-action/issues/127#issuecomment-1605691328)
with:
arch: ${{ matrix.arch }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/trimal"
install: |
apt-get update -q -y
apt-get install -q -y cmake make g++ file
run: |
cmake . && make && file bin/trimal && file bin/readal &&
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh