daily-builds #384
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@v4 | |
with: | |
submodules: true | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- 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: 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-12 | |
timeout-minutes: 45 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
- 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: Install dependencies | |
run: | | |
brew uninstall --formula node kotlin harfbuzz sbt selenium-server imagemagick \ | |
gradle maven openjdk postgresql r ant [email protected] mongosh \ | |
node@18 php composer | |
# Preven updating these packages that bring in dependencies that sometimes break | |
# the update | |
brew pin azure-cli jpeg-xl aom lima pipx gcc | |
# Remove Python3 symlinks in /usr/local/bin as workaround to brew update issues | |
# https://github.com/actions/setup-python/issues/577 | |
rm /usr/local/bin/2to3* || : | |
rm /usr/local/bin/idle3* || : | |
rm /usr/local/bin/pydoc* || : | |
rm /usr/local/bin/python3* || : | |
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 \ | |
-DCMAKE_C_COMPILER_LAUNCHER=sccache | |
ninja src/all | |
- name: Test | |
run: | | |
cd $GITHUB_WORKSPACE/build | |
ctest -V -L DFLY |