-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (66 loc) · 2.06 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
name: GitHub CI
on:
workflow_dispatch:
push:
paths-ignore:
- '.github/*'
- '.github/*TEMPLATE/**'
branches:
- '**'
pull_request:
paths-ignore:
- '*.md'
- '.github/*'
- '.github/*TEMPLATE/**'
env:
is_pr: ${{ startsWith(github.ref, 'refs/pull/') }}
repo_default: 'ergo720/nxbx'
jobs:
build:
name: ${{ matrix.platform }} (${{ matrix.arch }}, ${{ matrix.configuration }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
cmake-generator:
# x64 arch
- -A x64 # Visual Studio (latest IDE)
- -G "Unix Makefiles"
#- -G Xcode
configuration: [Debug, Release]
include:
- cmake-generator: -A x64
platform: Windows
os: windows-latest
arch: x64
cmake-build-param: -j $env:NUMBER_OF_PROCESSORS
folder: win
- cmake-generator: -G "Unix Makefiles"
platform: Linux
install-cmd: sudo apt-get -y update && sudo apt-get -y install xorg-dev
os: ubuntu-latest
arch: x64
cmake-build-param: -j $(nproc --all)
folder: linux
#- cmake-generator: -G Xcode
# platform: macOS
# os: macos-latest
# arch: x64
# cmake-build-param: -j $(sysctl -n hw.ncpu)
# folder: macos
steps:
- name: Install Dependencies
if: matrix.install-cmd != ''
run: ${{ matrix.install-cmd }}
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Generate CMake Files
# NOTES:
# -Werror=dev is used to validate CMakeLists.txt for any faults.
run: cmake -B build -Werror=dev ${{ matrix.cmake-generator }}
- name: Build
run: cmake --build build --config ${{ matrix.configuration }} ${{ matrix.cmake-build-param }}
# In case if CTests later implement can use the step below.
#- name: CTests
# run: ctest --test-dir build --build-config ${{ matrix.configuration }} --verbose