From 0fa258bc143865730ca0aac2253f469b91cf865b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mika=C3=ABl=20Capelle?= Date: Sun, 2 Jun 2024 16:01:30 +0200 Subject: [PATCH] Tentative Github action. --- .github/workflows/build.yml | 63 +++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..09fb2a9 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,63 @@ +name: Build USVFS + +on: + push: + branches: master + pull_request: + types: [opened, synchronize, reopened] + +env: + BOOST_PREBUILT_URL: "https://github.com/ModOrganizer2/mob/releases/download/2.5-dependencies/boost_prebuilt_1_85_0.7z" + +jobs: + build-x64: + name: Build USVFS x64 + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Fetch Boost prebuilt + run: | + Invoke-WebRequest -Uri ${env:BOOST_PREBUILT_URL} -OutFile boost.7z + Expand-7ZipArchive -Path boost.7z -Destination .\boost + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + - name: Build x64 + run: | + msbuild -nologo ` + -maxCpuCount "-property:UseMultiToolTask=true" "-property:EnforceProcessCountAcrossBuilds=true" ` + "-property:Configuration=Release" ` + "-property:PlatformToolset=v143" ` + "-property:WindowsTargetPlatformVersion=10.0.22621.0" ` + "-property:Platform=x64" ` + "-property:BOOST_PATH=..\boost" ` + "-property:RunCodeAnalysis=false" ` + .\vsbuild\usvfs.sln + + build-x86: + name: Build USVFS x86 + runs-on: windows-2022 + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Fetch Boost prebuilt + run: | + Invoke-WebRequest -Uri ${env:BOOST_PREBUILT_URL} -OutFile boost.7z + Expand-7ZipArchive -Path boost.7z -Destination .\boost + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + with: + msbuild-architecture: x86 + - name: Build x86 + run: | + msbuild -nologo ` + -maxCpuCount "-property:UseMultiToolTask=true" "-property:EnforceProcessCountAcrossBuilds=true" ` + "-property:Configuration=Release" ` + "-property:PlatformToolset=v143" ` + "-property:WindowsTargetPlatformVersion=10.0.22621.0" ` + "-property:Platform=x86" ` + "-property:BOOST_PATH=..\boost" ` + "-property:RunCodeAnalysis=false" ` + .\vsbuild\usvfs.sln