1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
dragonflydb-dragonfly/.github/workflows/daily-sanitizers.yml

98 lines
2.9 KiB
YAML
Raw Normal View History

name: daily-sanitizers
on:
schedule:
- cron: '0 4 * * *' # run at 4 AM UTC
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, linux, ARM64]
strategy:
matrix:
container: ["ubuntu-dev:22"]
build-type: [Debug]
compiler: [{ cxx: g++, c: gcc }]
cxx_flags: ["-Werror"]
timeout-minutes: 45
env:
SCCACHE_GHA_ENABLED: "true"
SCCACHE_CACHE_SIZE: 6G
SCCACHE_ERROR_LOG: /tmp/sccache_log.txt
container:
image: ghcr.io/romange/${{ matrix.container }}
credentials:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.4
- name: Configure Cache Env
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
- name: Prepare Environment
run: |
uname -a
cmake --version
mkdir -p ${GITHUB_WORKSPACE}/build
echo "===================Before freeing up space ============================================"
df -h
rm -rf /hostroot/usr/share/dotnet
rm -rf /hostroot/usr/local/share/boost
rm -rf /hostroot/usr/local/lib/android
rm -rf /hostroot/opt/ghc
echo "===================After freeing up space ============================================"
df -h
- name: Configure & Build
run: |
echo "ulimit is"
ulimit -s
echo "-----------------------------"
echo "disk space is:"
df -h
echo "-----------------------------"
mkdir -p $GITHUB_WORKSPACE/build
cd $GITHUB_WORKSPACE/build
cmake .. \
-DCMAKE_BUILD_TYPE=Debug \
-GNinja \
-DCMAKE_C_COMPILER="${{matrix.compiler.c}}" \
-DCMAKE_CXX_COMPILER="${{matrix.compiler.cxx}}" \
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
-DCMAKE_CXX_FLAGS="${{matrix.cxx_flags}}" \
-DWITH_ASAN=ON \
-DWITH_USAN=ON
ninja src/all
- name: Test
run: |
cd $GITHUB_WORKSPACE/build
ctest -V -L DFLY
- name: Send notifications on failure
if: failure()
run: |
job_link="${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
message="Daily sanitizers failed.\\n The commit is: ${{github.sha}}.\\n Job Link: ${job_link}\\n"
curl -s \
-X POST \
-H 'Content-Type: application/json' \
'${{ inputs.gspace-secret }}' \
-d '{"text": "'"${message}"'"}'