get latest (#448) #709
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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@v7 | |
| - 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@v6.1.0 | |
| 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 |