Skip to content
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"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, can you help me understand, why use pwsh scripts to manually download sccache, instead of using the sccache-action ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all was written before that existed. Glad to know about it!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested with sccache-action in my fork repo: https://github.com/linrongbin16/rusty_v8/pull/2

The ci job failed on windows: https://github.com/linrongbin16/rusty_v8/actions/runs/14051568959

The error says 'sccahce' cannot compile 'syn' lib, and I search such kind of error, found this issue: mozilla/sccache#2196

So the conclusion is: sccache has a different behavior for rustc_wrapper and server/client. So maybe keep it this way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I submit PR #1748 to simplify the installtion of sccache.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - happy to land that patch if you can get it to work

Copy link
Contributor

@linrongbin16 linrongbin16 Mar 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already finished the PR (and test many times), would you take a look?

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