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

GitHub Actions: add Windows builds #5377

Merged
merged 11 commits into from
Mar 2, 2021

Conversation

dyfer
Copy link
Member

@dyfer dyfer commented Mar 1, 2021

Purpose and Motivation

Further implementation of #5261

This PR adds Windows guilds to our GHA

Notes, particularly highlighting differences with our AppVeyor builds:

  • we use chocolatey to install libsndfile
    • FindSndfile.cmake needed to be updated to include different search paths
    • we are effectively using a newer version of the library, I think
    • this is arguably cleaner than the way we installed libsndfile in appveyor :)
  • both 32- and 64-bit builds use Qt 5.15.2
  • added /Zc:__cplusplus switch for MSVC (thanks @brianlheim and @jrsurge !)
  • fftw and ASIO for portaudio are installed manually, as before
  • installer creation is triggered for tagged builds only
  • build artifacts (non-installer zip) are uploaded to s3
  • both the installer and the non-installer zip is uploaded to GH release
    • I personally wanted to have this, in order to be able to try new release without installing it/replacing the currently installed version
    • this is easily configurable and I can change it if desired
  • I added MinGW build
    • I've made the matrix configurable so one can easily define builds using both MSVC and MinGW
    • We wouldn't use these builds for releases
      • this is just a proposition that would allow us to test if MinGW build works
      • MinGW version is built without QtWebEngine and LinkClock modules
    • currently MinGW takes the longest time to build (approx 24 min, compared to approx 18 min for the regular Win64 build)
    • I guess we could add ccache to it? I haven't tried though
    • If we don't want it for now, I'd leave the entry commented out, so that it's clear how to set it up in the future
  • s3 uploads are named differently from before for Windows, but consistently with macOS builds:
    • https://.../supercollider/win32/SC-<SHA>.zip
    • https://.../supercollider/win64/SC-<SHA>.zip
  • I separated the release deployment job, since calling it multiple times created multiple releases sometimes. Also I think it makes the conditionals a little clearer.
  • This is more of an observation - installer's name is specified in CMake, not in GHA. I haven't changed this, the installer is passed to the release with the name it is created with (SuperCollider-<SCVersion>_<BuildType>-<arch>-VS-<ShortSHA>.exe), i.e. tag name is not used in the installer's name (SCVersion is taken from SCVersion.txt).

Here is the action from the tagged commit in this PR, and the accompanying release with uploaded artifacts (the release is missing win64 zip but it was a simple typo that I've since corrected).

Since I've touched s3 deployment as well, here's the action running on this branch pushed to the main repo - s3 upload seems to work.

Types of changes

  • New feature

To-do list

  • Code is tested
  • All tests are passing
  • Updated documentation
  • This PR is ready for review

dyfer and others added 3 commits February 28, 2021 19:28
for libsndfile installed using chocolatey
in newer releases, the dll is actually called sndfile.dll, not
libsndfile.dll.
@dyfer dyfer added the comp: CI/CD continuous integration and deployment (github actions, etc.) label Mar 1, 2021
@dyfer dyfer mentioned this pull request Mar 1, 2021
4 tasks
@dyfer dyfer force-pushed the topic/gha-add-windows-build branch 4 times, most recently from 743c330 to c40f11f Compare March 1, 2021 08:19
@dyfer dyfer marked this pull request as ready for review March 1, 2021 08:19
@dyfer dyfer marked this pull request as draft March 1, 2021 08:19
@dyfer dyfer force-pushed the topic/gha-add-windows-build branch 5 times, most recently from 5d7cbde to 8250a0c Compare March 1, 2021 19:38
@dyfer dyfer marked this pull request as ready for review March 1, 2021 20:54
@dyfer dyfer requested a review from mossheim March 1, 2021 20:54
Copy link
Contributor

@mossheim mossheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

i am fine having the MinGW build, and thank you for adding it, but i also don't want it to become a maintenance burden since we do not use it for releases. so, my thinking is we can merge it now and if issues crop up, we can remove it later. it's good to know it builds. what is the problem with Ableton Link?

this workflow file is getting quite long -- i left some notes for environment variables that can probably be eliminated, but i may also take a closer look at this on my own later after we've merged this. in general, i don't think it's a good pattern to have env vars specified for values which are only used once, it makes the build steps harder to follow because of the additional indirection. if we start using them in more places, IMO that would be the appropriate time to consider factoring them out.

.github/workflows/actions.yml Outdated Show resolved Hide resolved
.github/workflows/actions.yml Outdated Show resolved Hide resolved
.github/workflows/actions.yml Show resolved Hide resolved
cmake --build $BUILD_PATH --config Release --target installer
- name: upload installer
uses: actions/upload-artifact@v2
if: env.CREATE_INSTALLER == 'true'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you can also replace this with if: matrix.create-installer == 'true', right?

.github/workflows/actions.yml Outdated Show resolved Hide resolved
shell: bash
run: |
mv $FFTW_PATH "C:/Program Files/fftw"
echo "Done installing fftw"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think you can remove this echo since the feedback in the actions dashboard is pretty clear

.github/workflows/actions.yml Outdated Show resolved Hide resolved
CMakeLists.txt Show resolved Hide resolved
@dyfer
Copy link
Member Author

dyfer commented Mar 2, 2021

i am fine having the MinGW build, and thank you for adding it, but i also don't want it to become a maintenance burden since we do not use it for releases. so, my thinking is we can merge it now and if issues crop up, we can remove it later.

I'd be happy with that.

what is the problem with Ableton Link?

it didn't build successfully the last time I checked :) not sure what the problem is/was

EDIT: testing LinkClock build now: yup, still failing, I'll remove it again for now

@dyfer dyfer force-pushed the topic/gha-add-windows-build branch from 5205d84 to 6a2a8c3 Compare March 2, 2021 01:11
Copy link
Contributor

@mossheim mossheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for testing out MinGW+Link! just two small things

.github/workflows/actions.yml Outdated Show resolved Hide resolved
.github/workflows/actions.yml Outdated Show resolved Hide resolved
@mossheim
Copy link
Contributor

mossheim commented Mar 2, 2021

the mingw build failure with Link was because they (maybe I should say we now?) used to add an MSVC compiler flag on windows regardless of which compiler was being used. Updating the link submodule to v3.0.3 allowed the build to complete successfully: https://github.com/supercollider/supercollider/runs/2015368139. I think we should consider doing this for 3.12.0.

@dyfer dyfer force-pushed the topic/gha-add-windows-build branch from b069656 to ad1be6a Compare March 2, 2021 19:02
Copy link
Contributor

@mossheim mossheim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!!

@mossheim mossheim merged commit 7ff5faf into supercollider:develop Mar 2, 2021
@dyfer dyfer deleted the topic/gha-add-windows-build branch March 2, 2021 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: CI/CD continuous integration and deployment (github actions, etc.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants