Allow exclusive keyboard mode #616
Workflow file for this run
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: Build binaries | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
name: ${{ matrix.platform }} / ${{ matrix.cpu }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ windows-latest, ubuntu-latest ] | |
cpu: [ x64, x86, arm64, arm ] | |
exclude: | |
- os: windows-latest | |
cpu: x86 | |
include: | |
- os: macos-latest | |
platform: macos | |
cpu: universal | |
arch: any | |
cxx: c++ | |
flags: '-DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_CXX_FLAGS_RELEASE="-O2 -DNDEBUG -Wall -Wextra -Wno-missing-field-initializers -Werror"' | |
- os: windows-latest | |
platform: windows | |
cpu: Win32 | |
arch: x86 | |
cxx: cl | |
flags: '-DCMAKE_EXE_LINKER_FLAGS_RELEASE="/DEBUG /OPT:REF /OPT:ICF" -DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /DNDEBUG /Zi /Zc:preprocessor /W4" -A ' | |
- os: windows-latest | |
cxx: cl | |
- os: ubuntu-latest | |
cpu: x64 | |
cxx: g++ | |
- os: ubuntu-latest | |
cpu: x86 | |
apt: g++-i686-linux-gnu | |
cxx: /bin/i686-linux-gnu-g++ | |
- os: ubuntu-latest | |
cpu: arm | |
apt: g++-arm-linux-gnueabihf | |
cxx: /bin/arm-linux-gnueabihf-g++ | |
- os: ubuntu-latest | |
cpu: arm64 | |
apt: g++-aarch64-linux-gnu | |
cxx: /bin/aarch64-linux-gnu-g++ | |
- os: ubuntu-latest | |
flags: '-DCMAKE_CXX_FLAGS_RELEASE="-static -s -O2 -DNDEBUG -Wall -Wextra -Wno-missing-field-initializers -Wno-psabi -Werror"' | |
- os: windows-latest | |
flags: '-DCMAKE_EXE_LINKER_FLAGS_RELEASE="/DEBUG /OPT:REF /OPT:ICF" -DCMAKE_CXX_FLAGS_RELEASE="/MT /O2 /DNDEBUG /Zi /Zc:preprocessor /W4" -A ' | |
- os: ubuntu-latest | |
platform: linux | |
- os: windows-latest | |
platform: windows | |
- cpu: x64 | |
arch: x86_64 | |
- cpu: x86 | |
arch: x86 | |
- cpu: arm64 | |
arch: arm64 | |
- cpu: arm | |
arch: arm32 | |
steps: | |
- uses: actions/checkout@main | |
- name: Set reusable strings | |
id: strings | |
shell: bash | |
run: | | |
echo "bin=${{ github.workspace }}/bin" >> "$GITHUB_OUTPUT" | |
- name: Install compiler | |
if: ${{ matrix.apt }} | |
run: > | |
sudo apt -y update && sudo apt -y install ${{ matrix.apt }} | |
- name: Configure CMake | |
run: > | |
cmake -B ${{ steps.strings.outputs.bin }} | |
-DCMAKE_CXX_COMPILER=${{ matrix.cxx }} | |
${{ matrix.flags }} ${{ matrix.os == 'windows-latest' && matrix.cpu || '' }} | |
-DCMAKE_BUILD_TYPE=Release | |
-S ${{ github.workspace }} | |
- name: Build | |
run: cmake --build ${{ steps.strings.outputs.bin }} --config Release | |
- name: Test (POSIX) | |
if: matrix.os != 'windows-latest' && matrix.cpu != 'arm' && matrix.cpu != 'arm64' | |
run: ${{ steps.strings.outputs.bin }}/vtm -v | |
- name: Pack (POSIX) | |
if: matrix.os != 'windows-latest' | |
run: 7z a -ttar vtm_${{ matrix.platform }}_${{ matrix.arch }}.tar ${{ steps.strings.outputs.bin }}/vtm | |
- name: Upload Artifact (POSIX) | |
if: matrix.os != 'windows-latest' | |
uses: actions/upload-artifact@main | |
with: | |
name: vtm_${{ matrix.platform }}_${{ matrix.arch }} | |
path: vtm_${{ matrix.platform }}_${{ matrix.arch }}.tar | |
- name: Upload Symbols (Windows) | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-artifact@main | |
with: | |
name: vtm_pdb_${{ matrix.platform }}_${{ matrix.arch }} | |
path: ${{ steps.strings.outputs.bin }}/Release/vtm.pdb | |
- name: Upload Artifact (Windows) | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-artifact@main | |
with: | |
name: vtm_${{ matrix.platform }}_${{ matrix.arch }} | |
path: ${{ steps.strings.outputs.bin }}/Release/vtm.exe |