Merge pull request #17 from KredeGC/performance #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staging | |
on: | |
push: | |
branches: [ master ] | |
jobs: | |
Build: | |
strategy: | |
matrix: | |
architecture: [x86, x64] | |
dialect: [C++17] #Uncomment once #8659 is fixed [C++17, C++20] | |
config: [debug, release] | |
machine: | |
- os: ubuntu-latest | |
action: gmake2 | |
toolset: gcc | |
- os: ubuntu-latest | |
action: gmake2 | |
toolset: clang | |
- os: windows-latest | |
action: vs2019 | |
toolset: msc | |
runs-on: ${{ matrix.machine.os }} | |
permissions: | |
actions: read | |
contents: read | |
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-get update && sudo apt-get install -y gcc g++ | |
- name: Install Clang & LLVM | |
if: matrix.machine.toolset == 'clang' | |
run: sudo apt-get update && sudo apt-get install -y clang llvm lld | |
- name: Install msbuild to PATH | |
if: matrix.machine.toolset == 'msc' | |
uses: microsoft/setup-msbuild@v1.1 | |
- name: Install 32-bit gcc libs | |
if: matrix.architecture == 'x86' && matrix.machine.os == 'ubuntu-latest' | |
run: sudo apt-get install gcc-multilib g++-multilib | |
- name: Run premake | |
run: premake5 ${{ matrix.machine.action }} --toolset=${{ matrix.machine.toolset }} --dialect=${{ matrix.dialect }} | |
- name: Initialize CodeQL | |
continue-on-error: true | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: cpp | |
- name: Build | |
run: premake5 build --config=${{ matrix.config }} --architecture=${{ matrix.architecture }} | |
- name: Perform CodeQL Analysis | |
continue-on-error: true | |
uses: github/codeql-action/analyze@v2 | |
- name: Run test | |
run: premake5 test --config=${{ matrix.config }} --architecture=${{ matrix.architecture }} |