Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use only Windows Server 2019 runners for CI in GitHub Actions #4883

Merged
merged 2 commits into from Feb 23, 2022

Conversation

chrisd8088
Copy link
Contributor

@chrisd8088 chrisd8088 commented Feb 17, 2022

The gem install ronn step in our Windows CI workflow currently fails on newer Windows Server 2022 GitHub Actions runners, due to possibly some missing C headers or libraries. The error looks like:

Building native extensions. This could take a while...

    current directory: C:/hostedtoolcache/windows/Ruby/3.0.3/x64/lib/ruby/gems/3.0.0/gems/rdiscount-2.2.0.2/ext
C:/hostedtoolcache/windows/Ruby/3.0.3/x64/bin/ruby.exe -I C:/hostedtoolcache/windows/Ruby/3.0.3/x64/lib/ruby/3.0.0 -r ./siteconf20220217-1960-zhwi49.rb extconf.rb
checking for random()... no
checking for srandom()... no
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options.

Ideally we would continue to use the windows-latest runners and adjust the step which runs the now-deprecated actions/setup-ruby@v1 action so that it runs ruby/setup-ruby@v1 instead, as recommended.

However, doing so introduces a set of problems whereby a different Bash shell is used and our PATH environment variable settings are not respected, the result being that when our tests run git lfs the system default Git LFS binary is found by Git and executed instead of the newly-built git-lfs.exe which we want to test, leading to many test failures.

So, for the time being, we resort to fixing our Windows CI and release runners to use Windows Server 2019, until the problems can be sorted out upstream.

Also, because the .github/workflows/ci.yml file only needs to be readable, not executable, we revise its file permissions.

/cc actions/runner-images#5100
/cc ruby/setup-ruby#293

The .github/workflows/ci.yml file only need to be readable,
not executable, so we revise its file permissions.
@chrisd8088 chrisd8088 requested a review from a team as a code owner February 17, 2022 21:33
@chrisd8088 chrisd8088 changed the title Actions windows 2019 Use only Windows Server 2019 runners for CI in GitHub Actions Feb 17, 2022
The "gem install ronn" step in our Windows CI workflow currently
fails on newer Windows Server 2022 GitHub Actions runners, due to
possibly some missing C headers or libraries.

Ideally we would continue to use the "windows-latest" runners and
adjust the step which runs the now-deprecated "actions/setup-ruby"
action so that it runs "ruby/setup-ruby" instead.  However, doing
so introduces a set of problems whereby a different Bash shell is
used and our PATH environment variable settings are not respected,
the result being that when our tests run "git lfs" the system
default Git LFS binary is found by Git and executed instead of the
newly-built git-lfs.exe which we want to test, leading to many
failures.

So, for the time being, we resort to fixing our Windows CI and
release runners to use Windows Server 2019, until the problems can be
sorted out upstream.
@chrisd8088 chrisd8088 merged commit 4ac53df into git-lfs:main Feb 23, 2022
@chrisd8088 chrisd8088 deleted the actions-windows-2019 branch February 23, 2022 16:15
bk2204 pushed a commit that referenced this pull request Apr 19, 2022
Use only Windows Server 2019 runners for CI in GitHub Actions
chrisd8088 added a commit to chrisd8088/git-lfs that referenced this pull request May 7, 2022
In commit f4ab4e7 of PR git-lfs#4883 we
noted that the "gem install ronn" step in our Windows CI workflows
currently fails on newer Windows Server 2022 GitHub Actions runners,
due to possibly some missing C headers or libraries.

While this could be resolved by upgrading to the "ruby/setup-ruby"
action from the deprecated "actions/setup-ruby" one, that introduced a
series of issues with PATH lookups as documented in ruby/setup-ruby#293.

We therefore chose to continue using Windows 2019 runners until a
resolution or workaround was found.

Fortunately, as of commit 912b607
in PR git-lfs#4992 we are now using the ronn-ng Ruby gem instead of the
unmaintained ronn gem, and the "gem install ronn-ng" workflow step
succeeds on Windows 2022 while still using the "actions/setup-ruby"
action to install a Ruby build environment.  This allows us to
upgrade to the latest Windows runners in GitHub Actions, although
we can't yet upgrade to the "ruby/setup-ruby" workflow action.

h/t to @bk2204 for finding ronn-ng!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants