mirror of
https://github.com/tauri-apps/cef-rs.git
synced 2026-01-31 00:55:21 +01:00
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v5.0.1...v5.0.2) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 5.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
name: Rust validation
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
|
|
jobs:
|
|
rust:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- ubuntu-latest
|
|
- macos-latest
|
|
- windows-latest
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
${{ matrix.os == 'ubuntu-latest'
|
|
&& 'sudo apt-get update -q; sudo apt-get install -yq libglib2.0-dev'
|
|
|| 'echo "No additional dependencies."'
|
|
}}
|
|
|
|
- name: Check fmt
|
|
run: cargo fmt --check
|
|
|
|
- name: Cache CEF
|
|
id: cache-cef
|
|
uses: actions/cache@v5.0.2
|
|
with:
|
|
path: ~/.local/share/cef
|
|
key: cef-${{ matrix.os }}-${{ hashFiles('Cargo.toml') }}
|
|
|
|
- name: ${{ steps.cache-cef.outputs.cache-hit && 'Use cache' || 'Export CEF' }}
|
|
run: |
|
|
${{ steps.cache-cef.outputs.cache-hit && 'echo "Cached CEF"'
|
|
|| (matrix.os == 'windows-latest'
|
|
&& 'cargo run -p export-cef-dir -- "$env:USERPROFILE/.local/share/cef"'
|
|
|| 'cargo run -p export-cef-dir -- "$HOME/.local/share/cef"')
|
|
}}
|
|
echo "CEF_PATH=${{ matrix.os == 'windows-latest'
|
|
&& '$env:USERPROFILE'
|
|
|| '$HOME'
|
|
}}/.local/share/cef" >> "$${{ matrix.os == 'windows-latest'
|
|
&& 'env:'
|
|
|| ''
|
|
}}GITHUB_ENV"
|
|
echo "${{ matrix.os == 'macos-latest'
|
|
&& 'DYLD_FALLBACK_LIBRARY_PATH=$DYLD_FALLBACK_LIBRARY_PATH:$HOME/.local/share/cef:$HOME/.local/share/cef/Chromium Embedded Framework.framework/Libraries'
|
|
|| (matrix.os == 'windows-latest'
|
|
&& 'PATH=$env:PATH;$env:USERPROFILE/.local/share/cef'
|
|
|| 'LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/.local/share/cef') }}" >> "$${{ matrix.os == 'windows-latest'
|
|
&& 'env:'
|
|
|| ''
|
|
}}GITHUB_ENV"
|
|
|
|
- name: Build
|
|
run: cargo build --verbose
|
|
|
|
- name: Run tests
|
|
run: cargo test --verbose
|