-<?=PRE?> - name: Generate build tree (${{ env.CMAKE_CONFIG_TYPE }})
-<?=PRE?> run: cmake -S . -B build
-<?=PRE?> - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
-<?=PRE?> run: make -C build -j2 all
-<?=PRE?> - name: Test
-<?=PRE?> run: make -C build -j2 test
-<?=PRE?> - name: Install
-<?=PRE?> run: make -C build -j2 install DESTDIR=.
-<?=PRE?> - name: Failed tests log
-<?=PRE?> if: ${{ failure() }}
-<?=PRE?> run: cat build/Testing/Temporary/LastTest.log || true
+ - name: Generate build tree (${{ env.CMAKE_BUILD_TYPE }})
+ run: cmake -S . -B build
+ - name: Build all with ${{ env.CXX }} ${{ env.CXXFLAGS }}
+ run: cmake --build build -j2
+ - name: Test
+ run: cmake --build build -j2 --target test
+ - name: Install
+ run: cmake --build build -j2 --target install -- DESTDIR=/tmp
+ - name: Failed tests log
+ if: ${{ failure() }}
+ run: cat build/Testing/Temporary/LastTest.log || true
+<?php
+}
+
+function steps_package() {
+?>
+ - name: Package
+ env:
+ PUSH_ARTIFACTS_ID: ${{ secrets.PUSH_ARTIFACTS_ID }}
+ if: env.OS_VND!='Windows' && env.CC_VER=='cur' && env.CMAKE_BUILD_TYPE=='Release'
+ run: |
+ cmake -DENABLE_SASL=ON -DBUILD_DOCS_MANGZ=ON -S . -B build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake -DCPACK_COMPONENT_INSTALL=ON build
+ cmake --build build -j2 --target package -- VERBOSE=
+ cmake --build build -j2 --target push-artifacts -- VERBOSE=
+<?php
+}
+
+function steps_notify() {
+?>
+ - 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}})"