-
Notifications
You must be signed in to change notification settings - Fork 9
60 lines (50 loc) · 1.94 KB
/
Build.yml
File metadata and controls
60 lines (50 loc) · 1.94 KB
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
name: Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
build_type: [Debug, Release]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout master branch
run: git checkout master
# In order to build we need to use tests branch.
- name: Copy files from master branch to temporary folder
run: |
mkdir "${{github.workspace}}\master_temp"
robocopy "${{github.workspace}}\" "${{github.workspace}}\master_temp" /NFL /E /XD "${{github.workspace}}\master_temp"
# Robocopy will return 1 if successful, so we need to exit with 0 to avoid triggering a failure for this step
if ($LastExitCode -eq 1) {
echo "All files were copied successfully. Continuing..."
exit 0
} elseif ($LastExitCode -gt 7) {
echo "An error occurred during file copying. Exiting..."
exit $LastExitCode
}
- name: Checkout tests branch
run: |
git checkout tests
- name: Copy master branch files from temporary folder to MasterBranchCode folder
run: |
robocopy "${{github.workspace}}\master_temp" "${{github.workspace}}\MasterBranchCode" /NFL /E
# Robocopy will return 1 if successful, so we need to exit with 0 to avoid triggering a failure for this step
if ($LastExitCode -eq 1) {
echo "All files were copied successfully. Continuing..."
exit 0
} elseif ($LastExitCode -gt 7) {
echo "An error occurred during file copying. Exiting..."
exit $LastExitCode
}
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build_type }}