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

native aarch64 builds #1663

Open
wants to merge 1 commit into
base: main
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
38 changes: 10 additions & 28 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ jobs:
variant: release # Note: we do not support windows debug builds.
cargo: cargo

- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-arm' || 'ubuntu-22.04-arm64' }}
target: aarch64-unknown-linux-gnu
variant: debug
cargo: cargo

- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-arm' || 'ubuntu-22.04-arm64' }}
target: aarch64-unknown-linux-gnu
variant: release
cargo: cargo
Expand Down Expand Up @@ -101,24 +101,6 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: 3.11.x
architecture: x64

- name: Install cross compilation toolchain
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
run: |
rustup target add aarch64-unknown-linux-gnu

sudo apt update
sudo apt install -yq --no-install-suggests --no-install-recommends \
binfmt-support g++-10-aarch64-linux-gnu g++-10-multilib \
gcc-10-aarch64-linux-gnu libc6-arm64-cross qemu qemu-user \
qemu-user-binfmt

sudo ln -s /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 \
/lib/ld-linux-aarch64.so.1

echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc-10" >> ${GITHUB_ENV}
echo "QEMU_LD_PREFIX=/usr/aarch64-linux-gnu" >> ${GITHUB_ENV}

- name: Write git_submodule_status.txt
run: git submodule status --recursive > git_submodule_status.txt
Expand Down Expand Up @@ -149,15 +131,16 @@ jobs:
SCCACHE_CACHE_SIZE: 128M
SCCACHE_IDLE_TIMEOUT: 0
run: |
$version = "0.2.12"
$version = "v0.8.2"
$platform =
@{ "macOS" = "x86_64-apple-darwin"
"Linux" = "x86_64-unknown-linux-musl"
"Windows" = "x86_64-pc-windows-msvc"
}.${{ runner.os }}
@{ "x86_64-apple-darwin" = "x86_64-apple-darwin"
"aarch64-apple-darwin" = "aarch64-apple-darwin"
"x86_64-unknown-linux-gnu" = "x86_64-unknown-linux-musl"
"aarch64-unknown-linux-gnu" = "aarch64-unknown-linux-musl"
"x86_64-pc-windows-msvc" = "x86_64-pc-windows-msvc"
}['${{ matrix.config.target }}']
$basename = "sccache-$version-$platform"
$url = "https://github.com/mozilla/sccache/releases/download/" +
"$version/$basename.tar.gz"
$url = "https://github.com/mozilla/sccache/releases/download/$version/$basename.tar.gz"
cd ~
curl -LO $url
tar -xzvf "$basename.tar.gz"
Expand Down Expand Up @@ -259,7 +242,6 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.11.x
architecture: x64

- name: Download CI artifacts
uses: actions/download-artifact@v4
Expand Down
2 changes: 2 additions & 0 deletions tools/ninja_gn_binaries.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def get_platform():
machine = platform.machine().lower()
if machine == 'x86_64':
machine = 'amd64'
elif machine == 'aarch64':
machine = 'arm64'

return f'{system}-{machine}'

Expand Down
Loading