diff --git a/.github/workflows/run_tests_linux_cmake.yml b/.github/workflows/run_tests_linux_cmake.yml index 87ab37e..bf0bc2c 100644 --- a/.github/workflows/run_tests_linux_cmake.yml +++ b/.github/workflows/run_tests_linux_cmake.yml @@ -1,4 +1,4 @@ -name: cmake-linux +name: ubuntu-latest on: [pull_request, workflow_dispatch] @@ -91,7 +91,7 @@ jobs: # Note the current convention is to use the -S and -B options here to specify source # and build directories, but this is only available with CMake 3.13 and higher. # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 - run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBLAZERT_BUILD_TEST:BOOL=true -DBLAZERT_BUILD_EXAMPLES:BOOL=true -DBLAZE_INCLUDE_OVERRIDE:STRING=${BLAZE_INCLUDE} -DBLAZERT_ENABLE_OMP:BOOL=false -Dnlohmann_json_DIR=${NLOHMANN_JSON_INSTALL_DIR}/lib/cmake/nlohmann_json + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBLAZERT_BUILD_TEST:BOOL=true -DBLAZERT_BUILD_EXAMPLES:BOOL=true -DBLAZERT_WARNINGS_AS_ERRORS:BOOL=false -DBLAZERT_EXAMPLES_WARNINGS_AS_ERRORS:BOOL=false -DBLAZERT_ENABLE_OMP:BOOL=false -DBLAZE_INCLUDE_OVERRIDE:STRING=${BLAZE_INCLUDE} -Dnlohmann_json_DIR=${NLOHMANN_JSON_INSTALL_DIR}/lib/cmake/nlohmann_json - name: Build working-directory: ${{github.workspace}}/build diff --git a/.github/workflows/run_tests_linux_warnings_as_errors.yml b/.github/workflows/run_tests_linux_warnings_as_errors.yml new file mode 100644 index 0000000..6e0f75e --- /dev/null +++ b/.github/workflows/run_tests_linux_warnings_as_errors.yml @@ -0,0 +1,109 @@ +name: ubuntu-latest_warnings-as-errors + +on: [pull_request, workflow_dispatch] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + BLAZE_INSTALL_DIR: ${{github.workspace}}/deps/blaze + BLAZE_INCLUDE: ${{github.workspace}}/deps/blaze/include + NLOHMANN_JSON_INSTALL_DIR: ${{github.workspace}}/deps/nlohmann-json + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-latest + + strategy: + matrix: + compiler: [g++, clang++] + steps: + + - name: initialize repository + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Get CPU information + run: cat /proc/cpuinfo + + - name: wget + uses: wei/wget@v1 + with: + args: https://bitbucket.org/blaze-lib/blaze/downloads/blaze-3.8.tar.gz + + - name: untar blaze + run: | + tar -xf blaze-3.8.tar.gz; + mkdir -p deps/blaze +# + - name: Configure CMake blaze + # Use a bash shell so we can use the same syntax for environment variable + # access regardless of the host operating system + shell: bash + working-directory: ${{github.workspace}}/blaze-3.8 + # Note the current convention is to use the -S and -B options here to specify source + # and build directories, but this is only available with CMake 3.13 and higher. + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 + run: cmake . -DCMAKE_INSTALL_PREFIX=${BLAZE_INSTALL_DIR} #${{github.workspace}}/deps/blaze; + + - name: Install blaze + working-directory: ${{github.workspace}}/blaze-3.8 + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: cmake --build . --config ${BUILD_TYPE} -- install + + - name: wget + uses: wei/wget@v1 + with: + args: https://github.com/nlohmann/json/archive/v3.9.1.tar.gz + + - name: untar nlohmann-json + run: | + tar -xf v3.9.1.tar.gz; + mkdir -p deps/nlohmann-json + + - name: Configure CMake nlohmann-json + shell: bash + working-directory: ${{github.workspace}}/json-3.9.1 + run: cmake . -DCMAKE_INSTALL_PREFIX=${NLOHMANN_JSON_INSTALL_DIR} -DJSON_BuildTests=OFF + + - name: Install nlohmann-json + working-directory: ${{github.workspace}}/json-3.9.1 + shell: bash + run: cmake --build . --config ${BUILD_TYPE} -- install + + - name: Create Build Environment + # Some projects don't allow in-source building, so create a separate build directory + # We'll use this as our working directory for all subsequent commands + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Configure CMake + # Use a bash shell so we can use the same syntax for environment variable + # access regardless of the host operating system + shell: bash + working-directory: ${{github.workspace}}/build + env: + CXX: ${{matrix.compiler}} + # Note the current convention is to use the -S and -B options here to specify source + # and build directories, but this is only available with CMake 3.13 and higher. + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DBLAZERT_BUILD_TEST:BOOL=true -DBLAZERT_BUILD_EXAMPLES:BOOL=true -DBLAZERT_WARNINGS_AS_ERRORS:BOOL=true -DBLAZERT_EXAMPLES_WARNINGS_AS_ERRORS:BOOL=false -DBLAZERT_ENABLE_OMP:BOOL=false -DBLAZE_INCLUDE_OVERRIDE:STRING=${BLAZE_INCLUDE} -Dnlohmann_json_DIR=${NLOHMANN_JSON_INSTALL_DIR}/lib/cmake/nlohmann_json + + - name: Build + working-directory: ${{github.workspace}}/build + shell: bash + env: + CXX: ${{matrix.compiler}} + # Execute the build. You can specify a specific target with "--target " + run: cmake --build . --config ${BUILD_TYPE} + + - name: Test + working-directory: ${{github.workspace}}/build + shell: bash + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest --progress -VV -C ${BUILD_TYPE}