diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..2d0b88f --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,66 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + type: [Debug, RelWithDebInfo, MinSizeRel, Release] + compiler: [default, clang, gcc] + exclude: + - {os: "windows-latest", compiler: "clang"} + - {os: "macOS-latest", compiler: "clang"} + - {os: "windows-latest", compiler: "gcc"} + - {os: "macOS-latest", compiler: "gcc"} + - {os: "ubuntu-latest", compiler: "default"} + - {os: "ubuntu-latest", compiler: "default"} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Setup dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get install -y gcc-10 g++-10 clang-10 + + - name: Configure CMake + shell: bash + if: matrix.compiler == 'default' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} + + - name: Configure CMake with GCC + shell: bash + if: matrix.compiler == 'gcc' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 + + - name: Configure CMake with Clang + shell: bash + if: matrix.compiler == 'clang' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 + + - name: Build + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config ${{ matrix.type }} + + - name: Test + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test + + - name: Test Whole Program Optimization + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test_wpo diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..2d0b88f --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,66 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + type: [Debug, RelWithDebInfo, MinSizeRel, Release] + compiler: [default, clang, gcc] + exclude: + - {os: "windows-latest", compiler: "clang"} + - {os: "macOS-latest", compiler: "clang"} + - {os: "windows-latest", compiler: "gcc"} + - {os: "macOS-latest", compiler: "gcc"} + - {os: "ubuntu-latest", compiler: "default"} + - {os: "ubuntu-latest", compiler: "default"} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Setup dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get install -y gcc-10 g++-10 clang-10 + + - name: Configure CMake + shell: bash + if: matrix.compiler == 'default' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} + + - name: Configure CMake with GCC + shell: bash + if: matrix.compiler == 'gcc' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 + + - name: Configure CMake with Clang + shell: bash + if: matrix.compiler == 'clang' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 + + - name: Build + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config ${{ matrix.type }} + + - name: Test + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test + + - name: Test Whole Program Optimization + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test_wpo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fb8499 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.DS_Store +build diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..2d0b88f --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,66 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + type: [Debug, RelWithDebInfo, MinSizeRel, Release] + compiler: [default, clang, gcc] + exclude: + - {os: "windows-latest", compiler: "clang"} + - {os: "macOS-latest", compiler: "clang"} + - {os: "windows-latest", compiler: "gcc"} + - {os: "macOS-latest", compiler: "gcc"} + - {os: "ubuntu-latest", compiler: "default"} + - {os: "ubuntu-latest", compiler: "default"} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Setup dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get install -y gcc-10 g++-10 clang-10 + + - name: Configure CMake + shell: bash + if: matrix.compiler == 'default' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} + + - name: Configure CMake with GCC + shell: bash + if: matrix.compiler == 'gcc' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 + + - name: Configure CMake with Clang + shell: bash + if: matrix.compiler == 'clang' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 + + - name: Build + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config ${{ matrix.type }} + + - name: Test + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test + + - name: Test Whole Program Optimization + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test_wpo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fb8499 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.DS_Store +build diff --git a/README.md b/README.md index b67fffa..6186b5b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # 🧪 utest.h +[![Actions Status](https://github.com/sheredom/utest.h/workflows/CMake/badge.svg)](https://github.com/sheredom/utest.h/actions) [![Build status](https://ci.appveyor.com/api/projects/status/i2u3a0pw4pxprrcv?svg=true)](https://ci.appveyor.com/project/sheredom/utest-h) [![Build Status](https://travis-ci.org/sheredom/utest.h.svg)](https://travis-ci.org/sheredom/utest.h) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..2d0b88f --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,66 @@ +name: CMake + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + type: [Debug, RelWithDebInfo, MinSizeRel, Release] + compiler: [default, clang, gcc] + exclude: + - {os: "windows-latest", compiler: "clang"} + - {os: "macOS-latest", compiler: "clang"} + - {os: "windows-latest", compiler: "gcc"} + - {os: "macOS-latest", compiler: "gcc"} + - {os: "ubuntu-latest", compiler: "default"} + - {os: "ubuntu-latest", compiler: "default"} + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Setup dependencies + if: startsWith(matrix.os, 'ubuntu') + run: sudo apt-get install -y gcc-10 g++-10 clang-10 + + - name: Configure CMake + shell: bash + if: matrix.compiler == 'default' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} + + - name: Configure CMake with GCC + shell: bash + if: matrix.compiler == 'gcc' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 + + - name: Configure CMake with Clang + shell: bash + if: matrix.compiler == 'clang' + working-directory: ${{github.workspace}}/build + run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang-10 -DCMAKE_CXX_COMPILER=clang++-10 + + - name: Build + working-directory: ${{github.workspace}}/build + shell: bash + run: cmake --build . --config ${{ matrix.type }} + + - name: Test + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test + + - name: Test Whole Program Optimization + working-directory: ${{github.workspace}}/build + shell: bash + run: if [ "${{ matrix.os }}" == "windows-latest" ]; then cd ${{ matrix.type }}; fi; ./utest_test_wpo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3fb8499 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.DS_Store +build diff --git a/README.md b/README.md index b67fffa..6186b5b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # 🧪 utest.h +[![Actions Status](https://github.com/sheredom/utest.h/workflows/CMake/badge.svg)](https://github.com/sheredom/utest.h/actions) [![Build status](https://ci.appveyor.com/api/projects/status/i2u3a0pw4pxprrcv?svg=true)](https://ci.appveyor.com/project/sheredom/utest-h) [![Build Status](https://travis-ci.org/sheredom/utest.h.svg)](https://travis-ci.org/sheredom/utest.h) diff --git a/appveyor.yml b/appveyor.yml index 269f39e..859bd06 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -13,8 +13,9 @@ - VSVERSION: Visual Studio 14 2015 - VSVERSION: Visual Studio 15 2017 APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - - VSVERSION: Visual Studio 16 2019 - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 + # VS 2019 is tested in GitHub Actions instead. + # - VSVERSION: Visual Studio 16 2019 + # APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019 platform: - Win32