Virtual-environments: Workflow fails after a month of inactivity

Created on 7 Sep 2020  路  7Comments  路  Source: actions/virtual-environments

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?

Ubuntu question

All 7 comments

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:
username12

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

@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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Tnze picture Tnze  路  4Comments

jayaddison picture jayaddison  路  3Comments

ydnar picture ydnar  路  3Comments

adamsiembida picture adamsiembida  路  3Comments

ethomson picture ethomson  路  4Comments