diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 473817f..9b2b248 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -84,20 +84,29 @@ jobs: echo "/usr/lib/llvm-20/bin" >> "$GITHUB_PATH" rustup target add x86_64-pc-windows-msvc pipx install cargo-xwin + echo "CARGO_XWIN_VERSION=$(cargo xwin --version | awk '{print $NF}')" >> "$GITHUB_ENV" - name: Cache CEF + id: cache-cef uses: actions/cache@v6.1.0 with: path: ~/.local/share/cef key: cef-cross-windows-${{ hashFiles('Cargo.toml') }} + # Like the native jobs, export the distribution ahead of the build so the cache + # holds only the extracted files and not the downloaded archive as well. + - name: Export CEF + if: steps.cache-cef.outputs.cache-hit != 'true' + run: cargo run -p export-cef-dir -- --target x86_64-pc-windows-msvc "$HOME/.local/share/cef" + # Only the SDK itself: cargo-xwin symlinks `clang-cl` to the `clang` found on PATH - # next to it, and that must be recreated for the toolchain installed above. + # next to it, and that must be recreated for the toolchain installed above. The + # SDK and CRT versions come from the cargo-xwin release, so key on it. - name: Cache Windows SDK uses: actions/cache@v6.1.0 with: path: ~/.cache/cargo-xwin/xwin - key: cargo-xwin-sdk-${{ runner.os }} + key: cargo-xwin-sdk-${{ runner.os }}-${{ env.CARGO_XWIN_VERSION }} - name: Build run: CEF_PATH="$HOME/.local/share/cef" cargo xwin build -p cefsimple --target x86_64-pc-windows-msvc --verbose diff --git a/Cargo.toml b/Cargo.toml index 35d2dc8..7d0405a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,7 +31,7 @@ anyhow = "1" ash = "0.38" bindgen = "0.72" cargo_metadata = "0.23.1" -cc = "1" +cc = "1.2.8" clap = { version = "4", features = ["derive"] } cmake = "0.1.52" convert_case = "0.11"