Skip to content

Commit

Permalink
fix(ci): don't release unnecessary cmake objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Xenapte committed Feb 5, 2025
1 parent f495d95 commit b6fd24e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ jobs:

- name: Run post-build actions
working-directory: ${{github.workspace}}/build/BallanceMMOClient
run: rm BallanceMMOClient.exp, BallanceMMOClient.lib
run: |
mkdir ${{env.BUILD_TYPE}}
Get-ChildItem -Path . -Include *.dll, *.bmod* -Recurse | Copy-Item -Destination ${{env.BUILD_TYPE}} -Force
- name: Test
working-directory: ${{github.workspace}}
Expand All @@ -111,7 +113,7 @@ jobs:
echo "`n#define BMMO_WITH_PLAYER_SPECTATION" | Out-File "BallanceMMOClient/bml_includes.h" -Encoding "UTF8" -Append
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
cd ${{github.workspace}}/build/BallanceMMOClient
rm BallanceMMOClient.exp, BallanceMMOClient.lib
Get-ChildItem -Path . -Include *.dll, *.bmod* -Recurse | Copy-Item -Destination ${{env.BUILD_TYPE}} -Force
- name: Release artifact
uses: actions/upload-artifact@v4
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ jobs:
run: ctest -C ${{env.BUILD_TYPE}}

# by setting a different working directory we avoid releasing the config file
- name: Dry run
working-directory: ${{github.workspace}}/build
run: BallanceMMOServer/BallanceMMOServer.exe --dry-run
- name: Dry run and prepare for release
working-directory: ${{github.workspace}}/build/BallanceMMOServer
run: |
.\BallanceMMOServer.exe --dry-run
Copy-Item -Path *.dll, *.exe -Destination ${{env.BUILD_TYPE}} -Force
- name: Release Artifact
uses: actions/upload-artifact@v4
Expand Down
4 changes: 2 additions & 2 deletions BallanceMMOClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ target_include_directories(BallanceMMOClient-BMLPlus PRIVATE
${REPLXX_INCLUDE_DIR}
${ASIO_INCLUDE_DIR}
${GNS_EXT_INCLUDE_DIR})
target_link_directories(BallanceMMOClient PRIVATE
target_link_directories(BallanceMMOClient-BMLPlus PRIVATE
${BMLPLUS_LIB_DIR})
target_link_libraries(BallanceMMOClient-BMLPlus PRIVATE
replxx
Expand Down Expand Up @@ -157,4 +157,4 @@ foreach (LIB IN ITEMS BallanceMMOClient BallanceMMOClient-BMLPlus)
$<$<C_COMPILER_ID:MSVC>:_CRT_SECURE_NO_WARNINGS>
$<$<C_COMPILER_ID:MSVC>:_CRT_NONSTDC_NO_WARNINGS>
)
endforeach ()
endforeach ()

0 comments on commit b6fd24e

Please sign in to comment.