Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

CI: add a simple github action #2

Merged
merged 2 commits into from
Nov 3, 2020
Merged

Conversation

bilelmoussaoui
Copy link
Member

Let's see if this builds fine

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/ci branch 10 times, most recently from f206892 to 20aef87 Compare October 24, 2020 13:51
@bilelmoussaoui
Copy link
Member Author

The tests fails in a very weird way. It complains about a missing header gio/gdesktopappinfo.h. The header is provided by glib2-devel per dnf provides */gdesktopappinfo.h which is installed... I'm a bit confused.

@GuillaumeGomez any idea?

@bilelmoussaoui
Copy link
Member Author

Ah it actually fails locally as well. Weird

@sdroege
Copy link
Member

sdroege commented Oct 24, 2020

You need to use the gio-unix-2.0 pkg-config package for getting the right includes to find that (and other) headers.

GuillaumeGomez added a commit that referenced this pull request Oct 28, 2020
@GuillaumeGomez GuillaumeGomez changed the base branch from ongoing to master October 28, 2020 09:15
@GuillaumeGomez GuillaumeGomez force-pushed the bilelmoussaoui/ci branch 2 times, most recently from a4ceb81 to 7d1abb6 Compare October 30, 2020 10:46
@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/ci branch 4 times, most recently from 2efed3e to 6d1e263 Compare October 30, 2020 13:44
@sdroege
Copy link
Member

sdroege commented Nov 2, 2020

Now only fails with the following:

<command-line>: error: invalid application of ‘sizeof’ to incomplete type ‘GSettingsBackend’ {aka ‘struct _GSettingsBackend’}
tests/layout.c:10:31: note: in expansion of macro ‘ABI_TYPE_NAME’
   10 |     printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME));
      |                               ^~~~~~~~~~~~~
<command-line>: error: invalid application of ‘__alignof__’ to incomplete type ‘GSettingsBackend’ {aka ‘struct _GSettingsBackend’}
tests/layout.c:10:55: note: in expansion of macro ‘ABI_TYPE_NAME’
   10 |     printf("%zu\n%zu", sizeof(ABI_TYPE_NAME), alignof(ABI_TYPE_NAME));
      |                                                       ^~~~~~~~~~~~~
tests/layout.c: In function ‘main’:
<command-line>: error: ‘GSettingsBackendClass’ undeclared (first use in this function); did you mean ‘GSettingsBackend’?
<command-line>: note: in definition of macro ‘ABI_TYPE_NAME’
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
<command-line>: note: in definition of macro ‘ABI_TYPE_NAME’
test cross_validate_layout_with_c ... FAILED
tests/constant.c: In function ‘main’:
<command-line>: error: ‘G_SETTINGS_BACKEND_EXTENSION_POINT_NAME’ undeclared (first use in this function); did you mean ‘G_TLS_BACKEND_EXTENSION_POINT_NAME’?
<command-line>: note: in definition of macro ‘ABI_CONSTANT_NAME’
<command-line>: note: each undeclared identifier is reported only once for each function it appears in
<command-line>: note: in definition of macro ‘ABI_CONSTANT_NAME’

This is a bug in gio: nothing includes <gio/gsettingsbackend.h>, and that's also not easy to include because of

#error "You must define G_SETTINGS_ENABLE_BACKEND before including <gio/gsettingsbackend.h>."

@sdroege
Copy link
Member

sdroege commented Nov 2, 2020

@GuillaumeGomez
Copy link
Member

Once we're done with this, a big squash will be welcome. :)

@sdroege
Copy link
Member

sdroege commented Nov 3, 2020

You accidentally reverted db778f3, that's why the CI fails now. For this to stay around we need to fix gir.

@sdroege
Copy link
Member

sdroege commented Nov 3, 2020

Added it back now so we can see if everything passes now at least.

Can you create an issue for this problem in gir?

Also gtk-rs/gir#979 is another issue that currently has changes to autogenerated code. We should clean those two up ASAP.

@sdroege
Copy link
Member

sdroege commented Nov 3, 2020

Still fails because

compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-pthread" "-I/usr/include/gio-unix-2.0" "-I/usr/include/libmount" "-I/usr/include/blkid" "-I/usr/include/glib-2.0" "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include" "-DABI_CONSTANT_NAME=G_SETTINGS_BACKEND_EXTENSION_POINT_NAME" "tests/constant.c" "-o" "/tmp/abil2IMTc/constant" failed, exit code: 1
compilation command "cc" "-Wno-deprecated-declarations" "-D__USE_MINGW_ANSI_STDIO" "-pthread" "-I/usr/include/gio-unix-2.0" "-I/usr/include/libmount" "-I/usr/include/blkid" "-I/usr/include/glib-2.0" "-I/usr/lib/x86_64-linux-gnu/glib-2.0/include" "-DABI_TYPE_NAME=GSettingsBackendClass" "tests/layout.c" "-o" "/tmp/abiTlYfoq/layout" failed, exit code: 1

That constant and the class struct need to be ignored separately in -sys mode. @bilelmoussaoui you update that?

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/ci branch 6 times, most recently from 64ce23d to e06fe4e Compare November 3, 2020 14:31
@bilelmoussaoui
Copy link
Member Author

It seems there's an issue with cairo_gobject_extend_get_type as --all-features enables the use_glib feature on cairo I guess? I've included libcairo-gobject but that doesn't seem to help.

@bilelmoussaoui bilelmoussaoui force-pushed the bilelmoussaoui/ci branch 13 times, most recently from f581111 to 6257592 Compare November 3, 2020 16:57
@bilelmoussaoui
Copy link
Member Author

This should pass this time :) I have disabled the -sys tests for the problematic ones & added them to the CI issue, I will try to tackle those as soon as I can.

@GuillaumeGomez
Copy link
Member

It passed! \o/ If it's ok for you, I think we can merge.

@bilelmoussaoui
Copy link
Member Author

All good, go ahead o/

@GuillaumeGomez
Copy link
Member

Thanks!

@GuillaumeGomez GuillaumeGomez merged commit 584b990 into master Nov 3, 2020
@GuillaumeGomez GuillaumeGomez deleted the bilelmoussaoui/ci branch November 3, 2020 18:47
@sdroege
Copy link
Member

sdroege commented Nov 3, 2020

@bilelmoussaoui Can you create an issue for the gio-sys pkg-config problem for gir, so we can solve it properly? :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants