Skip to content

Commit

Permalink
Add linux job to github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikewando committed Jan 16, 2023
1 parent f501b78 commit 9ecbcad
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 52 deletions.
91 changes: 91 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: Build

on:
push:
branches:
- master

jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup premake
uses: abel0b/setup-premake@v2.2
with:
version: 5.0.0-beta2
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.2
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Run premake
run: premake5 vs2022
- name: Build
run: msbuild /m /p:Configuration=Dist IVTCDN.sln
- name: Copy imgui.ini
run: cp example/imgui.ini bin/Dist-windows-x86_64/IVTCDN/imgui.ini
- name: Upload
uses: actions/upload-artifact@v3
with:
name: IVTCDN-windows
path: |
bin/Dist-windows-x86_64/IVTCDN/IVTCDN.exe
bin/Dist-windows-x86_64/IVTCDN/imgui.ini
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup premake
uses: abel0b/setup-premake@v2.2
with:
version: 5.0.0-beta2
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libglfw3-dev mesa-vulkan-drivers vulkan-tools cython3
- name: Install VapourSynth
run: |
git clone https://github.com/vapoursynth/vapoursynth --depth 1
pushd vapoursynth
git clone https://github.com/sekrit-twc/zimg --branch v3.0 --depth 1
pushd zimg
./autogen.sh
./configure --prefix=/usr
make -j2
sudo make install -j2
popd
rm -rf zimg
./autogen.sh
./configure --prefix=/usr
make -j2
sudo make install -j2
popd
rm -rf vapoursynth
- name: Prepare Vulkan SDK
uses: humbletim/setup-vulkan-sdk@v1.2.0
with:
vulkan-query-version: latest
vulkan-components: Vulkan-Headers, Vulkan-Loader
vulkan-use-cache: true
- name: Run premake
run: premake5 gmake2
- name: Build
run: make config=dist
- name: Copy imgui.ini
run: cp example/imgui.ini bin/Dist-linux-x86_64/IVTCDN/imgui.ini
- name: Upload
uses: actions/upload-artifact@v3
with:
name: IVTCDN-linux
path: |
bin/Dist-linux-x86_64/IVTCDN/IVTCDN
bin/Dist-linux-x86_64/IVTCDN/imgui.ini
40 changes: 0 additions & 40 deletions .github/workflows/windows.yml

This file was deleted.

2 changes: 1 addition & 1 deletion WalnutApp/premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ project "IVTCDN"
links { "%{LibraryDir.vapoursynth}/vapoursynth.lib", "%{LibraryDir.vapoursynth}/vsscript.lib" }
end
if os.istarget("linux") then
links { "vapoursynth", "vapoursynth-script" }
links { "vulkan", "vapoursynth", "vapoursynth-script" }
end

targetdir ("../bin/" .. outputdir .. "/%{prj.name}")
Expand Down
11 changes: 0 additions & 11 deletions WalnutExternal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@ group "Dependencies"
linux_dpkg_check_if_package_is_installed("libvulkan-dev")
linux_dpkg_check_if_package_is_installed("mesa-vulkan-drivers")
linux_dpkg_check_if_package_is_installed("vulkan-tools")
vulkaninfo_dir = os.pathsearch("vulkaninfo", os.getenv("PATH"))
if not vulkaninfo_dir then
premake.warn("vulkaninfo not found. Be sure that Vulkan works.")
else
vulkaninfo = vulkaninfo_dir .. "/vulkaninfo"
local result, errorCode = os.outputof(vulkaninfo)
if errorCode ~= 0 or string.find(result, "ERROR") then
premake.error(vulkaninfo .. " reported an ERROR, please check")
end
premake.info(vulkaninfo .. " did not show an error, good.")
end
else
-- For other operating systems, build GLFW in the cloned git submodule:
include "vendor/GLFW"
Expand Down

0 comments on commit 9ecbcad

Please sign in to comment.