-
Notifications
You must be signed in to change notification settings - Fork 1
133 lines (112 loc) · 4.46 KB
/
build-artifacts.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
name: build-artifacts
on:
workflow_dispatch:
jobs:
build-swiftshader:
strategy:
matrix:
os: [windows-2022, ubuntu-20.04, macOS-12]
include:
- os: windows-2022
swiftshaderLibName: vk_swiftshader.dll
- os: ubuntu-20.04
swiftshaderLibName: libvk_swiftshader.so
- os: macOS-12
swiftshaderLibName: libvk_swiftshader.dylib
name: 'swiftshader-${{ matrix.os }}'
runs-on: ${{ matrix.os }}
steps:
- name: Set up environment variables
shell: bash
run: |
echo "ARTIFACT_NAME=swiftshader-${{ matrix.os }}-x64" >> $GITHUB_ENV
if [[ "${{ runner.os }}" == "Windows" ]]; then
echo "BUILD_SUBDIR=Windows" >> $GITHUB_ENV
elif [[ "${{ runner.os }}" == "Linux" ]]; then
echo "BUILD_SUBDIR=Linux" >> $GITHUB_ENV
elif [[ "${{ runner.os }}" == "macOS" ]]; then
echo "BUILD_SUBDIR=Darwin" >> $GITHUB_ENV
fi
- name: Checkout Swiftshader
uses: actions/checkout@v4
with:
repository: NcStudios/swiftshader
ref: 'release'
path: 'Swiftshader'
submodules: 'recursive'
- name: Build Swiftshader
shell: bash
run: |
cmake -S Swiftshader -B Swiftshader/build_out -DCMAKE_BUILD_TYPE=Release
cmake --build Swiftshader/build_out --target vk_swiftshader --config Release --parallel 4
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: |
Swiftshader/build_out/${{ env.BUILD_SUBDIR }}/${{ matrix.swiftshaderLibName }}
Swiftshader/LICENSE.txt
build-sdk:
strategy:
matrix:
os: [windows-2022, ubuntu-20.04, macOS-12]
sdkTag: ['vulkan-sdk-1.3.283.0', 'vulkan-sdk-1.3.280.0', 'vulkan-sdk-1.3.275.0', 'sdk-1.3.261.1']
name: '${{ matrix.sdkTag }}-${{ matrix.os }}'
runs-on: ${{ matrix.os }}
steps:
- name: Set up MSVC
if: ${{ runner.os == 'Windows' }}
uses: ilammy/msvc-dev-cmd@v1
- name: Install dependencies
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install -y xorg-dev libwayland-dev
- name: Set up environment variables
shell: bash
run: |
SDK_VERSION=$(echo "${{ matrix.sdkTag }}" | sed -E 's/[^0-9]*([0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?).*/\1/')
echo "ARTIFACT_NAME=vulkanCI-$SDK_VERSION-${{ matrix.os }}-x64" >> $GITHUB_ENV
ROOT_PATH='${{ github.workspace }}'
echo "SDK_PATH=${ROOT_PATH//\\//}/VulkanSDK/$SDK_VERSION" >> $GITHUB_ENV
- name: Checkout Vulkan-Headers
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Headers
ref: '${{ matrix.sdkTag }}'
path: 'Vulkan-Headers'
- name: Build Vulkan-Headers
shell: bash
run: |
cmake -S Vulkan-Headers -B Vulkan-Headers/build
cmake --install Vulkan-Headers/build --prefix ${{ env.SDK_PATH }}
- name: Checkout Vulkan-Loader
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-Loader
ref: '${{ matrix.sdkTag }}'
path: 'Vulkan-Loader'
- name: Build Vulkan-Loader
shell: bash
run: |
cmake -S Vulkan-Loader -B Vulkan-Loader/build -DVULKAN_HEADERS_INSTALL_DIR=${{ env.SDK_PATH }} -DLOADER_USE_UNSAFE_FILE_SEARCH=ON -DCMAKE_BUILD_TYPE=Release
cmake --build Vulkan-Loader/build --config Release --parallel 4
cmake --install Vulkan-Loader/build --prefix ${{ env.SDK_PATH }}
- name: Checkout Vulkan-ValidationLayers
uses: actions/checkout@v4
with:
repository: KhronosGroup/Vulkan-ValidationLayers
ref: '${{ matrix.sdkTag }}'
path: 'Vulkan-ValidationLayers'
- name: Build Vulkan-ValidationLayers
shell: bash
run: |
cmake -S Vulkan-ValidationLayers -B Vulkan-ValidationLayers/build -DUPDATE_DEPS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build Vulkan-ValidationLayers/build --config Release --parallel 4
cmake --install Vulkan-ValidationLayers/build --prefix ${{ env.SDK_PATH }}
cp Vulkan-ValidationLayers/LICENSE.txt ${{ env.SDK_PATH }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_NAME }}
path: VulkanSDK