-
Notifications
You must be signed in to change notification settings - Fork 43
88 lines (77 loc) · 2.64 KB
/
build.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
name: CMake
on: [push, pull_request]
jobs:
windows-msvc:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
name: Windows (MSVC, ${{ matrix.buildtype }})
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
buildtype: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DZASM_BUILD_TESTS=ON
cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
- name: Test
run: |
ctest --version
cd build
ctest . -C ${{ env.BUILD_TYPE }} --verbose
ubuntu-gcc:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
name: Ubuntu (GCC, ${{ matrix.buildtype }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
buildtype: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DZASM_BUILD_TESTS=ON -DZASM_BUILD_EXAMPLES=ON
cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
- name: Test
run: |
ctest --version
cd build
ctest . -C ${{ env.BUILD_TYPE }} --verbose
ubuntu-clang:
# Skip building pull requests from the same repository
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }}
name: Ubuntu (Clang, ${{ matrix.buildtype }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
buildtype: [Debug, Release]
env:
BUILD_TYPE: ${{ matrix.buildtype }}
steps:
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: 12
platform: x64
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DZASM_BUILD_TESTS=ON -DZASM_BUILD_EXAMPLES=ON
cmake --build build --config ${{ env.BUILD_TYPE }} --parallel
- name: Test
run: |
ctest --version
cd build
ctest . -C ${{ env.BUILD_TYPE }} --verbose