mirror of
https://github.com/slint-ui/slint.git
synced 2025-12-23 09:19:32 +00:00
Replace neon node port (#3744)
* Update api/node/README.md Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
b6b3337430
commit
bf77b064ab
73 changed files with 370 additions and 2131 deletions
63
.github/workflows/ci.yaml
vendored
63
.github/workflows/ci.yaml
vendored
|
|
@ -74,7 +74,7 @@ jobs:
|
|||
# cargo update -p clap_lex --precise 0.5.0
|
||||
# fi
|
||||
- name: Run tests
|
||||
run: DYLD_FRAMEWORK_PATH=$Qt5_DIR/lib cargo test --verbose --all-features --workspace ${{ matrix.extra_args }} --exclude slint-napi --exclude test-driver-napi --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp
|
||||
run: DYLD_FRAMEWORK_PATH=$Qt5_DIR/lib cargo test --verbose --all-features --workspace ${{ matrix.extra_args }} --exclude slint-node --exclude test-driver-node --exclude slint-node --exclude test-driver-nodejs --exclude test-driver-cpp --exclude mcu-board-support --exclude printerdemo_mcu --exclude uefi-demo --exclude slint-cpp
|
||||
env:
|
||||
SLINT_CREATE_SCREENSHOTS: 1
|
||||
shell: bash
|
||||
|
|
@ -87,55 +87,6 @@ jobs:
|
|||
tests/screenshots/references
|
||||
|
||||
node_test:
|
||||
env:
|
||||
DYLD_FRAMEWORK_PATH: /Users/runner/work/slint/Qt/5.15.2/clang_64/lib
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
RUSTFLAGS: -D warnings
|
||||
CARGO_PROFILE_DEV_DEBUG: 0
|
||||
CARGO_INCREMENTAL: false
|
||||
RUST_BACKTRACE: 1
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-22.04, macos-11]
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/install-linux-dependencies
|
||||
# Python 3.11 breaks the neon-sys build
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install Qt
|
||||
if: runner.os != 'Windows'
|
||||
uses: jurplel/install-qt-action@v3
|
||||
with:
|
||||
version: '5.15.2'
|
||||
setup-python: false
|
||||
cache: true
|
||||
- name: Setup headless display
|
||||
uses: pyvista/setup-headless-display-action@v1
|
||||
- name: Set default style
|
||||
if: matrix.os != 'windows-2022'
|
||||
run: |
|
||||
echo "SLINT_STYLE=native" >> $GITHUB_ENV
|
||||
- name: Set default style
|
||||
if: matrix.os == 'windows-2022'
|
||||
run: |
|
||||
echo "SLINT_STYLE=fluent" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "SLINT_NO_QT=1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
- uses: ./.github/actions/install-nodejs
|
||||
id: node-install
|
||||
- uses: ./.github/actions/setup-rust
|
||||
with:
|
||||
key: x-v2-${{ steps.node-install.outputs.node-version }} # the cache key consists of a manually bumpable version and the node version, as the cached rustc artifacts contain linking information where to find node.lib, which is in a versioned directory.
|
||||
- name: Build node plugin
|
||||
run: cargo build --verbose --all-features -p slint-node
|
||||
- name: Run node tests
|
||||
run: cargo test --verbose --all-features -p test-driver-nodejs -p slint-node
|
||||
|
||||
napi_test:
|
||||
env:
|
||||
DYLD_FRAMEWORK_PATH: /Users/runner/work/slint/Qt/5.15.2/clang_64/lib
|
||||
QT_QPA_PLATFORM: offscreen
|
||||
|
|
@ -176,16 +127,16 @@ jobs:
|
|||
with:
|
||||
key: x-napi-v2-${{ steps.node-install.outputs.node-version }} # the cache key consists of a manually bumpable version and the node version, as the cached rustc artifacts contain linking information where to find node.lib, which is in a versioned directory.
|
||||
- name: Run npm install
|
||||
working-directory: ./api/napi
|
||||
working-directory: ./api/node
|
||||
run: npm install
|
||||
- name: Typescript check
|
||||
working-directory: ./api/napi
|
||||
working-directory: ./api/node
|
||||
run: npm run syntax_check
|
||||
- name: Run napi tests
|
||||
working-directory: ./api/napi
|
||||
- name: Run node tests
|
||||
working-directory: ./api/node
|
||||
run: npm test
|
||||
- name: Run test-driver-napi
|
||||
run: cargo test --verbose --all-features -p test-driver-napi -p slint-napi
|
||||
- name: Run test-driver-nodejs
|
||||
run: cargo test --verbose --all-features -p test-driver-nodejs -p slint-node
|
||||
|
||||
cpp_test_driver:
|
||||
env:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue