Skip to content

Update release.yml #132

Update release.yml

Update release.yml #132

name: Build PC Client
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: windows-2022
timeout-minutes: 90
env:
WORKFLOW_BUILD_TYPE: Release
WORKFLOW_VULKAN_DIR: D:/a/Teleport/Teleport/VULKAN_SDK
VULKAN_SDK: D:/a/Teleport/Teleport/VULKAN_SDK
VULKAN_SDK_DIR: D:/a/Teleport/Teleport/VULKAN_SDK
steps:
- name: Checkout
uses: actions/checkout@v4
with:
lfs: 'true'
submodules: 'false'
- name: Git Submodules
run: |
cd ${{github.workspace}}
git submodule update --init --recursive --force -- "firstparty/Platform" "thirdparty/draco" "thirdparty/basis_universal" "thirdparty/libdatachannel" "libavstream/thirdparty/curl" "libavstream/thirdparty/efp" "thirdparty/websocketpp" "thirdparty/flecs"
cd ${{github.workspace}}/thirdparty/libdatachannel
- name: Log
shell: cmd
run: |
echo|set /p=TELEPORT_COMMIT=>teleport_commit.properties
git rev-parse --short HEAD>>teleport_commit.properties
echo GITHUB_ENV $GITHUB_ENV
echo "TELEPORT_COMMIT=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
git log -10 --date=format:"%%a %%d %%b" --no-merges --pretty=format:"%%cd : %%s" > "teleport_log.md"
- name: Dotenv Action
uses: falti/[email protected]
with:
path: teleport_commit.properties
log-variables: true
export-variables: true
- name: Vulkan
uses: humbletim/[email protected]
with:
version: 1.3.290.0
- name: Add to PATH
shell: pwsh
run: |
echo $VULKAN_SDK_DIR/Bin | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
echo ${{github.workspace}}/Bin/Release | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Initial Checks
run: cmake --version;
echo $VULKAN_SDK_DIR;
echo $VULKAN_SDK;
echo TELEPORT_COMMIT ${{env.TELEPORT_COMMIT}};
echo VULKAN_SDK_DIR ${{env.VULKAN_SDK_DIR}};
echo VULKAN_SDK ${{env.VULKAN_SDK}};
echo GITHUB_PATH ${{env.GITHUB_PATH}};
dir ${{env.WORKFLOW_VULKAN_DIR}};
dir D:/a/Teleport/Teleport/client/Shaders/link.sfx
- name: Running cmake (windows)
run: |
cd ${{ github.workspace }}
mkdir build_pc_client
cd build_pc_client
cmake -S .. -B . -WNo-dev -DLIBAV_USE_CUDA=false -DPLATFORM_USE_ASSIMP=false -DPLATFORM_BUILD_ASSIMP=false -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DTELEPORT_SOLUTION_NAME=TeleportClient -DVULKAN_SDK=${{env.WORKFLOW_VULKAN_DIR}} -DVULKAN_SDK_DIR=${{env.WORKFLOW_VULKAN_DIR}} -DVulkan_LIBRARY=${{env.WORKFLOW_VULKAN_DIR}}/Lib/vulkan-1.lib -DVulkan_INCLUDE_DIR=${{env.WORKFLOW_VULKAN_DIR}}/Include -DVulkan_GLSLANG_VALIDATOR_EXECUTABLE=${{env.WORKFLOW_VULKAN_DIR}}/Bin/glslangvalidator.exe -DVulkan_GLSLC_EXECUTABLE=${{env.WORKFLOW_VULKAN_DIR}}/Bin/glslc.exe -DCMAKE_BUILD_TYPE=Release -DENABLE_ENCRYPTION=false -DPLATFORM_SUPPORT_OPENGL=false -DPLATFORM_SUPPORT_VULKAN=true -DPLATFORM_SUPPORT_D3D11=false -DPLATFORM_SUPPORT_D3D12=false -DSIMUL_BUILD_SAMPLES=false -DPLATFORM_BUILD_SAMPLES=false -DPLATFORM_BUILD_MD_LIBS=false -DTELEPORT_CLIENT_USE_D3D12=false -DTELEPORT_CLIENT_USE_VULKAN=true -DSIMUL_DEBUG_SHADERS=false
# once more, now we can get a solution name.
cmake -S .. -B . -WNo-dev -DPLATFORM_USE_ASSIMP=false -DPLATFORM_BUILD_ASSIMP=false -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DTELEPORT_SOLUTION_NAME=TeleportClient -DVULKAN_SDK=${{env.WORKFLOW_VULKAN_DIR}} -DVULKAN_SDK_DIR=${{env.WORKFLOW_VULKAN_DIR}} -DVulkan_LIBRARY=${{env.WORKFLOW_VULKAN_DIR}}/Lib/vulkan-1.lib -DVulkan_INCLUDE_DIR=${{env.WORKFLOW_VULKAN_DIR}}/Include -DVulkan_GLSLANG_VALIDATOR_EXECUTABLE=${{env.WORKFLOW_VULKAN_DIR}}/Bin/glslangvalidator.exe -DVulkan_GLSLC_EXECUTABLE=${{env.WORKFLOW_VULKAN_DIR}}/Bin/glslc.exe -DCMAKE_BUILD_TYPE=Release -DENABLE_ENCRYPTION=false -DPLATFORM_SUPPORT_OPENGL=false -DPLATFORM_SUPPORT_VULKAN=true -DPLATFORM_SUPPORT_D3D11=false -DPLATFORM_SUPPORT_D3D12=false -DSIMUL_BUILD_SAMPLES=false -DPLATFORM_BUILD_SAMPLES=false -DPLATFORM_BUILD_MD_LIBS=false -DTELEPORT_CLIENT_USE_D3D12=false -DTELEPORT_CLIENT_USE_VULKAN=true -DSIMUL_DEBUG_SHADERS=false
- name: Show CMake Output
run: |
gc ${{github.workspace}}/build_pc_client/ClientRender/ClientRender.vcxproj
- name: Setup MSBuild.exe with new add-path
uses: Dana-Prajea/[email protected]
- name: Build
shell: cmd
# Build your program with the given configuration
run: rem cmake --build ${{github.workspace}}/build_pc_client --config ${{env.WORKFLOW_BUILD_TYPE}}
# continue-on-error: true
- name: MSB
shell: cmd
# continue-on-error: true
run: |
MSBuild ${{github.workspace}}/build_pc_client/Teleport_Client.sln /m:1 /p:Configuration=Release /p:Platform=x64 /t:Client\TeleportPCClient
- name: Test
working-directory: ${{github.workspace}}/build_pc_client
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.WORKFLOW_BUILD_TYPE}}
- name: Installer
run: |
cd build_pc_client
CPack -C CPackConfig.cmake
- uses: actions/[email protected]
with:
name: installer
path: ${{github.workspace}}/build_pc_client/TeleportClientInstaller-${{env.TELEPORT_COMMIT}}-x64.exe
github-token: ${{secrets.TELEPORT_RELEASES_TOKEN}}
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
release:
runs-on: windows-2022
needs: build
timeout-minutes: 20
env:
VULKAN_SDK_DIR: D:/a/Teleport/Teleport/VULKAN_SDK
steps:
- name: Download a Build Artifact
uses: actions/[email protected]
with:
github-token: ${{secrets.TELEPORT_RELEASES_TOKEN}}
# Name of the artifact to download. If unspecified, all artifacts for the run are downloaded.
name: installer
# Destination path. Supports basic tilde expansion. Defaults to $GITHUB_WORKSPACE
path: installer
- name: Check
run: |
ls -R installer