-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 1.96 KB
/
engines_cpp_pr.yml
File metadata and controls
72 lines (62 loc) · 1.96 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
61
62
63
64
65
66
67
68
69
70
71
72
name: SampleEngine C++ PR
env:
Product: SampleEngineCpp
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/engines_cpp_pr.yml'
- 'engines/cpp/**'
- '!engines/cpp/*.md'
defaults:
run:
shell: pwsh
jobs:
pr_build_windows:
name: PR Windows Build
runs-on: windows-latest
strategy:
matrix:
architecture: [Win32]
configuration: [Debug]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
mkdir build
cd build
cmake -G "Visual Studio 17 2022" -A ${{ matrix.architecture }} ..
cmake --build . --config ${{ matrix.configuration }}
working-directory: ./engines/cpp/
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.Product }}.Windows.${{ matrix.architecture }}.${{ matrix.configuration }}
path: ./engines/cpp/build/${{ matrix.configuration }}/*
pr_build_linux:
name: PR Linux Build
runs-on: ubuntu-latest
strategy:
matrix:
architecture: [x64]
configuration: [Debug]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
mkdir -p build
cd build
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DCMAKE_RUNTIME_OUTPUT_DIRECTORY=${{ matrix.configuration }}/
cmake --build . --config ${{ matrix.configuration }}
working-directory: ./engines/cpp/
- name: Tar Files
run: tar -C build/${{ matrix.configuration }} . -cvzf ${{ env.Product }}.Linux.${{ matrix.architecture }}.${{ matrix.configuration }}.tar.gz
working-directory: ./engines/cpp/
- name: Upload Build Artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ env.Product }}.Linux.${{ matrix.architecture }}.${{ matrix.configuration }}
path: ./engines/cpp/${{ env.Product }}.Linux.${{ matrix.architecture }}.${{ matrix.configuration }}.tar.gz