chore: update godot deps #597
Workflow file for this run
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: Test | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CEF_PATH: ${{ github.workspace }}/cef | |
| SCCACHE_GHA_ENABLED: "true" | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| os: macos-latest | |
| cef_cache_key: macos-arm64 | |
| - target: x86_64-pc-windows-msvc | |
| os: windows-latest | |
| cef_cache_key: windows-x64 | |
| - target: x86_64-unknown-linux-gnu | |
| os: ubuntu-latest | |
| cef_cache_key: linux-x64 | |
| runs-on: ${{ matrix.os }} | |
| name: Test (${{ matrix.os }}) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| libgtk-3-dev \ | |
| libnss3-dev \ | |
| libatk1.0-dev \ | |
| libatk-bridge2.0-dev \ | |
| libcups2-dev \ | |
| libdrm-dev \ | |
| libxkbcommon-dev \ | |
| libxcomposite-dev \ | |
| libxdamage-dev \ | |
| libxrandr-dev \ | |
| libgbm-dev \ | |
| libpango1.0-dev \ | |
| libasound2-dev | |
| - name: Setup mise toolchain | |
| uses: jdx/mise-action@v2 | |
| with: | |
| cache: true | |
| - name: Install Rust target | |
| run: rustup target add ${{ matrix.target }} | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Cache Cargo registry and build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock', 'mise.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ matrix.target }}-cargo- | |
| - name: Cache CEF binaries | |
| uses: actions/cache@v4 | |
| id: cef-cache | |
| with: | |
| path: ${{ env.CEF_PATH }} | |
| key: cef-${{ hashFiles('mise.toml') }}-${{ matrix.cef_cache_key }} | |
| - name: Download CEF binaries (Linux/macOS) | |
| if: steps.cef-cache.outputs.cache-hit != 'true' && runner.os != 'Windows' | |
| shell: bash | |
| run: mise exec -- sh -c 'export-cef-dir --version "$CEF_VERSION" --force "$CEF_PATH"' | |
| - name: Download CEF binaries (Windows) | |
| if: steps.cef-cache.outputs.cache-hit != 'true' && runner.os == 'Windows' | |
| shell: pwsh | |
| run: mise exec -- pwsh -NoProfile -Command 'export-cef-dir --version $env:CEF_VERSION --force $env:CEF_PATH' | |
| - name: Run tests (Linux/macOS) | |
| shell: bash | |
| if: runner.os == 'Linux' || runner.os == 'macOS' | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: | | |
| export LD_LIBRARY_PATH="${CEF_PATH}${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | |
| export DYLD_LIBRARY_PATH="${CEF_PATH}${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}" | |
| mise exec -- cargo test --workspace --all-features | |
| - name: Run tests (Windows) | |
| shell: pwsh | |
| if: runner.os == 'Windows' | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: | | |
| $env:PATH = "${{ env.CEF_PATH }};$env:PATH" | |
| mise exec -- cargo test --workspace --all-features | |
| clippy: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: macos-latest | |
| name: macOS | |
| cef_cache_key: macos-arm64 | |
| - os: windows-latest | |
| name: Windows | |
| cef_cache_key: windows-x64 | |
| - os: ubuntu-latest | |
| name: Linux | |
| cef_cache_key: linux-x64 | |
| runs-on: ${{ matrix.os }} | |
| name: Clippy (${{ matrix.os }}) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| libgtk-3-dev \ | |
| libnss3-dev \ | |
| libatk1.0-dev \ | |
| libatk-bridge2.0-dev \ | |
| libcups2-dev \ | |
| libdrm-dev \ | |
| libxkbcommon-dev \ | |
| libxcomposite-dev \ | |
| libxdamage-dev \ | |
| libxrandr-dev \ | |
| libgbm-dev \ | |
| libpango1.0-dev \ | |
| libasound2-dev | |
| - name: Setup mise toolchain | |
| uses: jdx/mise-action@v2 | |
| with: | |
| cache: true | |
| - name: Install Clippy component | |
| run: mise exec -- rustup component add clippy | |
| - name: Setup sccache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Cache Cargo registry and build | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'mise.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Cache CEF binaries | |
| uses: actions/cache@v4 | |
| id: cef-cache | |
| with: | |
| path: ${{ env.CEF_PATH }} | |
| key: cef-${{ hashFiles('mise.toml') }}-${{ matrix.cef_cache_key }} | |
| - name: Download CEF binaries (Linux/macOS) | |
| if: steps.cef-cache.outputs.cache-hit != 'true' && runner.os != 'Windows' | |
| shell: bash | |
| run: mise exec -- sh -c 'export-cef-dir --version "$CEF_VERSION" --force "$CEF_PATH"' | |
| - name: Download CEF binaries (Windows) | |
| if: steps.cef-cache.outputs.cache-hit != 'true' && runner.os == 'Windows' | |
| shell: pwsh | |
| run: mise exec -- pwsh -NoProfile -Command 'export-cef-dir --version $env:CEF_VERSION --force $env:CEF_PATH' | |
| - name: Run Clippy | |
| env: | |
| RUSTC_WRAPPER: sccache | |
| run: mise exec -- cargo clippy --workspace --all-features -- -D warnings | |
| fmt: | |
| runs-on: ubuntu-latest | |
| name: Format | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup mise toolchain | |
| uses: jdx/mise-action@v2 | |
| with: | |
| cache: true | |
| - name: Install Rustfmt component | |
| run: mise exec -- rustup component add rustfmt | |
| - name: Check formatting | |
| run: mise exec -- cargo fmt --all -- --check |