Skip to content

Commit

Permalink
Update Skia Bindings
Browse files Browse the repository at this point in the history
This allows reverting 18db321 and

Fixes #6615
  • Loading branch information
tronical committed Jan 14, 2025
1 parent 31c0fea commit 9fbc737
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 35 deletions.
22 changes: 22 additions & 0 deletions .github/actions/install-skia-dependencies/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright © SixtyFPS GmbH <[email protected]>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

---
name: Install Skia dependencies
description: Set up dependencies needed to build Skia

runs:
using: composite
steps:
- name: Install Ninja
if: runner.os == 'macOS'
run: brew install ninja
shell: bash
- name: Install Ninja
if: runner.os == 'Windows'
run: choco install ninja
shell: bash
- name: Upgrade LLVM for Skia build on Windows
if: runner.os == 'Windows'
run: choco upgrade llvm
shell: bash
4 changes: 2 additions & 2 deletions .github/actions/setup-rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ runs:
run: |
git config --system core.longpaths true
shell: powershell
- name: Move cargo home to the same drive as the build, so that relative paths from build to cargo source are without drive letter
- name: Move cargo home close to the target/$profile directory, so that relative paths from build to cargo source are without drive letter
if: runner.os == 'Windows'
run: |
echo "CARGO_HOME=\cargo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CARGO_HOME=${{ runner.workspace }}\cargo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
shell: powershell
- name: Install Rust ${{ inputs.toolchain }}
uses: dtolnay/rust-toolchain@stable
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-linux-dependencies
- uses: ./.github/actions/install-skia-dependencies
- uses: actions/setup-python@v5
with:
python-version: '3.10'
Expand All @@ -69,9 +70,6 @@ jobs:
- name: Install gstreamer and libunwind (Linux)
if: runner.os == 'Linux'
run: sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good
- name: Upgrade LLVM for Skia build on Windows
if: runner.os == 'Windows'
run: choco upgrade llvm
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v3
- uses: ./.github/actions/setup-rust
Expand Down Expand Up @@ -116,9 +114,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/install-linux-dependencies
- name: Upgrade LLVM for Skia build on Windows
if: runner.os == 'Windows'
run: choco upgrade llvm
- uses: ./.github/actions/install-skia-dependencies
- name: Setup headless display
uses: pyvista/setup-headless-display-action@v3
- uses: actions/setup-node@v4
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/cpp_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ jobs:
- name: Prepare licenses
run: bash -x ../../scripts/prepare_binary_package.sh ${{ runner.workspace }}/cppbuild
working-directory: api/cpp/
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: ilammy/msvc-dev-cmd@v1
- name: Select MSVC (windows)
run: |
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/nightly_snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,6 @@ jobs:
target: x86_64-apple-darwin
- name: Install cargo-bundle
run: cargo install --version=0.6.0 cargo-bundle
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build Main LSP Bundle
working-directory: tools/lsp
run: cargo bundle --release --features ${{ env.SLINT_BINARY_FEATURES }}
Expand All @@ -151,10 +147,6 @@ jobs:
- uses: ./.github/actions/setup-rust
with:
target: aarch64-apple-darwin
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Build AArch64 LSP
run: cargo build --target aarch64-apple-darwin --features ${{ env.SLINT_BINARY_FEATURES }} --release -p slint-lsp
- name: Create artifact directory
Expand Down
8 changes: 1 addition & 7 deletions .github/workflows/publish_npm_package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,10 @@ jobs:
- uses: ./.github/actions/install-linux-dependencies
with:
old-ubuntu: true
- uses: ./.github/actions/install-skia-dependencies
- uses: ./.github/actions/setup-rust
with:
target: ${{ matrix.rust-target }}
- name: Upgrade LLVM for Skia build on Windows
if: runner.os == 'Windows'
run: choco upgrade llvm
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
- uses: actions/setup-python@v5
with:
python-version: '3.12'
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v4
with:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/slint_tool_binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,6 @@ jobs:
- uses: ./.github/actions/setup-rust
with:
target: aarch64-apple-darwin
# Pin Python version until https://github.com/slint-ui/slint/issues/6615 is fixed.
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- uses: baptiste0928/cargo-install@v3
with:
crate: cargo-about
Expand Down
8 changes: 4 additions & 4 deletions internal/renderers/skia/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pin-weak = "1"
scoped-tls-hkt = "0.1"
raw-window-handle = { version = "0.6", features = ["std"] }

skia-safe = { version = "0.78.0", features = ["textlayout", "gl"] }
skia-safe = { version = "0.80.1", features = ["textlayout", "gl"] }
glow = { version = "0.13" }
unicode-segmentation = { workspace = true }

Expand All @@ -59,19 +59,19 @@ bytemuck = { workspace = true }

[target.'cfg(target_family = "windows")'.dependencies]
windows = { version = "0.58.0", features = ["Win32", "Win32_System_Com", "Win32_Graphics", "Win32_Graphics_Dxgi", "Win32_Graphics_Direct3D12", "Win32_Graphics_Direct3D", "Win32_Foundation", "Win32_Graphics_Dxgi_Common", "Win32_System_Threading", "Win32_Security"] }
skia-safe = { version = "0.78.0", features = ["d3d"] }
skia-safe = { version = "0.80.1", features = ["d3d"] }

[target.'cfg(target_vendor = "apple")'.dependencies]
objc2 = { version = "0.5.2" }
objc2-metal = { version = "0.2.2", features = ["MTLCommandQueue", "MTLCommandBuffer"] }
objc2-foundation = { version = "0.2.2"}
objc2-quartz-core = { version = "0.2.2" }
objc2-app-kit = { version = "0.2.2" }
skia-safe = { version = "0.78.0", features = ["metal"] }
skia-safe = { version = "0.80.1", features = ["metal"] }
raw-window-metal = "1.0"

[target.'cfg(not(any(target_vendor = "apple", target_family = "windows")))'.dependencies]
skia-safe = { version = "0.78.0", features = ["gl"] }
skia-safe = { version = "0.80.1", features = ["gl"] }

[build-dependencies]
cfg_aliases = { workspace = true }

0 comments on commit 9fbc737

Please sign in to comment.