Compare commits

...

4 Commits

Author SHA1 Message Date
Ferdinand Schober
b316af6a8f fix vs-version 2026-08-31 10:51:17 +02:00
Ferdinand Schober
d09a574380 tell gvsbuild to target newer VisualStudio version 2026-08-31 10:44:58 +02:00
Ferdinand Schober
b115208aad fix clippy lint 2026-08-31 10:34:02 +02:00
Ty Smith
392af44cbe fix(ci): bust stale Homebrew glib cache on macOS runners
The Swatinem/rust-cache action was restored before brew installed the
native dependencies. When Homebrew updated glib (2.88.0 → newer) the
cached Rust build artifacts still referenced the old versioned Cellar
path (/opt/homebrew/Cellar/glib/2.88.0/lib), causing a linker failure:

    ld: library 'gio-2.0' not found

Fix by:
1. Moving `brew install` before the rust-cache step so libs are current
   before the cache is consulted.
2. Capturing `brew list --versions glib gtk4 libadwaita` into a
   prefix-key so the cache key changes whenever those packages update,
   forcing a clean Rust build with fresh pkg-config paths.

Linux and Windows cache behaviour is unchanged (MACOS_LIB_VER unset →
empty prefix-key → same default v0- prefix).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-28 16:22:39 +02:00
3 changed files with 11 additions and 5 deletions

View File

@@ -105,7 +105,7 @@ jobs:
# see https://github.com/wingtk/gvsbuild/pull/1004
Move-Item "C:\Program Files\Git\usr\bin" "C:\Program Files\Git\usr\notbin"
Move-Item "C:\Program Files\Git\bin" "C:\Program Files\Git\notbin"
gvsbuild build --msys-dir=C:\msys64 gtk4 libadwaita librsvg
gvsbuild build --vs-ver=vs2026 --msys-dir=C:\msys64 gtk4 libadwaita librsvg
Move-Item "C:\Program Files\Git\usr\notbin" "C:\Program Files\Git\usr\bin"
Move-Item "C:\Program Files\Git\notbin" "C:\Program Files\Git\bin"
- uses: actions/checkout@v6

View File

@@ -40,7 +40,6 @@ jobs:
- test
steps:
- uses: actions/checkout@v6
- uses: Swatinem/rust-cache@v2
- name: Install Linux deps
if: runner.os == 'Linux'
run: |
@@ -49,6 +48,13 @@ jobs:
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: brew install gtk4 libadwaita imagemagick
- name: Record macOS native lib versions for cache key
if: runner.os == 'macOS'
run: |
echo "MACOS_LIB_VER=$(brew list --versions glib gtk4 libadwaita | tr '\n' '_')" >> "$GITHUB_ENV"
- uses: Swatinem/rust-cache@v2
with:
prefix-key: ${{ env.MACOS_LIB_VER }}
- name: Install Windows Dependencies - create gtk dir
if: runner.os == 'Windows'
run: mkdir C:\gtk-build\gtk\x64\release
@@ -77,7 +83,7 @@ jobs:
py -m venv .venv
.venv\Scripts\activate.ps1
py -m pip install gvsbuild
gvsbuild build --msys-dir=C:\msys64 gtk4 libadwaita librsvg
gvsbuild build --vs-ver=vs2026 --msys-dir=C:\msys64 gtk4 libadwaita librsvg
- name: cargo build
if: matrix.job == 'build'
run: cargo build

View File

@@ -518,7 +518,7 @@ impl Config {
}
pub fn read_from_disk(&mut self) -> Result<bool, io::Error> {
log::info!("reading config from {:?}", &self.config_path);
log::info!("reading config from {:?}", self.config_path);
let current_config = fs::read_to_string(&self.config_path)?;
let current_config = match current_config.parse::<DocumentMut>() {
@@ -548,7 +548,7 @@ impl Config {
}
pub fn write_back(&mut self) -> Result<(), io::Error> {
log::info!("writing config to {:?}", &self.config_path);
log::info!("writing config to {:?}", self.config_path);
/* the new config */
let new_config = self.config_toml.clone().unwrap_or_default();
let new_config = toml_edit::ser::to_string_pretty(&new_config).expect("config");