Skip to content

Commit 25eacc0

Browse files
authored
Merge branch 'master' into wasm-gallery-i18n
2 parents b233094 + ea0d0be commit 25eacc0

File tree

385 files changed

+10838
-4240
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

385 files changed

+10838
-4240
lines changed

.github/actions/install-skia-dependencies/action.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ description: Set up dependencies needed to build Skia
88
runs:
99
using: composite
1010
steps:
11-
- name: Install Ninja
12-
if: runner.os == 'macOS'
13-
run: brew install ninja
14-
shell: bash
1511
- name: Upgrade LLVM for Skia build on Windows
1612
if: runner.os == 'Windows'
1713
run: choco upgrade llvm --version "19.1.7" --allow-downgrade

.github/actions/setup-rust/action.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ inputs:
2424
description: "Extra cache keying information"
2525
required: false
2626
default: ""
27+
cache:
28+
description: "Enable Rust caching (default: true)"
29+
required: false
30+
default: "true"
31+
save_if:
32+
description: "Condition to save the cache"
33+
required: false
34+
default: ${{ github.ref == 'refs/heads/master' }}
2735

2836
runs:
2937
using: composite
@@ -45,12 +53,21 @@ runs:
4553
run: |
4654
echo "CARGO_HOME=${{ runner.workspace }}\cargo" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
4755
shell: powershell
56+
- name: Set GETTEXT_DIR environment variable or it will still be compiled from source.
57+
if: runner.os == 'macOS'
58+
run: |
59+
GETTEXT_PATH=$(brew --prefix gettext)
60+
echo "GETTEXT_DIR=${GETTEXT_PATH}" >> $GITHUB_ENV
61+
echo "Installed gettext at: ${GETTEXT_PATH}"
62+
shell: bash
4863
- name: Install Rust ${{ inputs.toolchain }}
4964
uses: dtolnay/rust-toolchain@stable
5065
with:
5166
toolchain: ${{ inputs.toolchain }}
5267
components: ${{ inputs.components }}
5368
target: ${{ inputs.target }}
5469
- uses: Swatinem/rust-cache@v2
70+
if: inputs.cache == 'true'
5571
with:
5672
key: ${{ inputs.key }}-1
73+
save-if: ${{ inputs.save_if }}

.github/ci_path_filters.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,55 @@ material_components:
4242
- 'ui-libraries/material/**'
4343
- *files_in_root
4444
- *ci_config
45+
46+
internal: &internal
47+
- 'internal/**'
48+
- 'helper_crates/**'
49+
- *files_in_root
50+
- *ci_config
51+
52+
api_cpp:
53+
- 'api/cpp/**'
54+
- 'tools/compiler/**'
55+
- *ci_config
56+
57+
api_python:
58+
- 'api/python/**'
59+
- *ci_config
60+
61+
api_node:
62+
- 'api/node/**'
63+
- *ci_config
64+
65+
api_rs:
66+
- 'api/rs/**'
67+
- *ci_config
68+
69+
tests:
70+
- 'tests/**'
71+
72+
examples:
73+
- 'examples/**'
74+
- 'demos/**'
75+
76+
vsce:
77+
- *files_in_root
78+
- *ci_config
79+
- *internal
80+
- 'api/rs/**'
81+
- 'editors/vscode/**'
82+
- 'tools/lsp/**'
83+
- 'docs/common/src/utils/slint.tmLanguage.json'
84+
85+
slintpad:
86+
- *internal
87+
- 'tools/slintpad/**'
88+
- 'api/wasm-interpreter/**'
89+
- 'tools/lsp/**'
90+
- 'api/rs/**'
91+
- 'docs/common/src/utils/slint.tmLanguage.json'
92+
93+
updater_test:
94+
- *internal
95+
- 'tests/cases/**'
96+
- 'tools/updater/**'

.github/dependabot.yml

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,32 +42,9 @@ updates:
4242
- dependency-name: "monaco-languageclient"
4343

