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.
This commit is contained in:
Jef Driesen 2021-05-18 22:01:54 +02:00
parent 9307acbe4a
commit c747dc7184

View File

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