Skip to content
wxWidgets - Cross-Platform GUI Library
Stop Russia agression of Ukraine
Stop the War in Ukraine

wxWidgets is united with the people of Ukraine and the international community.

GitHub Action for Projects Using MSVC

Posted on

There is a new GitHub action for setting up wxWidgets in projects built with MSVC using the officially recommended way, i.e. by importing the wxwidgets.props file.

If your project does this, its workflow on GitHub Actions simply needs to add

      - name: Set up wxWidgets
        uses: wxWidgets/setup-wxwidgets-msvc@v1
        with:
          ref: v3.3.4

to its job and then it can just use

      - name: Set up MSBuild
        uses: microsoft/setup-msbuild@v3

      - name: Build
        run: |
          msbuild -noLogo -maxCpuCount `
            -property:Configuration=Release -property:Platform=x64 `
            MyProject.sln

to build the project itself.

See the action README for more information about the other possible inputs (notably toolset which should be set if the project doesn’t use the default one for the image), but the above is enough for many cases and takes care of building wxWidgets and, importantly, caching it for the subsequent builds, so that it won’t be rebuilt every time the application is built.

Comments

Blog Archive