4444
groups:
45-
vscode:
46-
patterns:
47-
- "vscode*"
48-
starlight_astro:
49-
patterns:
50-
- "*astro*"
51-
- "@*astro*"
52-
- "starlight*"
53-
- "sharp"
54-
- "@expressive-code/plugin-line-numbers"
55-
playwright:
56-
patterns:
57-
- "playwright*"
58-
- "@playwright*"
59-
react:
60-
patterns:
61-
- "react"
62-
- "react-dom"
63-
- "@types/react"
64-
- "@types/react-dom"
65-
lumino:
66-
patterns:
67-
- "@lumino/*"
68-
vite:
69-
patterns:
70-
- "vite*"
71-
- "@vitejs*"
72-
- "vitest*"
73-
- "@vitest*"
45+
npm-major-updates:
46+
update-types: ["major"]
47+
npm-minor-updates:
48+
update-types: ["minor"]
49+
npm-patch-updates:
50+
update-types: ["patch"]

.github/workflows/apk_gallery.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Copyright © SixtyFPS GmbH <[email protected]>
2-
# SPDX-License-Identifier: MIT
2+
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
33

44
name: Build an APK for the gallery example
55

@@ -65,7 +65,7 @@ jobs:
6565
working-directory: ui-libraries/material/examples/gallery
6666
run: cargo apk build --target aarch64-linux-android --lib --release
6767
- name: "Upload Artifacts"
68-
uses: actions/upload-artifact@v4
68+
uses: actions/upload-artifact@v5
6969
with:
7070
name: apk_gallery
7171
path: |

.github/workflows/autofix.yaml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ on:
99
push:
1010
branches: [master, "feature/*"]
1111
workflow_dispatch:
12+
merge_group:
1213

1314
permissions:
1415
contents: read
1516

1617
concurrency:
17-
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref || github.run_id }}
18+
group: ci-${{ github.event.pull_request.number || github.ref }}
1819
cancel-in-progress: true
1920

2021
env:
@@ -23,8 +24,8 @@ env:
2324

2425
jobs:
2526
format_fix:
26-
runs-on: ubuntu-24.04
27-
timeout-minutes: 15
27+
runs-on: ubuntu-latest
28+
timeout-minutes: 5
2829
steps:
2930
- uses: actions/checkout@v5
3031
- uses: jdx/mise-action@v3
@@ -39,8 +40,8 @@ jobs:
3940
uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27
4041

