From c747dc71845b2b25a7af6e63e0fe85dbfc903a7d Mon Sep 17 00:00:00 2001 From: Jef Driesen Date: Tue, 18 May 2021 22:01:54 +0200 Subject: [PATCH] Add a CI job to build with Visual Studio The migration to Visual Studio 2013 allows to build the Visual Studio project in a Github Action. Because some of the source files (e.g. the resource script and version header) are normally auto-generated by the autotools build system, an msys environment is setup to run the configure script. When building from a distribution tarball, this extra step isn't necessary. --- .github/workflows/build.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8610ffc..161c2f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -122,3 +122,33 @@ jobs: with: name: ${{ github.job }}-${{ matrix.arch }} path: ${{ github.job }}-${{ matrix.arch }}.tar.gz + + msvc: + + name: Visual Studio + + runs-on: windows-latest + + strategy: + fail-fast: false + matrix: + platform: [x86, x64] + + env: + CONFIGURATION: Release + + steps: + - uses: actions/checkout@v2 + - uses: msys2/setup-msys2@v2 + with: + install: autoconf automake libtool pkg-config make gcc + - run: | + autoreconf --install --force + ./configure --prefix=/usr + shell: msys2 {0} + - uses: microsoft/setup-msbuild@v1.0.2 + - run: msbuild -m -p:Platform=${{ matrix.platform }} -p:Configuration=${{ env.CONFIGURATION }} msvc/libdivecomputer.vcxproj + - uses: actions/upload-artifact@v2 + with: + name: ${{ github.job }}-${{ matrix.platform }} + path: msvc/${{ matrix.platform }}/${{ env.CONFIGURATION }}/bin