-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.68 KB
/
main.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
name: Staging
on:
push:
branches: [ master ]
jobs:
Build:
strategy:
matrix:
config: [debug, release]
dialect: [C++17, C++20]
machine:
- host: linux
os: ubuntu-latest
action: gmake2
toolset: gcc
- host: linux
os: ubuntu-latest
action: gmake2
toolset: clang
- host: windows
os: windows-latest
action: vs2019
toolset: msc
runs-on: ${{ matrix.machine.os }}
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup premake
uses: abel0b/setup-premake@v2.2
with:
version: "5.0.0-beta1"
- name: Install GCC
if: matrix.machine.toolset == 'gcc'
run: sudo apt update && sudo apt install -y gcc g++
- name: Install Clang & LLVM
if: matrix.machine.toolset == 'clang'
run: sudo apt update && sudo apt install -y clang llvm lld
- name: Install msbuild to PATH
if: matrix.machine.toolset == 'msc'
uses: microsoft/setup-msbuild@v1.1
- name: Run premake
run: premake5 ${{ matrix.machine.action }} --toolset=${{ matrix.machine.toolset }} --dialect=${{ matrix.dialect }}
- uses: mjp41/workaround8649@c8550b715ccdc17f89c8d5c28d7a48eeff9c94a8
with:
os: ${{ matrix.machine.os }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: cpp
- name: Build
run: premake5 build --config=${{ matrix.config }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Run test
run: premake5 test --config=${{ matrix.config }}