Skip to content

Commit d206f5d

Browse files
add vcpkg workflow to linux and macos
1 parent cfea929 commit d206f5d

2 files changed

Lines changed: 62 additions & 3 deletions

File tree

.github/workflows/job-cmakebuild-linux.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ on:
1010
type: string
1111
default: 'net8.0'
1212

13+
env:
14+
USERNAME: mathewbensoncode
15+
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
16+
FEED_URL: https://nuget.pkg.github.com/mathewbensoncode/index.json
17+
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/mathewbensoncode/index.json,readwrite"
18+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
19+
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
20+
1321
jobs:
1422
Linux-Build:
1523
name: cmake-build-linux-${{ inputs.configuration }}
@@ -35,7 +43,29 @@ jobs:
3543
run: sudo apt-get update
3644

3745
- name: Install Dependencies
38-
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-22 glslang-tools libwayland-dev libxkbcommon-dev
46+
run: sudo apt-get install libasound2-dev libgl1-mesa-dev libpulse-dev libdbus-1-dev libx11-dev libxcursor-dev libxext-dev libxi-dev libxinerama-dev libxrandr-dev libxss-dev libxt-dev libxxf86vm-dev cmake apt-transport-https software-properties-common gcc g++ powershell clang-format-22 libxkbcommon-dev mono-complete
47+
48+
- name: Install vcpkg
49+
shell: pwsh
50+
run: git clone https://github.com/Microsoft/vcpkg ${{github.workspace}}/vcpkg
51+
52+
- name: Bootstrap vcpkg
53+
shell: sh
54+
run: ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh
55+
56+
- name: Add NuGet sources
57+
shell: pwsh
58+
run: |
59+
.$(${{ env.VCPKG_EXE }} fetch nuget) `
60+
sources add `
61+
-Source "${{ env.FEED_URL }}" `
62+
-StorePasswordInClearText `
63+
-Name GitHubPackages `
64+
-UserName "${{ env.USERNAME }}" `
65+
-Password "${{ secrets.GITHUB_TOKEN }}"
66+
.$(${{ env.VCPKG_EXE }} fetch nuget) `
67+
setapikey "${{ secrets.GITHUB_TOKEN }}" `
68+
-Source "${{ env.FEED_URL }}"
3969
4070
- name: CMake Build
4171
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}}

.github/workflows/job-cmakebuild-macOS.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ on:
1515
type: string
1616
default: 'x64'
1717

18+
env:
19+
USERNAME: mathewbensoncode
20+
VCPKG_EXE: ${{ github.workspace }}/vcpkg/vcpkg
21+
FEED_URL: https://nuget.pkg.github.com/mathewbensoncode/index.json
22+
VCPKG_BINARY_SOURCES: "clear;nuget,https://nuget.pkg.github.com/mathewbensoncode/index.json,readwrite"
23+
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
24+
CMAKE_TOOLCHAIN_FILE: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake
25+
1826
jobs:
1927
cmake-build:
2028
name: cmake-build-macOS-${{ inputs.architecture }}-${{ inputs.configuration }}
@@ -29,8 +37,29 @@ jobs:
2937
- name: Update LLVM
3038
run: brew install llvm
3139

32-
- name: Install Dependencies
33-
run: brew install vulkan-headers vulkan-loader assimp spirv-headers spirv-tools spirv-cross glslang glfw glew yaml-cpp spdlog googletest
40+
- name: Install vcpkg
41+
shell: pwsh
42+
run: git clone https://github.com/Microsoft/vcpkg ${{github.workspace}}/vcpkg
43+
44+
- name: Bootstrap vcpkg
45+
shell: sh
46+
run: |
47+
${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh
48+
${{ env.VCPKG_EXE }} integrate xcode
49+
50+
- name: Add NuGet sources
51+
shell: pwsh
52+
run: |
53+
.$(${{ env.VCPKG_EXE }} fetch nuget) `
54+
sources add `
55+
-Source "${{ env.FEED_URL }}" `
56+
-StorePasswordInClearText `
57+
-Name GitHubPackages `
58+
-UserName "${{ env.USERNAME }}" `
59+
-Password "${{ secrets.GITHUB_TOKEN }}"
60+
.$(${{ env.VCPKG_EXE }} fetch nuget) `
61+
setapikey "${{ secrets.GITHUB_TOKEN }}" `
62+
-Source "${{ env.FEED_URL }}"
3463
3564
- name: CMake Build
3665
run: .\Scripts\BuildEngine.ps1 -Configurations ${{inputs.configuration}} -Architecture ${{inputs.architecture}} -RunClangFormat 0

0 commit comments

Comments
 (0)