Skip to content

Commit

Permalink
Merge pull request #523 from zeenix/windows-pkg-config-fix
Browse files Browse the repository at this point in the history
💚 CI: Install pkg-config from tpm's repo on Windows
  • Loading branch information
zeenix authored Dec 13, 2023
2 parents 7fee64f + abbd284 commit 2501444
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ jobs:
RUST_LOG: trace
ErrorActionPreference: Stop
WarningPreference: Stop
PKG_CONFIG_PATH: C:/lib/pkgconfig
PKG_CONFIG: C:\bin\pkg-config.exe
PKG_CONFIG_PATH: C:\lib\pkgconfig
DBUS_SESSION_BUS_ADDRESS: tcp:host=127.0.0.1,port=9876
TRYBUILD: overwrite # ignore ui tests
steps:
Expand All @@ -107,6 +108,7 @@ jobs:
c:/bin/xmlwf.exe
c:/bin/*dbus*
c:/lib/*dbus*
c:/bin/*pkg-config*
c:/var/lib/*dbus*
c:/lib/*glib*
c:/lib/*gio*
Expand All @@ -133,17 +135,20 @@ jobs:
c:/bin/*intl*
key: ${{ runner.os }}-cache

- name: Install pkg-config
- name: Install Meson and Ninja
if: steps.cache-deps.outputs.cache-hit != 'true'
shell: pwsh
run: |
# This is needed for some reason: https://github.com/dbus2/zbus/actions/runs/4917893488/jobs/8783555606
choco feature enable -n allowEmptyChecksums
choco install -y pkgconfiglite
run: pip3 install meson ninja

- name: Install Meson
- name: Install pkg-config
if: steps.cache-deps.outputs.cache-hit != 'true'
shell: pwsh
run: pip3 install meson
run: |
git clone --branch meson-glib-subproject --depth 1 https://gitlab.freedesktop.org/tpm/pkg-config.git
cd pkg-config
meson build -Dprefix=C:\ --buildtype release
ninja -C build
ninja -C build install
- name: Setup MSVC Environment
if: steps.cache-deps.outputs.cache-hit != 'true'
Expand Down
4 changes: 2 additions & 2 deletions zbus_macros/src/iface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ pub fn expand(args: AttributeArgs, mut input: ItemImpl) -> syn::Result<TokenStre
// * For argument type with lifetimes, we convert from `Value` (so
// `TryFrom<Value<'_>>` is required).
//
// * For all other arg types, we convert the passed value to `OwnedValue` first and
// then pass it as `Value` (so `TryFrom<OwnedValue>` is required).
// * For all other arg types, we convert the passed value to `OwnedValue` first
// and then pass it as `Value` (so `TryFrom<OwnedValue>` is required).
let value_to_owned = quote! {
match ::zbus::zvariant::Value::try_to_owned(value) {
::std::result::Result::Ok(val) => ::zbus::zvariant::Value::from(val),
Expand Down
4 changes: 2 additions & 2 deletions zvariant/src/serialized/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pub struct Inner<'bytes, 'fds> {
}

impl<'bytes, 'fds> Data<'bytes, 'fds> {
/// Create a new `EncodedBytes` instance containing borrowed file descriptors.
/// Create a new `Data` instance containing borrowed file descriptors.
///
/// This method is only available on Unix platforms.
#[cfg(unix)]
Expand Down Expand Up @@ -334,7 +334,7 @@ impl<'bytes, 'fds> Data<'bytes, 'fds> {
}

impl<'bytes> Data<'bytes, 'static> {
/// Create a new `EncodedBytes` instance.
/// Create a new `Data` instance.
pub fn new<T>(bytes: T, context: Context) -> Self
where
T: Into<Cow<'bytes, [u8]>>,
Expand Down
2 changes: 1 addition & 1 deletion zvariant/src/serialized/size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub struct Size {
}

impl Size {
/// Create a new `EncodedSize` instance.
/// Create a new `Size` instance.
pub fn new(size: usize, context: Context) -> Self {
Self {
size,
Expand Down
2 changes: 1 addition & 1 deletion zvariant/src/serialized/written.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub struct Written {
}

impl Written {
/// Create a new `EncodedSize` instance.
/// Create a new `Written` instance.
pub fn new(size: usize, context: Context) -> Self {
Self {
size,
Expand Down

0 comments on commit 2501444

Please sign in to comment.