Skip to content

Commit f15a426

Browse files
committed
Add auto-selected SIMD compilation
1 parent b419ffc commit f15a426

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

.github/workflows/build.yml

+24-3
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
strategy:
2222
matrix:
2323
arch: [x86_64, aarch64]
24-
cpu_instr: [non_SIMD, SSE2, AVX2, NEON]
24+
cpu_instr: [non-SIMD, SSE2, AVX2, NEON, auto-selected]
2525

2626
steps:
2727
- uses: actions/checkout@v3
2828
with:
2929
submodules: true
3030
- name: Build trimal for Linux x86_64
31-
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'non_SIMD'
31+
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'non-SIMD'
3232
run: cmake . -DDISABLE_SSE2=1 -DDISABLE_AVX2=1 && make && file bin/trimal && file bin/readal &&
3333
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
3434
- name: Build trimal for Linux x86_64 and SSE2
@@ -39,9 +39,13 @@ jobs:
3939
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'AVX2'
4040
run: cmake . -DDISABLE_SSE2=1 && make && file bin/trimal && file bin/readal &&
4141
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
42+
- name: Build trimal for Linux x86_64 and auto-selected SIMD
43+
if: matrix.arch == 'x86_64' && matrix.cpu_instr == 'auto-selected'
44+
run: cmake . && make && file bin/trimal && file bin/readal &&
45+
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
4246

4347
- name: Build trimal for Linux aarch64
44-
if: matrix.arch == 'aarch64' && matrix.cpu_instr == 'non_SIMD'
48+
if: matrix.arch == 'aarch64' && matrix.cpu_instr == 'non-SIMD'
4549
uses: uraimo/run-on-arch-action@v2
4650
# Emulate ARM architecture since it's not natively supported by GitHub.
4751
# Warning about image and host platforms not matching may be ignored (https://github.com/uraimo/run-on-arch-action/issues/127#issuecomment-1605691328)
@@ -74,3 +78,20 @@ jobs:
7478
run: |
7579
cmake . -DDISABLE_SSE2=1 -DDISABLE_AVX2=1 && make && file bin/trimal && file bin/readal &&
7680
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh
81+
- name: Build trimal for Linux aarch64 and auto-selected SIMD
82+
if: matrix.arch == 'aarch64' && matrix.cpu_instr == 'auto-selected'
83+
uses: uraimo/run-on-arch-action@v2
84+
# Emulate ARM architecture since it's not natively supported by GitHub.
85+
# Warning about image and host platforms not matching may be ignored (https://github.com/uraimo/run-on-arch-action/issues/127#issuecomment-1605691328)
86+
with:
87+
arch: ${{ matrix.arch }}
88+
distro: ubuntu20.04
89+
githubToken: ${{ github.token }}
90+
dockerRunArgs: |
91+
--volume "${PWD}:/trimal"
92+
install: |
93+
apt-get update -q -y
94+
apt-get install -q -y cmake make g++ file
95+
run: |
96+
cmake . && make && file bin/trimal && file bin/readal &&
97+
./scripts/generate_trimmed_msas.sh && ./scripts/compare_trimmed_msas.sh

0 commit comments

Comments
 (0)