Skip to content

Apply extra workaround for ubuntu #515

Apply extra workaround for ubuntu

Apply extra workaround for ubuntu #515

name: Windows MSVC Build
on:
push:
pull_request:
env:
VCPKG_COMMIT_ID: '21bbb14c4113b89cd06402e852e075341722304f'
buildDir: '${{ github.workspace }}/build/'
outDir: '${{ github.workspace }}/artifact/'
jobs:
build:
strategy:
matrix:
env: [
#{bits: 32, arch_installed: x86, build_type: Debug, arch_name: x86, arch: x86},
{bits: 64, arch_installed: x64, build_type: Debug, arch_name: x86, arch: amd64},
#{bits: 64, arch_installed: x64, build_type: Debug, arch_name: ARM, arch: amd64_arm64},
{bits: 32, arch_installed: x86, build_type: Release, arch_name: x86, arch: x86},
{bits: 64, arch_installed: x64, build_type: Release, arch_name: x86, arch: amd64},
#{bits: 64, arch_installed: x64, build_type: Release, arch_name: ARM, arch: amd64_arm64}
]
name: ${{matrix.env.build_type}} ${{matrix.env.arch_name}} ${{matrix.env.bits}} bits
env:
VCPKG_DEFAULT_TRIPLET: ${{matrix.env.arch}}-windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: lukka/get-cmake@latest
- name: Restore artifacts, or run vcpkg, build (and cache artifacts as post step)
uses: lukka/run-vcpkg@v10
id: runvcpkg
with:
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
appendedCacheKey: '${{ env.VCPKG_DEFAULT_TRIPLET }}'
vcpkgGitCommitId: '${{ env.VCPKG_COMMIT_ID }}'
vcpkgJsonGlob: 'vcpkg.json'
runVcpkgInstall: false
- name: Configure developer command prompt
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{matrix.env.arch}}
- name: Run cmake to install the dependencies specified in the vcpkg.json, generate project file
run: |
mkdir ${{ env.buildDir }}
cd ${{ env.buildDir }}
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=${{matrix.env.build_type}} -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake ..
- name: Build the project
run: |
cd ${{ env.buildDir }}
nmake
- name: Prepare artifact folder
run: |
mkdir ${{ env.outDir }}
copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/ogg.dll ${{ env.outDir }}
copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/vorbis.dll ${{ env.outDir }}
copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/vorbisfile.dll ${{ env.outDir }}
copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/swscale-*.dll ${{ env.outDir }}
copy ${{ env.buildDir }}vcpkg_installed/${{matrix.env.arch_installed}}-windows/bin/swresample-*.dll ${{ env.outDir }}
copy ${{ env.buildDir }}Source/*.dll ${{ env.outDir }}
copy ${{ env.buildDir }}Source/*.exe ${{ env.outDir }}
copy ${{ env.buildDir }}Source/*.pdb ${{ env.outDir }}
- uses: actions/upload-artifact@v3
with:
name: Perimeter MSVC ${{matrix.env.build_type}} ${{matrix.env.arch_name}} ${{matrix.env.bits}} bits
path: ${{ env.outDir }}