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

Support for Linux aarch64 #73

Merged
merged 2 commits into from
Mar 20, 2024
Merged
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
56 changes: 53 additions & 3 deletions .github/workflows/build_linux.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,31 @@
name: build_linux

on:
pull_request:
branches:
- main
push:
branches:
- main
# Enable manual run from the Actions tab
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true


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

steps:
# Checks-out the repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v2
- uses: actions/checkout@v4

# Runs a set of commands using the runners shell
- name: Build-commands
Expand All @@ -21,9 +36,44 @@ jobs:
cd $GITHUB_WORKSPACE
ls -lh
cd src
make LDFLAGS2=-static
make -j LDFLAGS2=-static
file Linux/muscle | grep x86-64
- name: Upload binary artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: muscle-linux-binary
path: src/Linux/muscle

build-aarch64:
name: Linux aarch64
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
uses: uraimo/run-on-arch-action@v2
with:
arch: aarch64
distro: ubuntu20.04
githubToken: ${{ github.token }}
dockerRunArgs: |
--volume "${PWD}:/muscle"
install: |
apt-get update -q -y
apt-get install -q -y make g++ file git
run: |
git config --global --add safe.directory /muscle
cd /muscle
uname -a
lscpu
cd src/
make -j LDFLAGS2=-static
file Linux/muscle | grep aarch64

- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: muscle-linux-aarch64-binary
path: src/Linux/muscle

2 changes: 1 addition & 1 deletion src/myutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define TRACK_ALLOC 0
#define ALLOC_TOTALS 0

#if defined(__x86_64__) || defined(_M_X64) || defined(__arm64__)
#if defined(__x86_64__) || defined(_M_X64) || defined(__arm64__) || defined(__aarch64__)
#define BITS 64
#else
#define BITS 32
Expand Down