-
Notifications
You must be signed in to change notification settings - Fork 35
113 lines (92 loc) · 2.64 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Build
on: [push, pull_request]
env:
BUILD_TYPE: MinSizeRel
jobs:
build-linux-gcc:
name: Linux (GCC 7)
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install Dependencies
run: |
sudo tee --append /etc/apt/sources.list << EOF
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
EOF
sudo apt -y update
sudo apt -y install libncursesw5-dev g++-7 libgtest-dev
- name: Configure CMake
shell: bash
env:
CC: gcc-7
CXX: g++-7
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DTURBO_OPTIMIZE_BUILD=OFF -DTURBO_BUILD_EXAMPLES=ON -DTURBO_BUILD_TESTS=ON
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-windows-msvc32:
name: Windows (MSVC) (Win32)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure CMake
shell: bash
run: cmake . -A Win32 -DTURBO_USE_STATIC_RTL=ON
- name: Build
shell: bash
run: cmake --build . --config $BUILD_TYPE -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: turbo-x86
path: |
${{env.BUILD_TYPE}}/turbo.exe
build-windows-msvc64:
name: Windows (MSVC) (x64)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure CMake
shell: bash
run: cmake . -A x64 -DTURBO_USE_STATIC_RTL=ON
- name: Build
shell: bash
run: cmake --build . --config $BUILD_TYPE -- -p:UseMultiToolTask=true -p:CL_MPcount=$(nproc)
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: turbo-x64
path: |
${{env.BUILD_TYPE}}/turbo.exe
build-windows-mingw:
name: Windows (MinGW)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure CMake
shell: bash
run: cmake . -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CXX_FLAGS="-static" -DTURBO_OPTIMIZE_BUILD=OFF
- name: Build
shell: bash
run: cmake --build . -j$(nproc)
build-macos-clang:
name: MacOS (Clang)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Configure CMake
shell: bash
run: cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
shell: bash
run: cmake --build . -j$(sysctl -n hw.logicalcpu)