forked from microsoft/cpprestsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (41 loc) · 1.13 KB
/
compile.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
on: push
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: linux,
os: ubuntu-20.04,
cc: gcc-9,
cxx: g++-9,
args: -DCMAKE_BUILD_TYPE=RelWithDebInfo,
}
- {
name: windows,
os: windows-latest,
cc: cl,
cxx: cl,
args: -DCMAKE_BUILD_TYPE=RelWithDebInfo -A x64 -T host=x64,
}
fail-fast: false
steps:
- uses: actions/checkout@v4
- working-directory: ./
shell: cmake -P {0}
run: |
set(ENV{CC} ${{ matrix.config.cc }})
set(ENV{CXX} ${{ matrix.config.cxx }})
file(MAKE_DIRECTORY build)
execute_process(
COMMAND cmake .. ${{ matrix.config.args }}
RESULT_VARIABLE result
WORKING_DIRECTORY build
)
if (NOT result EQUAL 0)
message(FATAL_ERROR "Bad exit status")
endif()
- working-directory: ./
shell: bash
run: cmake --build build --config RelWithDebInfo