Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux Aarch64 support #641

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 39 additions & 8 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,50 @@ name: CI
on:
push:
branches:
- master
- master
pull_request:
branches:
- master

jobs:
build:
name: Linux x86_64
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: make -j

- name: Check
run: |
file hifiasm | grep x86-64
./hifiasm

build-aarch64:
name: Linux aarch64
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc]

steps:
- name: Checkout minimap2
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Compile with ${{ matrix.compiler }}
run: make CC=${{ matrix.compiler }}
- name: Build
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu20.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/hifiasm"
install: |
apt-get update -q -y
apt-get install -q -y make gcc-10 g++-10 zlib1g-dev file
run: |
cd /hifiasm
make CC=gcc-10 CXX=g++-10 ARCH_FLAGS="-march=native" -j
file hifiasm | grep aarch64
./hifiasm

4 changes: 4 additions & 0 deletions Levenshtein_distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@

#define __STDC_LIMIT_MACROS
#include <stdint.h>
#ifdef __ARM_NEON
#include "sse2neon.h"
#else
#include "emmintrin.h"
#include "nmmintrin.h"
#include "smmintrin.h"
#include <immintrin.h>
#endif // ~__ARM_NEON
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
CXX= g++
CC= gcc
CXXFLAGS= -g -O3 -msse4.2 -mpopcnt -fomit-frame-pointer -Wall
ARCH_FLAGS=-msse4.2 -mpopcnt
CXXFLAGS= -g -O3 $(ARCH_FLAGS) -fomit-frame-pointer -Wall
CFLAGS= $(CXXFLAGS)
CPPFLAGS=
INCLUDES=
Expand Down
4 changes: 4 additions & 0 deletions ksw2_extz2_sse.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
#include "ksw2.h"

#ifdef __SSE2__
#ifdef __ARM_NEON
#include "sse2neon.h"
#else
#include <emmintrin.h>
#endif // ~__ARM_NEON

#ifdef KSW_SSE2_ONLY
#undef __SSE4_1__
Expand Down
Loading