-
-
Notifications
You must be signed in to change notification settings - Fork 84
62 lines (57 loc) · 1.83 KB
/
test.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
name: Windows Build (CLang)
on:
push:
branches: [ "main", "release-**", "new-workflow"]
pull_request:
branches: [ "main" ]
jobs:
build-windows:
strategy:
matrix:
include:
- os: windows-latest
compiler: clang
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- uses: msys2/setup-msys2@v2
with:
msystem: clang64
install: >-
mingw-w64-clang-x86_64-toolchain
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-make
git tree
- name: Set up vcpkg
shell: msys2 {0}
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg integrate install
cd ..
- name: Configure project with CMake and vcpkg
shell: msys2 {0}
run: |
export VCPKG_DEFAULT_TRIPLET=x64-mingw-static
export VCPKG_DEFAULT_HOST_TRIPLET=x64-mingw-static
mkdir build
cd build
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DCMAKE_BUILD_TYPE=Release -DVOXELENGINE_BUILD_WINDOWS_VCPKG=ON -DVOXELENGINE_BUILD_TESTS=ON ..
cmake --build . --config Release
- name: Package for Windows
run: |
mkdir packaged
mkdir packaged/res
cp build/VoxelEngine.exe packaged/
cp build/vctest/vctest.exe packaged/
cp build/*.dll packaged/
cp -r build/res/* packaged/res/
mv packaged/VoxelEngine.exe packaged/VoxelCore.exe
working-directory: ${{ github.workspace }}
- uses: actions/upload-artifact@v4
with:
name: Windows-Build
path: 'packaged/*'