Skip to content

feat: export-cef-dir utility to copy extracted CEF out of target #12

feat: export-cef-dir utility to copy extracted CEF out of target

feat: export-cef-dir utility to copy extracted CEF out of target #12

Workflow file for this run

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/[email protected]
- name: Check fmt
run: cargo fmt --check
- name: Install ninja
run: |
${{ matrix.os == 'macos-latest' && 'brew install ninja'
|| (matrix.os == 'windows-latest' && 'choco install ninja'
|| 'echo "ninja already installed"') }}
- name: Cache CEF
id: cache-cef
uses: actions/[email protected]
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 -- -f "$env:USERPROFILE/.local/share/cef"'
|| 'cargo run -p export-cef-dir -- -f "$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'
|| (matrix.os == 'windows-latest'
&& 'PATH'
|| 'LD_LIBRARY_PATH') }}=${{ matrix.os == 'macos-latest'
&& '$DYLD_FALLBACK_LIBRARY_PATH:$HOME/.local/share/cef'
|| (matrix.os == 'windows-latest'
&& '$env:PATH;$env:USERPROFILE/.local/share/cef'
|| '$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
- name: Export CEF
if: ${{ !steps.cache-cef.outputs.cache-hit }}
run: |
cargo run -p export-cef-dir -- "${{ matrix.os == 'windows-latest'
&& '$env:USERPROFILE' || '$HOME'
}}/.local/share/cef"