-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (66 loc) · 3.16 KB
/
windows.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
name: Build ThornedLibrary
on:
push:
branches:
- main
- library
pull_request:
branches:
- main
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install vcpkg
run: |
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
- name: Install SFML
run: |
.\vcpkg\vcpkg install sfml:x64-windows
- name: Configure CMake
run: |
mkdir build
cd build
cmake .. -DDEV_MODE=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_TOOLCHAIN_FILE=../vcpkg/scripts/buildsystems/vcpkg.cmake -DSFML_DIR=${{ github.workspace }}/vcpkg/installed/x64-windows/share/SFML -DBUILD_LIB=ON
- name: Build the project
run: |
cd build
cmake --build . --config Debug
- name: Copy header files and library
run: |
New-Item -ItemType Directory -Force -Path "${{ github.workspace }}\bin\Debug\include\GUI\components"
New-Item -ItemType Directory -Force -Path "${{ github.workspace }}\bin\Debug\include\GUI\form"
New-Item -ItemType Directory -Force -Path "${{ github.workspace }}\bin\Debug\include\XML"
New-Item -ItemType Directory -Force -Path "${{ github.workspace }}\bin\Debug\lib"
if (Test-Path "${{ github.workspace }}\GUI\*.hpp") {
Copy-Item "${{ github.workspace }}\GUI\*.hpp" -Destination "${{ github.workspace }}\bin\Debug\include\GUI\" -Force
}
if (Test-Path "${{ github.workspace }}\GUI\components\*.hpp") {
Copy-Item "${{ github.workspace }}\GUI\components\*.hpp" -Destination "${{ github.workspace }}\bin\Debug\include\GUI\components\" -Force
}
if (Test-Path "${{ github.workspace }}\GUI\form\*.hpp") {
Copy-Item "${{ github.workspace }}\GUI\form\*.hpp" -Destination "${{ github.workspace }}\bin\Debug\include\GUI\form\" -Force
}
if (Test-Path "${{ github.workspace }}\XML\*.hpp") {
Copy-Item "${{ github.workspace }}\XML\*.hpp" -Destination "${{ github.workspace }}\bin\Debug\include\XML\" -Force
}
if (Test-Path "${{ github.workspace }}\XML\*.h") {
Copy-Item "${{ github.workspace }}\XML\*.h" -Destination "${{ github.workspace }}\bin\Debug\include\XML\" -Force
}
if (Test-Path "${{ github.workspace }}\lib\Debug\Debug\*.lib") {
Copy-Item "${{ github.workspace }}\lib\Debug\Debug\*.lib" -Destination "${{ github.workspace }}\bin\Debug\lib\" -Force
}
if (Test-Path "${{ github.workspace }}\lib\Debug\Debug\*.pdb") {
Copy-Item "${{ github.workspace }}\lib\Debug\Debug\*.pdb" -Destination "${{ github.workspace }}\bin\Debug\lib\" -Force
}
Write-Host "Files in destination directories:"
Get-ChildItem -Path "${{ github.workspace }}\bin\Debug" -Recurse
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ThorneLib-Debug
path: ${{ github.workspace }}/bin/Debug/**/*