From c6bf8bad58f26526d2e8f1cc71f007b464f8de63 Mon Sep 17 00:00:00 2001 From: R4SAS Date: Wed, 8 Mar 2023 12:25:09 +0000 Subject: [PATCH] [gha] msvc build Signed-off-by: R4SAS --- .github/workflows/build-windows-msvc.yml | 45 ++++++++++++++++++++++++ .github/workflows/build-windows.yml | 6 ++-- 2 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/build-windows-msvc.yml diff --git a/.github/workflows/build-windows-msvc.yml b/.github/workflows/build-windows-msvc.yml new file mode 100644 index 00000000..6a8f4c67 --- /dev/null +++ b/.github/workflows/build-windows-msvc.yml @@ -0,0 +1,45 @@ +name: Build on Windows + +on: [push, pull_request] + +jobs: + build: + name: CMake MSVC + runs-on: windows-2019 + + strategy: + fail-fast: false + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Build and install zlib + run: powershell -Command "(Invoke-WebRequest -Uri https://git.io/JnHTY -OutFile install_zlib.bat)"; ./install_zlib.bat; del install_zlib.bat + + - name: Install boost + uses: MarkusJx/install-boost@v2.4.4 + id: install-boost + with: + boost_version: 1.81.0 + boost_install_dir: C:\boost + platform_version: 2019 + toolset: msvc + link: static + + - name: Build application + run: | + cd build + cmake -DWITH_STATIC=ON . + cmake --build . --config Debug -- -m + env: + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} + + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: i2pd-msvc.zip + path: build/Debug/i2pd.* + diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 7a9a40c7..66c846c1 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -8,7 +8,7 @@ defaults: jobs: build: - name: Building using ${{ matrix.arch }} toolchain + name: ${{ matrix.arch }} runs-on: windows-latest strategy: @@ -50,7 +50,7 @@ jobs: path: i2pd.exe build-cmake: - name: Building using ${{ matrix.arch }} toolchain using CMake + name: CMake ${{ matrix.arch }} runs-on: windows-latest strategy: @@ -89,7 +89,7 @@ jobs: path: build/i2pd.exe build-xp: - name: Building for Windows XP + name: XP runs-on: windows-latest strategy: