Associated GitHub Community ticket: https://github.community/t/github-actions-fails-after-a-month-of-inactivity/130926
The customer has a workflow (see here), it could work in July, but now, after a month of inactivity, the same workflow fails and returns the following error (see here):
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
In file included from ./cross_apis_r/example.cpp:1:0:
./cross_apis_r/cross.h:3:20: warning: extra tokens at end of #ifdef directive
#ifdef __MINGW32__ || _WIN32
^~
In file included from ./cross_apis_r/example.cpp:1:0:
./cross_apis_r/cross.h:11:14: fatal error: gtk/gtk.h: No such file or directory
I noticed that there are some updates have been made in the GitHub-hosted virtual environments in the recent month.
Whether this error is related to these recent updates?
Hi @caelwithcats @BrightRan!
There were a lot of updates in the past two months but it's not related to the issue. Install packages step actually failed due to outdated apt-get data(Unable to fetch some archives) so you need to add these lines to https://github.com/caelwithcats/cross-lib/blob/master/cross_apis_r/packages.sh and everything works just fine after that
if [ $actionsBuild == "true" ]
then
sudo apt-get update
sudo apt-get -y install libgtk-3-dev mingw-w64 g++ gcc build-essential libx11-dev
else
sudo apt-get update
sudo apt-get install mingw-w64 g++ gcc build-essential libx11-dev
fi
another good idea is to addset -e at the beginning of the bash script to catch such kind of errors.
@miketimofeev ,
Thanks for your quick answer.
I tested as your suggestion, yes, the workflow works now.
However, I'm curious that why the workflow worked in the past, although we omitted the line "sudo apt-get update".
@BrightRan it's not obligatory to run sudo apt-get update every time, but package indexes become outdated from time to time and thus point to outdated links so it's always a good idea to refresh this cache before running apt-get install.
A bit off topic but why does username12 keep appearing in my commits:

@caelwithcats don't know, I see me there because I've forked your repo to test the solution

@miketimofeev but your username isn't username12
@caelwithcats I'm going to close this issue since the root cause is resolved. Please create another GitHub Community ticket if you need support with the contributors list.
Thank you!