-
-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (143 loc) · 5.17 KB
/
ci.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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: ci
on:
workflow_dispatch:
pull_request:
release:
types: [published]
push:
branches:
- main
- dev
jobs:
build-test-windows:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
configure-preset: "Windows-Msvc-Ninja-Debug"
build-preset: "Windows-Msvc-Ninja-Debug"
- os: windows-latest
configure-preset: "Windows-Msvc-Ninja-Release"
build-preset: "Windows-Msvc-Ninja-Release"
- os: windows-latest
configure-preset: "Windows-Msvc-NinjaMultiConfig"
build-preset: "Windows-Msvc-NinjaMultiConfig-Debug"
- os: windows-latest
configure-preset: "Windows-Msvc-Vs2022"
build-preset: "Windows-Msvc-Vs2022-Debug"
name: ${{matrix.build-preset}}
steps:
- name: Foresight Collect Workflow Telemetry
uses: runforesight/foresight-workflow-kit-action@v1
if: ${{ always() }}
with:
api_key: ${{ secrets.FORESIGHT_API_KEY }}
- uses: actions/checkout@v4
- name: Env variable
shell: bash
run: |
printenv
# echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
- name: Set ownership
shell: bash
run: |
# this is to fix GIT not liking owner of the checkout dir
#chown -R $(id -u):$(id -g) $PWD
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Vcpkg Cache
uses: ./.github/actions/vcpkg_cache
- name: CPM Cache
id: cache-cpm
uses: actions/cache@v4
with:
path: _Out/cpm_sources
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
restore-keys: |
${{ runner.os }}-cpm-
# - name: Setup Cache
# uses: ./.github/actions/setup_cache
# with:
# compiler: ${{ matrix.compiler }}
# build_type: ${{ matrix.build_type }}
# packaging_maintainer_mode: false
# generator: ${{ matrix.generator }}
- name: "CMake Configure & Build"
run: |
& { . Scripts\Build\VsEnvironment.ps1; LaunchVsDevShell }
cmake --preset ${{matrix.configure-preset}} -DGIT_SHA:STRING=${{ github.sha }} -DPersonalWorks_ENABLE_CLANG_TIDY=OFF
cmake --build --preset ${{matrix.build-preset}}
# - name: Tests
# run: |
# cmake --build --preset $CMAKE_PRESET
build-test-linux:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
runs-on: ubuntu-latest
container:
image: 'ghcr.io/monamimani-builds/cpp-devcontainer:a524189b6082de6c08216ef1f3ea2544a9cdf5a4'
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
configure-preset: "Linux-Clang-Ninja-Debug"
build-preset: "Linux-Clang-Ninja-Debug"
- os: ubuntu-latest
configure-preset: "Linux-Clang-Ninja-Release"
build-preset: "Linux-Clang-Ninja-Release"
- os: ubuntu-latest
configure-preset: "Linux-Gcc-Ninja-Debug"
build-preset: "Linux-Gcc-Ninja-Debug"
- os: ubuntu-latest
configure-preset: "Linux-Gcc-Ninja-Release"
build-preset: "Linux-Gcc-Ninja-Release"
- os: ubuntu-latest
configure-preset: "Linux-Clang-NinjaMultiConfig-Debug"
build-preset: "Linux-Clang-NinjaMultiConfig-Debug"
name: ${{matrix.build-preset}}
steps:
- name: Foresight Collect Workflow Telemetry
uses: runforesight/foresight-workflow-kit-action@v1
if: ${{ always() }}
with:
api_key: ${{ secrets.FORESIGHT_API_KEY }}
- uses: actions/checkout@v4
- name: Env variable
shell: bash
run: |
printenv
# echo "VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT" >> $GITHUB_ENV
- name: Set ownership
shell: bash
run: |
# this is to fix GIT not liking owner of the checkout dir
#chown -R $(id -u):$(id -g) $PWD
git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Vcpkg Cache
uses: ./.github/actions/vcpkg_cache
- name: CPM Cache
id: cache-cpm
uses: actions/cache@v4
with:
path: _Out/cpm_sources
key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
restore-keys: |
${{ runner.os }}-cpm-
# - name: Setup Cache
# uses: ./.github/actions/setup_cache
# with:
# compiler: ${{ matrix.compiler }}
# build_type: ${{ matrix.build_type }}
# packaging_maintainer_mode: false
# generator: ${{ matrix.generator }}
- name: "[Linux] CMake Configure & Build"
if: runner.os == 'Linux'
continue-on-error: true
run: |
cmake --preset ${{matrix.configure-preset}} -DGIT_SHA:STRING=${{ github.sha }} -DPersonalWorks_ENABLE_CLANG_TIDY=OFF -DPersonalWorks_ENABLE_CPPCHECK=OFF
cmake --build --preset ${{matrix.build-preset}}
# - name: Tests
# run: |
# cmake --build --preset $CMAKE_PRESET