Skip to content

Commit

Permalink
fix: glibc version (#1659)
Browse files Browse the repository at this point in the history
go back to 22.04 to fix glibc version. updates clang for newer features used in v8. also requires a rust toolchain upgrade to build correctly for mysterious and unknown reasons.
  • Loading branch information
devsnek authored Nov 4, 2024
1 parent 428b176 commit 06e98a6
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 18 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ jobs:
variant: release
cargo: cargo

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

- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-24.04-xl' || 'ubuntu-24.04' }}
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
target: x86_64-unknown-linux-gnu
variant: release
cargo: cargo
Expand All @@ -67,12 +67,12 @@ jobs:
variant: release # Note: we do not support windows debug builds.
cargo: cargo

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

- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-24.04-xl' || 'ubuntu-24.04' }}
- os: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
target: aarch64-unknown-linux-gnu
variant: release
cargo: cargo
Expand Down Expand Up @@ -103,11 +103,6 @@ jobs:
python-version: 3.11.x
architecture: x64

- name: Install ubuntu deps
if: startsWith(matrix.config.os, 'ubuntu')
run: |
sudo apt-get install -y glib2.0
- name: Install cross compilation toolchain
if: matrix.config.target == 'aarch64-unknown-linux-gnu'
run: |
Expand All @@ -116,7 +111,7 @@ jobs:
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-system qemu-user \
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 \
Expand Down Expand Up @@ -169,6 +164,15 @@ jobs:
. $basename/sccache --start-server
echo "$(pwd)/$basename" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Install Clang
if: startsWith(matrix.config.os, 'ubuntu')
run: |
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-19 main" | sudo dd of=/etc/apt/sources.list.d/llvm-toolchain-jammy-19.list
curl https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo dd of=/etc/apt/trusted.gpg.d/llvm-snapshot.gpg
sudo apt-get update
sudo apt-get -qq remove 'clang-*'
sudo apt-get install lld-19 clang-19 clang-tools-19 clang-tidy-19 clang-format-19 -y
- name: Install Rust (nightly)
uses: dtolnay/rust-toolchain@nightly
if: matrix.config.variant == 'asan'
Expand All @@ -179,8 +183,7 @@ jobs:
- name: check c++ code formatting
if: startsWith(matrix.config.os, 'ubuntu')
run: |
sudo apt-get install -y clang-format
clang-format --verbose --Werror --dry-run src/*.cc src/*.hpp src/*.h
clang-format-19 --verbose --Werror --dry-run src/*.cc src/*.hpp src/*.h
- name: Test (ASAN)
env:
Expand Down Expand Up @@ -237,7 +240,7 @@ jobs:

publish:
needs: build
runs-on: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-24.04-xl' || 'ubuntu-24.04' }}
runs-on: ${{ github.repository == 'denoland/rusty_v8' && 'ubuntu-22.04-xl' || 'ubuntu-22.04' }}
if: github.repository == 'denoland/rusty_v8' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Configure git
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.81.0"
channel = "1.82.0"
components = ["rustfmt", "clippy"]
targets = [
"x86_64-apple-darwin",
Expand Down
3 changes: 1 addition & 2 deletions tests/test_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11029,8 +11029,7 @@ fn test_fast_calls_callback_options_data() {
let scope = &mut v8::ContextScope::new(scope, context);

let global = context.global(scope);
let external =
v8::External::new(scope, unsafe { addr_of_mut!(DATA) as *mut c_void });
let external = v8::External::new(scope, addr_of_mut!(DATA) as *mut c_void);

let template = v8::FunctionTemplate::builder(slow_fn)
.data(external.into())
Expand Down

0 comments on commit 06e98a6

Please sign in to comment.