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