X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=.github%2Fworkflows%2Fcmake-build-ci.gen;h=1c758836eca17c9ee28e1d5806b4974fedb1c2fb;hb=aeac01630eed825d8a624e7fd7c107d47bb2e40c;hp=2438347cbecfa225ba55b757b7f0a1ab1d0073ae;hpb=75c622741ec3e8ad742daaa98431719d6c2c55f2;p=m6w6%2Flibmemcached diff --git a/.github/workflows/cmake-build-ci.gen b/.github/workflows/cmake-build-ci.gen index 2438347c..1c758836 100755 --- a/.github/workflows/cmake-build-ci.gen +++ b/.github/workflows/cmake-build-ci.gen @@ -6,8 +6,10 @@ echo "# Generated file; do not edit!\n"; const DEF = [ "os" => "Linux", "Linux" => "ubuntu-20.04", + "Windows" => "windows-2019", "macOS" => "macos-10.15", "ubuntu-20.04" => "gnu", + "windows-2019" => "msvc", "macos-10.15" => "clang", "gnu" => [ "ver" => "cur", @@ -19,6 +21,11 @@ const DEF = [ "CC" => "clang", "CXX" => "clang++", ], + "msvc" => [ // dummy + "ver" => "cur", + "CC" => "msvc", + "CXX" => "msvc", + ], ]; const ENV = [ "ubuntu-20.04" => [ @@ -74,7 +81,16 @@ const MAP = [ ] ] ] - ] + ], + "windows-2019" => [ + 'env.CC_VND' => [ + "msvc" => [ + 'env.CC_VER' => [ + "cur" => "2019", + ], + ], + ], + ], ] ]; @@ -123,6 +139,7 @@ function steps_getdeps() { sudo apt-get install \ libevent-dev \ libsasl2-dev \ + libtbb-dev \ ${INSTALL_MEMCACHED} \ ${INSTALL_CC} ${INSTALL_CXX} sudo systemctl stop memcached || true @@ -165,17 +182,37 @@ function steps_build() { - name: Test run: make -C build -j2 test - name: Install - run: make -C build -j2 install DESTDIR=. + run: make -C build -j2 install DESTDIR=/tmp - name: Failed tests log if: ${{ failure() }} run: cat build/Testing/Temporary/LastTest.log || true + - name: Notify Gitter (success) + if: ${{ success() }} + run: | + REF=$(basename ${GITHUB_REF}) + curl -sS "${{ secrets.GITTER }}" \ + --data-urlencode "level=info" \ + --data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [success](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})" + - name: Notify Gitter (failure) + if: ${{ failure() }} + run: | + REF=$(basename ${GITHUB_REF}) + curl -sS "${{ secrets.GITTER }}" \ + --data-urlencode "level=error" \ + --data-urlencode "message=Github [${GITHUB_REPOSITORY}](https://github.com/${GITHUB_REPOSITORY}/commits/${REF}) (${REF}) [failure](https://github.com/m6w6/libmemcached/actions/runs/${GITHUB_RUN_ID}) (${ImageOS}/${CC:-${CC_VND}-${CC_VER}})" + + - uses: codecov/codecov-action@v1.0.13 # sanitizer build dbg-san: @@ -242,26 +283,55 @@ jobs: - uses: actions/checkout@v2 - # coverage build - dbg-cov: - name: dbg-cov () + # thread sanitizer build + dbg-tsan: + name: dbg-tsan () runs-on: # env: - CFLAGS: -O0 --coverage - CXXFLAGS: -O0 --coverage + ENABLE_SANITIZERS: "thread" steps: - uses: actions/checkout@v2 - - uses: codecov/codecov-action@v1.0.13 # mac build dbg-mac: name: dbg-mac (, , ) runs-on: # + env: + CFLAGS: -O0 --coverage + CXXFLAGS: -O0 --coverage + OS_VND: macOS + OS_VER: # + CC_VND: # + CC_VER: # continue-on-error: true steps: - uses: actions/checkout@v2 + - uses: codecov/codecov-action@v1.0.13 + + # win build + win-msvc: + name: win-msvc (, , ) + runs-on: # + env: + CMAKE_BUILD_TYPE: Release + BUILD_TESTING: "OFF" + BISON_ROOT: "C:/msys64/usr" + FLEX_ROOT: "C:/msys64/usr" + OS_VND: Windows + OS_VER: # + CC_VND: # + CC_VER: # + continue-on-error: true + steps: + - uses: actions/checkout@v2 + - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }}) + run: cmake --config ${{ env.CMAKE_BUILD_TYPE }} -S . -B build + - name: Build all with ${{ env.CC_VND }} + run: cmake --build build --config ${{ env.CMAKE_BUILD_TYPE }} + - name: Install + run: cmake --install build --prefix installed --config ${{ env.CMAKE_BUILD_TYPE }} # release builds release: