-
Notifications
You must be signed in to change notification settings - Fork 6
78 lines (72 loc) · 2.02 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
name: Build
on:
push:
branches: [ master ]
paths-ignore:
- '**.md'
- 'LICENSE'
tags-ignore:
- "*.*.*"
pull_request:
branches: [ master ]
paths-ignore:
- '**.md'
- '**.rst'
- 'LICENSE'
- '**/release-*.yml'
tags-ignore:
- "*.*.*"
workflow_dispatch:
jobs:
build:
name: ${{ matrix.config.os }}-${{ matrix.build }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: "windows-latest", cxx: "msvc", cc: "msvc", preset: "msvc"}
- {os: "ubuntu-24.04", cxx: "g++-14", cc: "gcc-14", preset: "linux"}
- {os: "macos-latest", cxx: "clang++", cc: "clang", preset: "macOS"}
build: ["Debug", "Release"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Lua
shell: bash
env:
BUILD_TYPE: ${{ matrix.build }}
CONFIG_TYPE: ${{ matrix.config.preset }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --preset=$CONFIG_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$HOME/lua
cd ./build
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --config $BUILD_TYPE
else
make
fi
- name: Install Lua
shell: bash
env:
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --install ./build
sudo make install
- name: Test App
shell: bash
working-directory: ./test
env:
BUILD_TYPE: ${{ matrix.config.build_type }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
run: |
cmake --preset=$CONFIG_TYPE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_PREFIX_PATH=$HOME
cd ./build
if [[ "$OSTYPE" == "msys" ]]; then
cmake --build . --config $BUILD_TYPE
else
make
fi