2021-06-07 00:25:24 +01:00
|
|
|
name: Windows CI
|
|
|
|
on:
|
2021-11-04 20:00:26 +00:00
|
|
|
pull_request:
|
|
|
|
push:
|
2024-05-20 12:20:48 +01:00
|
|
|
release:
|
|
|
|
types:
|
|
|
|
- published
|
2021-11-04 20:00:26 +00:00
|
|
|
schedule:
|
|
|
|
- cron: '0 0 * * 0'
|
2021-06-07 00:25:24 +01:00
|
|
|
jobs:
|
|
|
|
build:
|
2022-01-15 16:37:02 +00:00
|
|
|
if: "!contains(github.event.head_commit.message, '[skip windows ci]')"
|
2022-02-21 15:31:35 +00:00
|
|
|
runs-on: windows-2019
|
2021-06-07 00:25:24 +01:00
|
|
|
steps:
|
2023-10-01 15:42:25 +01:00
|
|
|
- uses: actions/checkout@v4
|
2021-06-07 00:25:24 +01:00
|
|
|
|
|
|
|
- name: Setup MSBuild
|
2024-02-01 13:28:56 +00:00
|
|
|
uses: microsoft/setup-msbuild@v2.0.0
|
2023-07-22 08:38:08 +01:00
|
|
|
with:
|
|
|
|
msbuild-architecture: x64
|
2021-06-07 00:25:24 +01:00
|
|
|
|
|
|
|
- name: Setup Conan
|
2023-02-01 13:02:23 +00:00
|
|
|
uses: turtlebrowser/get-conan@v1.2
|
2023-02-22 18:46:02 +00:00
|
|
|
with:
|
2024-12-23 15:21:37 +00:00
|
|
|
version: 1.66.0
|
2021-06-07 00:25:24 +01:00
|
|
|
|
|
|
|
- name: Install libraries
|
|
|
|
working-directory: ${{ github.workspace }}/win/build
|
|
|
|
run: |
|
2022-04-24 17:21:49 +01:00
|
|
|
(Get-Content ../conanfile.txt).replace('##', '') | Set-Content ../conanfile.txt
|
2022-02-20 15:59:57 +00:00
|
|
|
conan install .. --build=missing
|
2021-06-07 00:25:24 +01:00
|
|
|
|
|
|
|
- name: Run CMake
|
|
|
|
working-directory: ${{ github.workspace }}/win/build
|
2023-07-22 08:54:52 +01:00
|
|
|
env:
|
|
|
|
LDFLAGS: /DEBUG:FASTLINK /INCREMENTAL
|
2021-06-07 00:25:24 +01:00
|
|
|
run: |
|
2024-05-20 12:20:48 +01:00
|
|
|
cmake -A x64 -D CMAKE_BUILD_TYPE=${{ github.event_name == 'release' && 'Release' || 'Debug' }} -G "Visual Studio 16 2019" -Wdev ..
|
2021-06-07 00:25:24 +01:00
|
|
|
|
|
|
|
- name: Build InspIRCd
|
|
|
|
working-directory: ${{ github.workspace }}/win/build
|
|
|
|
run: |
|
2024-05-20 12:20:48 +01:00
|
|
|
msbuild PACKAGE.vcxproj /M:3 /P:Configuration=${{ github.event_name == 'release' && 'Release' || 'Debug' }} /P:Platform=x64 /VERBOSITY:MINIMAL
|
|
|
|
|
|
|
|
- name: Upload installer
|
|
|
|
if: "${{ github.event_name == 'release' }}"
|
|
|
|
working-directory: ${{ github.workspace }}/win/build
|
|
|
|
env:
|
|
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
gh release upload ${{ github.event.release.tag_name }} $(Get-ChildItem InspIRCd-*.exe)
|