Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build
on:
workflow_dispatch:
push:
pull_request:
types: [opened]

jobs:
build:
strategy:
matrix:
config: ["Release", "Debug"]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
with:
arch: amd64_x86
- name: build
shell: bash
run: |
mkdir build upload
touch upload/.a-workaround-to-avoid-being-flattened
cd build
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.config }}
project_name=$(grep '^CMAKE_PROJECT_NAME:STATIC=' CMakeCache.txt | cut -d = -f 2-)
config=${{ matrix.config }}
echo "ARTIFACT_NAME=${project_name}_${config,,}" >> ${GITHUB_ENV}
echo "PROJECT_NAME=${project_name}" >> ${GITHUB_ENV}
cmake --build .
cmake --install . --prefix "../artifact/${project_name}"
- name: Upload the ${{ matrix.config }} binary
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
artifact/${{ env.PROJECT_NAME }}
artifact/.a-workaround-to-avoid-being-flattened
!artifact/.a-workaround-to-avoid-being-flattened
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,10 @@ target_link_libraries(
d3d9
d3dx9
)

# binary
install(TARGETS "${PROJECT_NAME}" DESTINATION .)
# PDB file
install(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}> DESTINATION . OPTIONAL)
# license and other common files
install(FILES LICENSE DESTINATION .)