fix: msvc build

build: switch to msvc. too much hassle with meson & windows cross-build
This commit is contained in:
dmitry 2021-09-14 16:17:16 +03:00
commit 5563168800
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37
2 changed files with 39 additions and 10 deletions

View file

@ -12,7 +12,7 @@ on:
types: [published] types: [published]
jobs: jobs:
builds: unix:
strategy: strategy:
matrix: matrix:
include: include:
@ -20,10 +20,6 @@ jobs:
bin: yapb.so bin: yapb.so
opts: CXX=gcc-11 CXX_LD=gold meson setup build opts: CXX=gcc-11 CXX_LD=gold meson setup build
- name: windows-x86
bin: yapb.dll
opts: meson setup build --cross-file=x86-windows
- name: macos-x86 - name: macos-x86
bin: yapb.dylib bin: yapb.dylib
opts: meson setup build --cross-file=x86-darwin opts: meson setup build --cross-file=x86-darwin
@ -54,8 +50,41 @@ jobs:
name: ${{ matrix.bin }} name: ${{ matrix.bin }}
path: build/${{ matrix.bin }} path: build/${{ matrix.bin }}
linux-aarch64: windows:
name: linux-aarch64 name: windows-x86
runs-on: windows-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Setup MSBuild
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Setup Meson
run: |
python -m pip install --upgrade meson ninja
- name: Configure Build
run: |
meson setup build
- name: Compile Source
run: |
meson compile -v -C build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: yapb.dll
path: build/yapb.dll
linux-arm64:
name: linux-arm64
runs-on: self-hosted runs-on: self-hosted
continue-on-error: true continue-on-error: true
@ -88,7 +117,7 @@ jobs:
name: publish name: publish
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: [builds] needs: [unix, windows, linux-arm64]
steps: steps:
- name: Checkout Repository - name: Checkout Repository

View file

@ -233,7 +233,7 @@
<ProgramDataBaseFileName>.\release\inf\</ProgramDataBaseFileName> <ProgramDataBaseFileName>.\release\inf\</ProgramDataBaseFileName>
<WarningLevel>Level4</WarningLevel> <WarningLevel>Level4</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <DebugInformationFormat>None</DebugInformationFormat>
<CompileAs>CompileAsCpp</CompileAs> <CompileAs>CompileAsCpp</CompileAs>
<InterproceduralOptimization>MultiFile</InterproceduralOptimization> <InterproceduralOptimization>MultiFile</InterproceduralOptimization>
<FlushDenormalResultsToZero>true</FlushDenormalResultsToZero> <FlushDenormalResultsToZero>true</FlushDenormalResultsToZero>
@ -268,7 +268,7 @@
<OutputFile>.\release\yapb.dll</OutputFile> <OutputFile>.\release\yapb.dll</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner> <SuppressStartupBanner>true</SuppressStartupBanner>
<DelayLoadDLLs>user32.dll;ws2_32.dll;%(DelayLoadDLLs)</DelayLoadDLLs> <DelayLoadDLLs>user32.dll;ws2_32.dll;%(DelayLoadDLLs)</DelayLoadDLLs>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>false</GenerateDebugInformation>
<GenerateMapFile>false</GenerateMapFile> <GenerateMapFile>false</GenerateMapFile>
<SubSystem>Windows</SubSystem> <SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>