Andreas Maerten affa94b98c feat(Actions): only trigger on changes that matter (#2752)
* feat(Actions): only trigger on changes that matter

* feat(Actions): include ci.yml to path trigger

* feat(Actions): cancel action if a new commit comes in

* feat(Actions): cancel last nightly if a new request comes in
2024-02-22 09:34:41 +01:00

50 lines
1.1 KiB
YAML

name: CI
on:
pull_request:
paths:
- src/**
- cmake/**
- CMakeLists.txt
- .github/workflows/ci.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ci:
runs-on: [self-hosted, Windows]
name: CI
steps:
- uses: actions/checkout@v3
- name: Check CMake version
run: cmake --version
- name: Setup MSVC environment
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Generate CMake project
run: cmake -D CMAKE_BUILD_TYPE=Release -S. -Bbuild -G Ninja
- name: Build 64bit release DLL
run: cmake --build ./build --config Release --target YimMenu --
- name: Check if DLL got built
run: if (-Not (Test-Path -path "build/YimMenu.dll")) {throw 1}
- name: Rename DLL to YimMenu-dev-{GITHUB_SHA}.dll
run: |
del YimMenu-dev-*.dll
ren YimMenu.dll YimMenu-dev-${{github.sha}}.dll
working-directory: build/
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: binary
path: build/YimMenu-dev-*.dll