Add nightly builds #2484
Workflow file for this run
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: Build Clio | |
on: | |
push: | |
branches: [master, release/*, develop] | |
pull_request: | |
branches: [master, release/*, develop] | |
workflow_dispatch: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run clang-format | |
uses: ./.github/actions/clang_format | |
build: | |
name: Build | |
needs: lint | |
strategy: | |
matrix: | |
include: | |
- os: "Linux" | |
container: | |
image: conanio/gcc11:1.61.0 | |
options: --user root | |
- os: "macOS" | |
runs-on: [self-hosted, "${{ matrix.os }}"] | |
container: ${{ matrix.container }} | |
steps: | |
- name: Set env variables for macOS | |
if: ${{ runner.os == 'macOS' }} | |
run: | | |
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV | |
echo "CONAN_USER_HOME=${{ github.workspace }}" >> $GITHUB_ENV | |
- name: Set env variables for Linux | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
echo "CCACHE_DIR=/root/.ccache" >> $GITHUB_ENV | |
echo "CONAN_USER_HOME=/root/" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Create directories | |
run: | | |
mkdir -p $CCACHE_DIR | |
mkdir -p $CONAN_USER_HOME/.conan | |
- name: Install packages and prepare platform | |
uses: ./.github/actions/install_packages | |
- name: Setup conan | |
uses: ./.github/actions/setup_conan | |
id: conan | |
- name: Restore cache | |
uses: ./.github/actions/restore_cache | |
id: restore_cache | |
with: | |
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan | |
ccache_dir: ${{ env.CCACHE_DIR }} | |
- name: Build Clio | |
uses: ./.github/actions/build_clio | |
with: | |
conan_profile: ${{ steps.conan.outputs.conan_profile }} | |
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }} | |
- name: Strip tests | |
run: strip build/clio_tests | |
- name: Upload clio_tests | |
uses: actions/upload-artifact@v3 | |
with: | |
name: clio_tests_${{ runner.os }} | |
path: build/clio_tests | |
- name: Save cache | |
uses: ./.github/actions/save_cache | |
with: | |
conan_dir: ${{ env.CONAN_USER_HOME }}/.conan | |
conan_hash: ${{ steps.restore_cache.outputs.conan_hash }} | |
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }} | |
ccache_dir: ${{ env.CCACHE_DIR }} | |
ccache_cache_hit: ${{ steps.restore_cache.outputs.ccache_cache_hit }} | |
test: | |
needs: build | |
strategy: | |
matrix: | |
include: | |
- os: "Linux" | |
container: | |
image: conanio/gcc11:1.61.0 | |
options: --user root | |
- os: "macOS" | |
runs-on: [self-hosted, "${{ matrix.os }}"] | |
container: ${{ matrix.container }} | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: clio_tests_${{ runner.os }} | |
- name: Run clio_tests | |
run: | | |
chmod +x ./clio_tests | |
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*" |