Skip to content

Commit

Permalink
Use self-hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
Foereaper committed Aug 12, 2024
1 parent 6bf3d51 commit ea4876f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
40 changes: 19 additions & 21 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
linux-build:
runs-on: ubuntu-22.04
runs-on: [self-hosted, linux]

strategy:
fail-fast: false
Expand All @@ -16,39 +16,37 @@ jobs:
submodules: false
repository: novusengine/Game

- name: Setup premake
uses: abel0b/[email protected]
with:
version: "5.0.0-beta1"
# - name: Setup premake
# uses: abel0b/[email protected]
# with:
# version: "5.0.0-beta1"

- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -yq clang libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libvulkan-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100
# - name: Install dependencies
# run: |
# sudo apt-get update && sudo apt-get install -yq clang libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libvulkan-dev
# sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 100

- name: Install Vulkan SDK
run: |
wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt update
sudo apt install vulkan-sdk
# - name: Install Vulkan SDK
# run: |
# wget -qO- https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo tee /etc/apt/trusted.gpg.d/lunarg.asc
# sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list http://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
# sudo apt update
# sudo apt install vulkan-sdk

- name: Checkout submodules
run: |
git submodule update --init --recursive
- name: Copy dxcompiler library to system
run: |
sudo cp /home/runner/work/Game/Game/Submodules/Engine/Dependencies/dxcompiler/lib/linux/libdxcompiler.so /usr/local/lib
# - name: Copy dxcompiler library to system
# run: |
# sudo cp /home/runner/work/Game/Game/Submodules/Engine/Dependencies/dxcompiler/lib/linux/libdxcompiler.so /usr/local/lib

- name: Run Premake
run: |
export VULKAN_SDK=/usr/include/vulkan
export LD_LIBRARY_PATH=/home/runner/work/Game/Game/Submodules/Engine/Dependencies/dxcompiler/lib/linux:$LD_LIBRARY_PATH
premake5 gmake2
- name: Build
run: |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
sudo ldconfig /usr/local/lib
cd Build
make -j 4 -k
2 changes: 1 addition & 1 deletion .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
win-build:
runs-on: self-hosted
runs-on: [self-hosted, windows]

strategy:
fail-fast: false
Expand Down
6 changes: 5 additions & 1 deletion Premake/ProjectUtil.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ local function PrintError(msg)
end

local callerName = debugInfo.name
error("[" .. callerName .. "]" .. " : " .. msg, 2)
if callerName == nil then
error(": " .. msg, 2)
else
error("[" .. callerName .. "]" .. " : " .. msg, 2)
end
end

--[[ DumpObject(object, [limit], [indent]) Recursively print arbitrary data.
Expand Down

0 comments on commit ea4876f

Please sign in to comment.