4142
lint_typecheck:
42-
runs-on: ubuntu-24.04
43-
timeout-minutes: 15
43+
runs-on: ubuntu-latest
44+
timeout-minutes: 5
4445
steps:
4546
- uses: actions/checkout@v5
4647
- uses: jdx/mise-action@v3
@@ -51,3 +52,17 @@ jobs:
5152
run: rustup toolchain install stable-x86_64-unknown-linux-gnu --profile default
5253
- name: Run lints
5354
run: mise run --force --jobs=1 'ci:autofix:lint'
55+
56+
ci:
57+
needs: [format_fix, lint_typecheck]
58+
permissions:
59+
contents: read
60+
deployments: write
61+
pull-requests: read
62+
uses: ./.github/workflows/ci.yaml
63+
secrets:
64+
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
65+
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
66+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
67+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
68+
READ_WRITE_PRIVATE_KEY: ${{ secrets.READ_WRITE_PRIVATE_KEY }}
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# Copyright © SixtyFPS GmbH <[email protected]>
2+
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0
3+
4+
name: Build and Test (Reusable)
5+
6+
on:
7+
workflow_call:
8+
inputs:
9+
name:
10+
description: 'Name of the job'
11+
required: true
12+
type: string
13+
os:
14+
description: 'Operating system to run on'
15+
required: true
16+
type: string
17+
rust_version:
18+
description: 'Rust version to use'
19+
required: true
20+
type: string
21+
extra_args:
22+
description: 'Extra arguments to pass to cargo test'
23+
required: false
24+
type: string
25+
default: ""
26+
cache:
27+
description: 'Use rust-cache'
28+
required: false
29+
type: boolean
30+
default: true
31+
save_if:
32+
description: 'Condition to save the cache'
33+
required: false
34+
type: boolean
35+
default: true
36+
timeout_minutes:
37+
description: 'Timeout in minutes'
38+
required: false
39+
type: number
40+
default: 120
41+
42+
jobs:
43+
build_and_test:
44+
name: ${{ inputs.name }}
45+
timeout-minutes: ${{ inputs.timeout_minutes }}
46+
env:
47+
MACOSX_DEPLOYMENT_TARGET: "11.0"
48+
DYLD_FRAMEWORK_PATH: /Users/runner/work/slint/Qt/6.2.2/macos/lib
49+
QT_QPA_PLATFORM: offscreen
50+
RUSTFLAGS: -D warnings
51+
CARGO_PROFILE_DEV_DEBUG: 0
52+
CARGO_INCREMENTAL: false
53+
RUST_BACKTRACE: 1
54+
SLINT_EMIT_DEBUG_INFO: 1
55+
56+
runs-on: ${{ inputs.os }}
57+
58+
steps:
59+
- uses: actions/checkout@v5
60+
- uses: ./.github/actions/install-linux-dependencies
61+
- uses: ./.github/actions/install-skia-dependencies
62+
- uses: ilammy/msvc-dev-cmd@v1
63+
- uses: actions/setup-python@v6
64+
with:
65+
python-version: '3.10'
66+
- name: Install Qt
67+
if: runner.os != 'Windows'
68+
uses: jurplel/install-qt-action@v4
69+
with:
70+
version: "6.2.2"
71+
setup-python: false
72+
cache: true
73+
- name: Install ffmpeg and alsa (Linux)
74+
if: runner.os == 'Linux'
75+
run: sudo apt-get install clang libavcodec-dev libavformat-dev libavutil-dev libavfilter-dev libavdevice-dev libasound2-dev pkg-config
76+
- name: Install gstreamer and libunwind (Linux)
77+
if: runner.os == 'Linux'
78+
run: sudo apt-get install libunwind-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good
79+
- name: Setup headless display
80+
if: runner.os != 'macOS'
81+
uses: pyvista/setup-headless-display-action@v4
82+
- uses: ./.github/actions/setup-rust
83+
with:
84+
toolchain: ${{ inputs.rust_version }}
85+
key: x-v3
86+
save_if: ${{ inputs.save_if }}
87+
cache: ${{ inputs.cache }}
88+
- name: Run tests
89+
run: cargo test --verbose --all-features --workspace --timings ${{ inputs.extra_args }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude mcu-embassy --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp --exclude slint-python -- --skip=_qt::t
90+
env:
91+
SLINT_CREATE_SCREENSHOTS: 1
92+
shell: bash
93+
- name: Run tests (qt)
94+
run: cargo test --verbose --all-features --workspace ${{ inputs.extra_args }} --exclude slint-node --exclude pyslint --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude mcu-embassy --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp --exclude slint-python --bin test-driver-rust -- _qt --test-threads=1
95+
shell: bash
96+
- name: live-preview for rust test
97+
env:
98+
SLINT_LIVE_PREVIEW: 1
99+
run: cargo test --verbose --features=build-time,slint/live-preview -p test-driver-rust -- --skip=_qt::t
100+
shell: bash
101+
- name: Upload build timing report
102+
if: always()
103+
uses: actions/upload-artifact@v5
104+
with:
105+
name: cargo-timings-${{ inputs.os }}-${{ inputs.rust_version }}
106+
path: target/cargo-timings/cargo-timing.html
107+
if-no-files-found: ignore
108+
- name: Archive screenshots after failed tests
109+
if: ${{ failure() }}
110+
uses: actions/upload-artifact@v5
111+
with:
112+
name: screenshots-${{ inputs.os }}
113+
path: |
114+
tests/screenshots/references
115+

0 commit comments

Comments
 (0)