2022-03-04 18:12:49 +02:00
|
|
|
name: CI
|
|
|
|
|
2024-02-22 09:34:41 +01:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- src/**
|
|
|
|
- cmake/**
|
|
|
|
- CMakeLists.txt
|
|
|
|
- .github/workflows/ci.yml
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-03-04 18:12:49 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
ci:
|
2023-07-18 13:25:09 +02:00
|
|
|
runs-on: [self-hosted, Windows]
|
2022-03-04 18:12:49 +02:00
|
|
|
name: CI
|
|
|
|
steps:
|
2022-11-11 12:34:32 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-03-04 18:12:49 +02:00
|
|
|
|
2022-11-08 21:08:58 +00:00
|
|
|
- name: Check CMake version
|
|
|
|
run: cmake --version
|
2022-03-04 18:12:49 +02:00
|
|
|
|
2023-02-01 19:49:12 +01:00
|
|
|
- name: Setup MSVC environment
|
|
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
|
|
with:
|
|
|
|
arch: amd64
|
|
|
|
|
2022-11-08 21:08:58 +00:00
|
|
|
- name: Generate CMake project
|
2024-05-09 15:26:01 +02:00
|
|
|
run: cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo -D OPTIMIZE=YES -S. -Bbuild -G Ninja
|
2022-03-04 18:12:49 +02:00
|
|
|
|
|
|
|
- name: Build 64bit release DLL
|
2024-05-09 15:26:01 +02:00
|
|
|
run: cmake --build ./build --config RelWithDebInfo --target YimMenu --
|
2022-03-04 18:12:49 +02:00
|
|
|
|
|
|
|
- name: Check if DLL got built
|
2023-02-01 19:49:12 +01:00
|
|
|
run: if (-Not (Test-Path -path "build/YimMenu.dll")) {throw 1}
|
2022-07-15 19:13:09 +03:00
|
|
|
|
|
|
|
- name: Rename DLL to YimMenu-dev-{GITHUB_SHA}.dll
|
2022-11-11 12:34:32 +02:00
|
|
|
run: |
|
2022-11-12 19:52:26 +02:00
|
|
|
del YimMenu-dev-*.dll
|
2024-05-09 15:26:01 +02:00
|
|
|
del YimMenu-dev-*.pdb
|
2022-11-11 12:34:32 +02:00
|
|
|
ren YimMenu.dll YimMenu-dev-${{github.sha}}.dll
|
2024-05-09 15:26:01 +02:00
|
|
|
ren YimMenu.pdb YimMenu.pdb
|
2023-02-01 19:49:12 +01:00
|
|
|
working-directory: build/
|
2022-07-15 19:13:09 +03:00
|
|
|
|
2024-05-09 15:26:01 +02:00
|
|
|
- name: Upload Artifact (dll)
|
2022-07-15 19:13:09 +03:00
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: binary
|
2024-05-09 15:26:01 +02:00
|
|
|
path: |
|
|
|
|
build/YimMenu-dev-*.dll
|
|
|
|
- name: Upload Artifact (pdb)
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: pdb
|
|
|
|
path: |
|
|
|
|
build/YimMenu.pdb
|