diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml new file mode 100644 index 000000000..b31bde772 --- /dev/null +++ b/.github/workflows/linux.yml @@ -0,0 +1,37 @@ +name: Linux + +on: + pull_request: + push: + release: + types: published + +jobs: + linux: + runs-on: [ubuntu-latest] + strategy: + matrix: + pattern: + - 'pg docker gcc debug' + - 'pg docker gcc release' + - 'pg docker gcc test_external_project' + - 'pg docker clang debug' + - 'pg docker clang release' + - 'pg docker clang asan' + - 'pg docker clang ubsan' + - 'pg docker clang tsan' + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Install dependencies + run: | + sudo sed -i 's/azure\.//' /etc/apt/sources.list + sudo apt update + sudo apt install -y python3-setuptools + pip3 install --user docker-compose + + - name: Build OZO + shell: bash + run: | + scripts/build.sh ${{ matrix.pattern }} diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml new file mode 100644 index 000000000..a6502b79b --- /dev/null +++ b/.github/workflows/macos.yml @@ -0,0 +1,27 @@ +name: Mac OS X + +on: + pull_request: + push: + release: + types: published + +jobs: + macos: + runs-on: [macos-latest] + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Install dependencies + run: | + sudo chown -R $(whoami) $(brew --prefix)/* + brew unlink libpq + brew install --force boost postgresql || brew link --overwrite postgresql + + - name: Build OZO + env: + BOOSTROOT: /usr + shell: bash + run: | + scripts/build.sh clang debug diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt index f21e681f7..be2439db5 100644 --- a/benchmarks/CMakeLists.txt +++ b/benchmarks/CMakeLists.txt @@ -1,10 +1,3 @@ -find_program(CCACHE_FOUND ccache) - -if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) -endif() - add_executable(ozo_benchmark ozo_benchmark.cpp) target_link_libraries(ozo_benchmark ozo) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index c5c2fdb3f..465eea6e3 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,10 +1,3 @@ -find_program(CCACHE_FOUND ccache) - -if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) -endif() - add_executable(ozo_request request.cpp) target_link_libraries(ozo_request ozo) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3141832ce..3eaa619fd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,5 +1,3 @@ -find_program(CCACHE_FOUND ccache) - include(ExternalProject) ExternalProject_Add( GoogleTest @@ -83,11 +81,6 @@ target_link_libraries(ozo_tests gmock) target_link_libraries(ozo_tests ozo) add_test(ozo_tests ozo_tests) -if(CCACHE_FOUND) - set_target_properties(ozo_tests PROPERTIES RULE_LAUNCH_COMPILE ccache) - set_target_properties(ozo_tests PROPERTIES RULE_LAUNCH_LINK ccache) -endif() - # enable useful warnings and errors target_compile_options(ozo_tests PRIVATE -Wall -Wextra -pedantic -Werror)