daily-builds #221
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 ${{ 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/[email protected] | |
- 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 ok_backend dfly_core_test dconv_project | |
ninja search_parser_test | |
ninja dragonfly | |
./search_parser_test |