From 3a0b2520eb17035e07637db11f42c5b5f1320221 Mon Sep 17 00:00:00 2001 From: Arthur Sonzogni Date: Sun, 21 Mar 2021 13:42:12 +0100 Subject: [PATCH] Split workflows by OS (#77) --- .github/workflows/continuous-integration.yaml | 78 ------------------- .github/workflows/linux-clang.yaml | 26 +++++++ .github/workflows/linux-emscripten.yaml | 20 +++++ .github/workflows/linux-gcc.yaml | 25 ++++++ README.md | 2 +- 5 files changed, 72 insertions(+), 79 deletions(-) delete mode 100644 .github/workflows/continuous-integration.yaml create mode 100644 .github/workflows/linux-clang.yaml create mode 100644 .github/workflows/linux-emscripten.yaml create mode 100644 .github/workflows/linux-gcc.yaml diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml deleted file mode 100644 index 98c3254..0000000 --- a/.github/workflows/continuous-integration.yaml +++ /dev/null @@ -1,78 +0,0 @@ -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 diff --git a/.github/workflows/linux-clang.yaml b/.github/workflows/linux-clang.yaml new file mode 100644 index 0000000..f1e1c02 --- /dev/null +++ b/.github/workflows/linux-clang.yaml @@ -0,0 +1,26 @@ +name: Linux Clang - Build & tests + +on: + - pull_request + +jobs: + build: + name: Linux Clang + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: seanmiddleditch/gha-setup-ninja@master + - name: Build + run: > + mkdir build; + cd build; + cmake .. + -DCMAKE_CXX_COMPILER=clang++-9 + -DFTXUI_BUILD_TESTS=ON; + cmake --build . --config Release; + + - name: Tests + if: ${{ matrix.config.test }} + run: > + cd build; + ./tests diff --git a/.github/workflows/linux-emscripten.yaml b/.github/workflows/linux-emscripten.yaml new file mode 100644 index 0000000..c6bc761 --- /dev/null +++ b/.github/workflows/linux-emscripten.yaml @@ -0,0 +1,20 @@ +name: Linux Emscripten - Build + +on: + - pull_request + +jobs: + build: + name: Linux Emscripten + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: seanmiddleditch/gha-setup-ninja@master + - uses: mymindstorm/setup-emsdk@v7 + - name: Build + run: > + mkdir build; + cd build; + emcmake cmake .. + -DFTXUI_BUILD_TESTS=ON; + cmake --build . --config Release; diff --git a/.github/workflows/linux-gcc.yaml b/.github/workflows/linux-gcc.yaml new file mode 100644 index 0000000..2bc76be --- /dev/null +++ b/.github/workflows/linux-gcc.yaml @@ -0,0 +1,25 @@ +name: Linux GCC - Build & tests + +on: + - pull_request + +jobs: + build: + name: Linux GCC + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: seanmiddleditch/gha-setup-ninja@master + - name: Build + run: > + mkdir build; + cd build; + cmake .. + -DCMAKE_CXX_COMPILER=g++-9 + -DFTXUI_BUILD_TESTS=ON; + cmake --build . --config Release; + + - name: Tests + run: > + cd build; + ./tests diff --git a/README.md b/README.md index eb2ba94..604c432 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ A simple C++ library for terminal based user interface. # Documentation: - [Starter example project](https://github.com/ArthurSonzogni/ftxui-starter) -- [Documentation](https://arthursonzogni.com/FTXUI/doc/) (Work in progress) +- [Documentation](https://arthursonzogni.com/FTXUI/doc/) - [Build using CMake](https://arthursonzogni.com/FTXUI/doc/#build-using-cmake) - [Build using nxxm](https://arthursonzogni.com/FTXUI/doc/#build-using-cmake)