Skip to content

Commit

Permalink
native aarch64 builds
Browse files Browse the repository at this point in the history
  • Loading branch information
devsnek committed Dec 4, 2024
1 parent e67f11b commit 0d478d9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 27 deletions.
37 changes: 10 additions & 27 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 @@ -103,23 +103,6 @@ jobs:
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 +132,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 +243,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

0 comments on commit 0d478d9

Please sign in to comment.