Skip to content

Commit

Permalink
added github build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hakasapl committed Jan 2, 2025
1 parent 13463d0 commit 67277ec
Show file tree
Hide file tree
Showing 10 changed files with 54 additions and 6 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build and Publish Artifacts

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
runs-on: windows-latest

steps:
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- name: Configure CMake
run: |
cmake --preset=build-release-msvc
- name: Build and Install
run: |
cd build
cmake --build --config release-msvc
- name: Prepare artifacts folder
run: |
New-Item -ItemType Directory -Path "artifacts/SKSE/Plugins" -Force
Copy-Item -Recurse -Force build/release-msvc/SkyrimTerrainSlotUnlocker.dll artifacts/SKSE/Plugins/
- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: skyrimterrainslotunlocker-artifacts-${{ github.sha }}
path: artifacts
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ add_subdirectory("extern/commonlibsse" commonlibsse)
add_subdirectory("extern/CLibUtil" CLibUtil)
include_directories("extern/CLibUtil/include")

# detours
include_directories("extern/detours")

set(headers
"include/PCH.h"
"include/BSLSMLandscapeExtended.hpp"
Expand All @@ -58,7 +61,8 @@ target_link_libraries(
"${PROJECT_NAME}"
PRIVATE
CommonLibSSE::CommonLibSSE
${CMAKE_SOURCE_DIR}/include/detours/Debug/detours.lib
debug ${CMAKE_SOURCE_DIR}/extern/detours/detours/Debug/detours.lib
optimized ${CMAKE_SOURCE_DIR}/extern/detours/detours/Release/detours.lib
)

# When your SKSE .dll is compiled, this will automatically copy the .dll into your mods folder.
Expand Down
10 changes: 5 additions & 5 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
{
"name": "base",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "$env{COMMONLIBSSE_COMPILER} $env{COMMONLIBSSE_PLATFORM} $env{COMMONLIBSSE_TEXT}",
"CMAKE_EXPORT_COMPILE_COMMANDS": "TRUE"
}
"cacheVariables": {
"CMAKE_CXX_FLAGS": "$env{COMMONLIBSSE_COMPILER} $env{COMMONLIBSSE_PLATFORM} $env{COMMONLIBSSE_TEXT}",
"CMAKE_EXPORT_COMPILE_COMMANDS": "TRUE"
}
},
{
"name": "vcpkg",
Expand Down Expand Up @@ -51,7 +51,7 @@
{
"name": "msvc",
"hidden": true,
"cacheVariables":
"cacheVariables":
{
"CMAKE_CXX_COMPILER": "cl.exe"
},
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 67277ec

Please sign in to comment.