Build libvconsole and CS2RemoteConsole-client #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build libvconsole and CS2RemoteConsole-client | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'libvconsole/**' | |
- 'CS2RemoteConsole-client/**' | |
pull_request: | |
branches: [ main ] | |
paths: | |
- 'libvconsole/**' | |
- 'CS2RemoteConsole-client/**' | |
workflow_dispatch: | |
jobs: | |
build-libvconsole: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Set up Visual Studio shell | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: Build libvconsole | |
run: | | |
cd libvconsole | |
msbuild libvconsole.vcxproj /p:Configuration=Release /p:Platform=x64 | |
- name: Upload libvconsole artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: libvconsole-build | |
path: | | |
libvconsole/x64/Release/libvconsole.lib | |
libvconsole/src/messages.h | |
libvconsole/src/vconsole.h | |
build-cs2remoteconsole-client: | |
needs: build-libvconsole | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Set up Visual Studio shell | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: Download libvconsole artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: libvconsole-build | |
path: libvconsole-build | |
- name: Display structure of downloaded files | |
run: | | |
echo "Content of libvconsole-build:" | |
dir /s libvconsole-build | |
shell: cmd | |
- name: Prepare libvconsole for CS2RemoteConsole-client | |
run: | | |
if not exist "CS2RemoteConsole-client\lib" mkdir "CS2RemoteConsole-client\lib" | |
if not exist "CS2RemoteConsole-client\include" mkdir "CS2RemoteConsole-client\include" | |
copy "libvconsole-build\x64\Release\libvconsole.lib" "CS2RemoteConsole-client\lib\" | |
copy "libvconsole-build\src\messages.h" "CS2RemoteConsole-client\include\" | |
copy "libvconsole-build\src\vconsole.h" "CS2RemoteConsole-client\include\" | |
shell: cmd | |
- name: Verify copied files | |
run: | | |
echo "Verifying lib file:" | |
dir "CS2RemoteConsole-client\lib" | |
echo "Verifying header files:" | |
dir "CS2RemoteConsole-client\include" | |
shell: cmd | |
- name: Build CS2RemoteConsole-client | |
run: | | |
cd CS2RemoteConsole-client | |
msbuild CS2RemoteConsole-client.vcxproj /p:Configuration=Release /p:Platform=x64 | |
- name: Prepare artifact directory | |
run: | | |
mkdir artifact | |
copy "CS2RemoteConsole-client\x64\Release\CS2RemoteConsole-client.exe" "artifact\" | |
copy "CS2RemoteConsole-client\config.ini" "artifact\" | |
shell: cmd | |
- name: Verify artifact contents | |
run: | | |
echo "Verifying artifact contents:" | |
dir artifact | |
shell: cmd | |
- name: Upload CS2RemoteConsole-client artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: CS2RemoteConsole-client-build | |
path: artifact |