-
Notifications
You must be signed in to change notification settings - Fork 0
161 lines (156 loc) · 4.63 KB
/
release.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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Release
on:
push:
tags:
- '*'
jobs:
dependency-gli:
runs-on: ubuntu-22.04
steps:
-
name: Package artifact
run: |
wget -O gli.zip https://github.com/g-truc/gli/archive/559cbe1ec38878e182507d331e0780fbae5baf15.zip
unzip -q gli.zip
mkdir -p artifact/External
mv gli-559cbe1ec38878e182507d331e0780fbae5baf15/gli artifact/External/gli
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gli
path: artifact
build-linux:
needs: dependency-gli
runs-on: ubuntu-22.04
steps:
-
name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'
-
name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake \
libxmu-dev libxi-dev libgl-dev \
libxinerama-dev libxcursor-dev xorg-dev libglu1-mesa-dev
-
name: Install dependencies
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: acc3bcf76b84ae5041c86ab55fe138ae7b8255c7
runVcpkgInstall: true
-
name: Retrieve gli artifact
uses: actions/download-artifact@v3
with:
name: gli
-
name: Build artifacts
run: |
mkdir Build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake -B Build
cmake --build Build
-
name: Package release
run: |
mkdir -p Export/linux-x64
cp -r Resources Export/linux-x64/
cp Build/{MeshExporter,SandboxClient,Test,libFoundation.so} Export/linux-x64/
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: sandbox-linux-x64
path: Export/linux-x64
build-windows:
needs: dependency-gli
runs-on: windows-2022
steps:
-
name: Checkout repository
uses: actions/checkout@v3
with:
lfs: 'true'
-
name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1
-
name: Install dependencies
uses: lukka/run-vcpkg@v10
with:
vcpkgGitCommitId: acc3bcf76b84ae5041c86ab55fe138ae7b8255c7
runVcpkgInstall: true
-
name: Retrieve gli artifact
uses: actions/download-artifact@v3
with:
name: gli
-
name: Build artifacts
run: |
md Build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake -B Build
cmake --build Build
-
name: Package release
run: |
md Export\windows-x64
xcopy /E /I Resources Export\windows-x64\Resources
copy Build\MeshExporter.exe Export\windows-x64
copy Build\SandboxClient.exe Export\windows-x64
copy Build\Test.exe Export\windows-x64
copy Build\libFoundation.dll Export\windows-x64
-
name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: sandbox-windows-x64
path: Export/windows-x64
release:
runs-on: ubuntu-22.04
needs: [build-linux, build-windows]
steps:
-
name: Retrieve Sandbox-linux-x64 artifact
uses: actions/download-artifact@v3
with:
name: sandbox-linux-x64
-
name: Retrieve Sandbox-windows-x64 artifact
uses: actions/download-artifact@v3
with:
name: sandbox-windows-x64
-
name: Create release
id: create_release
uses: actions/create-release@v1
with:
draft: false
prerelease: false
release_name: ${{ github.ref }}
tag_name: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ github.token }}
-
name: Upload Sandbox-linux-x64 artifacts
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Sandbox.tar.bz2
asset_name: Sandbox (Linux-x64)
asset_content_type: application/bzip2
env:
GITHUB_TOKEN: ${{ github.token }}
-
name: Upload Sandbox-windows-x64 artifacts
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Sandbox.zip
asset_name: Sandbox (Windows-x64)
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ github.token }}