-
Notifications
You must be signed in to change notification settings - Fork 217
135 lines (120 loc) · 4.26 KB
/
win-cygwin-mingw.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
134
135
name: windows-mingw-cygwin
on:
workflow_dispatch:
jobs:
mingw-shared:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: latest
cache: true
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
- name: Put MSYS2_MinGW64 on PATH
run: echo "D:/a/_temp/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: CMake Configure
run: cmake -B build -DBUILD_SHARED_LIBS=1
- name: CMake Build
run: cmake --build build
mingw-static:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Install Vulkan SDK
uses: humbletim/[email protected]
with:
version: latest
cache: true
- uses: msys2/setup-msys2@v2
with:
update: true
install: >-
git
mingw-w64-x86_64-cmake
mingw-w64-x86_64-ninja
- name: Put MSYS2_MinGW64 on PATH
run: echo "D:/a/_temp/msys64/mingw64/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: CMake Configure
run: cmake -B build
- name: CMake Build
run: cmake --build build
cygwin-shared:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup Cygwin
uses: egor-tensin/setup-cygwin@v3
#with:
#packages: cmake gcc-g++ ninja pkg-config libxcb-devel
- name: Package installation workaround
run: C:\tools\cygwin\cygwinsetup.exe \
--quiet-mode \
--no-desktop \
--no-startmenu \
--root C:\tools\cygwin\ \
--local-package-dir C:\tools\cygwin\packages \
--site "http://mirrors.kernel.org/sourceware/cygwin/" \
--packages cmake gcc-g++ ninja pkg-config libxcb-devel
- name: Build in Cygwin
env:
VSG_BUILD_PATH: ${{ github.workspace }}
run: |
build_vsg() {
cd $(cygpath -u $VSG_BUILD_PATH)
SDK_VERSION=$(curl -sL "https://vulkan.lunarg.com/sdk/latest/linux.txt")
curl -s -L -o "vulkan_sdk.tar.gz" https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.gz
mkdir -p vulkan_sdk
VULKAN_SDK="vulkan_sdk"
tar -C "$VULKAN_SDK" --strip-components 2 -xf vulkan_sdk.tar.gz $SDK_VERSION/x86_64
export VULKAN_SDK
export PATH=$PATH:$VULKAN_SDK/bin
mkdir build && cd build
cmake .. -G Ninja -D Vulkan_LIBRARY="$VULKAN_SDK/lib/libvulkan.so" -DBUILD_SHARED_LIBS=1
ninja -v
}
build_vsg
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
cygwin-static:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup Cygwin
uses: egor-tensin/setup-cygwin@v3
#with:
#packages: cmake gcc-g++ ninja pkg-config libxcb-devel
- name: Package installation workaround
run: C:\tools\cygwin\cygwinsetup.exe \
--quiet-mode \
--no-desktop \
--no-startmenu \
--root C:\tools\cygwin\ \
--local-package-dir C:\tools\cygwin\packages \
--site "http://mirrors.kernel.org/sourceware/cygwin/" \
--packages cmake gcc-g++ ninja pkg-config libxcb-devel
- name: Build in Cygwin
env:
VSG_BUILD_PATH: ${{ github.workspace }}
run: |
build_vsg() {
cd $(cygpath -u $VSG_BUILD_PATH)
SDK_VERSION=$(curl -sL "https://vulkan.lunarg.com/sdk/latest/linux.txt")
curl -s -L -o "vulkan_sdk.tar.gz" https://sdk.lunarg.com/sdk/download/latest/linux/vulkan-sdk.tar.gz
mkdir -p vulkan_sdk
VULKAN_SDK="vulkan_sdk"
tar -C "$VULKAN_SDK" --strip-components 2 -xf vulkan_sdk.tar.gz $SDK_VERSION/x86_64
export VULKAN_SDK
export PATH=$PATH:$VULKAN_SDK/bin
mkdir build && cd build
cmake .. -G Ninja -D Vulkan_LIBRARY="$VULKAN_SDK/lib/libvulkan.so"
ninja -v
}
build_vsg
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'