Skip to content

Commit

Permalink
fix: fix aarch64 (#18)
Browse files Browse the repository at this point in the history
* fix aarch64 and add test action
BREAKING CHANGE
  • Loading branch information
qingzhuozhen authored Dec 31, 2022
1 parent 02482bd commit 28611ab
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
pr-title-check:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- name: PR title is valid
if: >
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/test-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Unit Test on Arm
on: [pull_request]

jobs:
aarch_job:
runs-on: ubuntu-latest
name: Test on ubuntu aarch64
steps:
- uses: actions/checkout@v3
- uses: uraimo/run-on-arch-action@v2
name: Run Unit Test
id: runcmd
with:
arch: aarch64
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt update
apt -y install python3
run: |
python3 -m unittest discover -s ./tests -p '*_test.py'
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.6" ]
python-version: [ "3.7" ]
steps:
- name: Checkout source code
uses: actions/checkout@v3
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ def getplatformpaths(self, libname):
# actually found multiple architectures or other library types that
# may not load
yield i
if platform.machine().startswith('arm'):
if platform.machine().startswith(('arm', 'aarch64')):
yield os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), f"./lib/linuxArm64/{libname}.so"))
else:
yield os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), f"./lib/linuxX64/{libname}.so"))
Expand Down

0 comments on commit 28611ab

Please sign in to comment.