daily-builds #176
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 with ${{ matrix.flags }} flags | |
strategy: | |
matrix: | |
# Build with these flags | |
flags: ["-DMARCH_OPT=-march=x86-64"] | |
timeout-minutes: 45 | |
container: | |
image: ghcr.io/romange/alpine-dev:latest | |
credentials: | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install NodeJs | |
run: | | |
apk add --no-cache nodejs npm yarn | |
node --version | |
npm --version | |
yarn --version | |
- name: Install dependencies | |
run: | | |
uname -a | |
cmake --version | |
mkdir -p ${{github.workspace}}/build | |
- name: Cache build deps | |
id: cache-deps | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.ccache | |
${{github.workspace}}/build/_deps | |
key: ${{ runner.os }}-deps-${{ github.base_ref }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-deps-${{ github.base_ref }}- | |
- name: Configure CMake | |
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | |
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | |
run: | | |
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache ${{ matrix.flags }} | |
cd ${{github.workspace}}/build && pwd | |
du -hcs _deps/ | |
- name: Build & Run | |
run: | | |
cd ${{github.workspace}}/build | |
ninja src/all | |
ccache --show-stats | |
./dragonfly --alsologtostderr --default_lua_flags=allow-undeclared-keys & | |
- name: Clone and build BullMQ | |
run: | | |
cd ${{github.workspace}} | |
git clone https://github.com/taskforcesh/bullmq.git | |
cd bullmq | |
yarn install --ignore-engines --frozen-lockfile --non-interactive | |
yarn build | |
- name: Test BullMQ with dragonfly | |
run: | | |
cd ${{github.workspace}}/bullmq | |
# yarn test -i -g "should process delayed jobs with several workers respecting delay" |