mirror of
https://github.com/infinilabs/coco-app.git
synced 2025-12-25 15:59:30 +01:00
This commit removes the CI step that installs LLVM on Windows because: 1. It was constantly failing when I worked on [1] ```text Failed in attempting to update the source: winget The `msstore` source requires that you view the following agreements before using. Terms of Transaction: https://aka.ms/microsoft-store-terms-of-transaction The source requires the current machine's 2-letter geographic region to be sent to the backend service to function properly (ex. "US"). Failed when searching source: winget An unexpected error occurred while executing the command: 0x8a15000f : Data required by the source is missing No packages were found among the working sources. ``` 2. Actually, we don't need to install it since the Windows Github action image already includes it. See [2] [1]: https://github.com/infinilabs/coco-app/pull/946 [2]: https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
69 lines
2.1 KiB
YAML
69 lines
2.1 KiB
YAML
name: Rust Code Check
|
|
|
|
on:
|
|
pull_request:
|
|
# Only run it when Rust code changes
|
|
paths:
|
|
- 'src-tauri/**'
|
|
|
|
jobs:
|
|
check:
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, windows-latest, macos-latest]
|
|
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Checkout dependency (pizza-engine) repository
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: 'infinilabs/pizza'
|
|
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
submodules: recursive
|
|
ref: main
|
|
path: pizza
|
|
|
|
- name: Install dependencies (ubuntu only)
|
|
if: startsWith(matrix.platform, 'ubuntu-latest')
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf xdg-utils libtracker-sparql-3.0-dev
|
|
|
|
# On Windows, we need to generate bindings for 'searchapi.h' using bindgen.
|
|
# And bindgen relies on 'libclang'
|
|
# https://rust-lang.github.io/rust-bindgen/requirements.html#windows
|
|
#
|
|
# We don't need to install it because it is already included in GitHub
|
|
# Action runner image:
|
|
# https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md#language-and-runtime
|
|
|
|
- name: Add pizza engine as a dependency
|
|
working-directory: src-tauri
|
|
shell: bash
|
|
run: cargo add --path ../pizza/lib/engine --features query_string_parser,persistence
|
|
|
|
- name: Format check
|
|
working-directory: src-tauri
|
|
shell: bash
|
|
run: |
|
|
rustup component add rustfmt
|
|
cargo fmt --all --check
|
|
|
|
- name: Check compilation (Without Pizza engine enabled)
|
|
working-directory: ./src-tauri
|
|
run: cargo check
|
|
|
|
- name: Check compilation (With Pizza engine enabled)
|
|
working-directory: ./src-tauri
|
|
run: cargo check --features use_pizza_engine
|
|
|
|
- name: Run tests (Without Pizza engine)
|
|
working-directory: ./src-tauri
|
|
run: cargo test
|
|
|
|
- name: Run tests (With Pizza engine)
|
|
working-directory: ./src-tauri
|
|
run: cargo test --features use_pizza_engine |