-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (80 loc) · 2.42 KB
/
cmake.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
name: Build and Package
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- '**.png'
- '**.svg'
- '.gitignore'
- '**.html'
- '**.css'
- '**.js'
pull_request:
branches: [ main ]
jobs:
build-and-package:
strategy:
fail-fast: false
matrix:
config:
- {
os: Windows-2022,
build_arch: Win32,
build_type: MinSizeRel,
build_generator: Visual Studio 17 2022,
clearname: win32
}
- {
os: windows-2022,
build_arch: x64,
build_type: MinSizeRel,
build_generator: Visual Studio 17 2022,
clearname: win64
}
- {
os: ubuntu-22.04,
build_arch: x64,
build_type: MinSizeRel,
build_generator: Ninja,
clearname: linux
}
- {
os: macos-12,
build_arch: x64,
build_type: MinSizeRel,
build_generator: Ninja,
clearname: macos
}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- uses: seanmiddleditch/gha-setup-ninja@v3
if: "contains(matrix.config.os, 'Macos') || contains(matrix.config.os, 'Ubuntu')"
- name: Generate ${{ matrix.config.clearname }}
if: "contains(matrix.config.build_generator, 'Visual Studio')"
run: |
cmake -S . -B Build -A ${{ matrix.config.build_arch }} -G "${{ matrix.config.build_generator}}" -DGITHUB_CI=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="../${{ matrix.config.clearname }}"
- name: Generate ${{ matrix.config.clearname }}
if: "!contains(matrix.config.build_generator, 'Visual Studio')"
run: |
cmake -S . -B Build -G "${{ matrix.config.build_generator}}" -DGITHUB_CI=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY="../${{ matrix.config.clearname }}"
- name: Build ${{ matrix.config.clearname }}
run: |
cmake --build Build --config ${{ matrix.config.build_type }}
- uses: actions/upload-artifact@v2
with:
name: esd ${{ matrix.config.clearname }}
path: |
**/esd
**/esd.exe
if-no-files-found: error
retention-days: 7
- uses: actions/upload-artifact@v2
with:
name: esd
path: |
**/esd
**/esd.exe
if-no-files-found: error
retention-days: 7