mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2024-12-15 17:51:06 +00:00
82050248b0
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
102 lines
2.9 KiB
YAML
102 lines
2.9 KiB
YAML
name: daily-builds
|
|
|
|
on:
|
|
# TODO: Remove this. This is for testing
|
|
schedule:
|
|
- cron: '0 6 * * *' # run at 6 AM UTC
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
# The CMake configure and build commands are platform agnostic and should work equally
|
|
# well on Windows or Mac. You can convert this to a matrix build if you need
|
|
# cross-platform coverage.
|
|
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
|
runs-on: ubuntu-latest
|
|
name: Build ${{ matrix.name }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
# Build with these flags
|
|
- name: generic
|
|
container: alpine-dev
|
|
flags: "-DMARCH_OPT=-march=x86-64"
|
|
- name: fedora
|
|
container: fedora:30
|
|
|
|
timeout-minutes: 45
|
|
|
|
container:
|
|
image: ghcr.io/romange/${{ matrix.container }}
|
|
credentials:
|
|
username: ${{ github.repository_owner }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- name: Run sccache-cache
|
|
uses: mozilla-actions/sccache-action@v0.0.3
|
|
|
|
- name: Configure Cache Env
|
|
uses: actions/github-script@v6
|
|
with:
|
|
script: |
|
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cmake --version
|
|
mkdir -p $GITHUB_WORKSPACE/build
|
|
- name: Install packages
|
|
if: matrix.container == 'fedora:30'
|
|
run: |
|
|
echo Passed
|
|
|
|
- name: Configure & Build
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \
|
|
${{ matrix.flags }}
|
|
ninja src/all
|
|
- name: Test
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/build
|
|
ctest -V -L DFLY
|
|
|
|
build-macos:
|
|
runs-on: macos-latest
|
|
timeout-minutes: 45
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
- name: Install dependencies
|
|
run: |
|
|
brew update && brew install ninja boost openssl automake gcc zstd bison c-ares \
|
|
autoconf libtool automake
|
|
# brew info icu4c
|
|
mkdir -p $GITHUB_WORKSPACE/build
|
|
|
|
- name: Configure & Build
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/build
|
|
|
|
export PATH=/usr/local/opt/bison/bin:$PATH
|
|
which gcc
|
|
which gcc-13
|
|
|
|
bison --version
|
|
|
|
|
|
echo "*************************** START BUILDING **************************************"
|
|
CC=gcc-13 CXX=g++-13 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF
|
|
|
|
ninja src/all
|
|
|
|
- name: Test
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/build
|
|
ctest -V -L DFLY
|