mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-22 18:59:59 +08:00
Add CI on github action. (#76)
This commit is contained in:
parent
af4bf379bc
commit
a6a7f0a354
78
.github/workflows/continuous-integration.yaml
vendored
Normal file
78
.github/workflows/continuous-integration.yaml
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
name: Build and run tests
|
||||
|
||||
on:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.config.name }}
|
||||
runs-on: ${{ matrix.config.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- name: "Windows Latest - MSVC"
|
||||
os: windows-latest
|
||||
cc: "cl"
|
||||
cxx: "cl"
|
||||
cmake: cmake
|
||||
test: false
|
||||
|
||||
- name: "Ubuntu Latest - GCC"
|
||||
os: ubuntu-latest
|
||||
cc: "gcc-9"
|
||||
cxx: "g++-9"
|
||||
cmake: "cmake"
|
||||
test: true
|
||||
|
||||
- name: "Ubuntu Latest - Clang"
|
||||
os: ubuntu-latest
|
||||
cc: "clang-9"
|
||||
cxx: "clang++-9"
|
||||
cmake: "cmake"
|
||||
test: true
|
||||
|
||||
- name: "Ubuntu Latest - Emscripten"
|
||||
os: ubuntu-latest
|
||||
cc: "emcc"
|
||||
cxx: "em++"
|
||||
cmake: "emcmake cmake"
|
||||
test: false
|
||||
|
||||
- name: "macOS Latest Clang"
|
||||
os: macos-latest
|
||||
artifact: "macos_clang.7z"
|
||||
build_type: "Release"
|
||||
cc: "clang"
|
||||
cxx: "clang++"
|
||||
cmake: cmake
|
||||
test: true
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: seanmiddleditch/gha-setup-ninja@master
|
||||
|
||||
- name: Set Windows ENV
|
||||
if: runner.os == 'Windows'
|
||||
uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Setup Emscripten
|
||||
if: ${{ matrix.config.cc == 'emcc' }}
|
||||
uses: mymindstorm/setup-emsdk@v7
|
||||
|
||||
- name: Build
|
||||
run: >
|
||||
mkdir build;
|
||||
cd build;
|
||||
${{ matrix.config.cmake }}
|
||||
..
|
||||
-DCMAKE_CXX_COMPILER=${{ matrix.config.cxx }}
|
||||
-DFTXUI_BUILD_TESTS=ON;
|
||||
cmake --build . --config Release;
|
||||
|
||||
- name: Tests
|
||||
if: ${{ matrix.config.test }}
|
||||
run: >
|
||||
cd build;
|
||||
./tests
|
@ -92,6 +92,8 @@ void EventListener(std::atomic<bool>* quit,
|
||||
|
||||
#else
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
int CheckStdinReady(int usec_timeout) {
|
||||
timeval tv = {0, usec_timeout};
|
||||
fd_set fds;
|
||||
|
Loading…
Reference in New Issue
Block a user