Skip to content

build-redpanda

build-redpanda #60

# Copyright 2023 Redpanda Data, Inc.
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.md
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0
name: build-redpanda
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1-5'
jobs:
build:
if: github.event.pull_request.draft == false
name: build redpanda
runs-on: ubuntu-latest-64
timeout-minutes: 30
strategy:
matrix:
os: ["ubuntu:mantic", "fedora:38"]
container:
image: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: dependencies
run: ./install-dependencies.sh
- name: cache directory
run: mkdir /mnt/ccache
- name: get timestamp
run: |
echo "TIMESTAMP=$(date --utc --iso-8601=seconds)" >> $GITHUB_OUTPUT
id: timestamp
- name: ccache
uses: actions/cache@v3
with:
path: /mnt/ccache
key: ${{ github.job }}-${{ matrix.os }}-${{ steps.timestamp.outputs.TIMESTAMP }}
restore-keys: |
${{ github.job }}-${{ matrix.os }}-
- name: update path
run: |
echo "/usr/lib/ccache" >> $GITHUB_PATH
echo "/usr/lib64/ccache" >> $GITHUB_PATH
- name: configure
env:
CCACHE_DIR: /mnt/ccache
run: cmake --preset release-ci
- name: build
env:
CCACHE_DIR: /mnt/ccache
CCACHE_COMPRESSLEVEL: 6
run: cmake --build --preset release-ci
- name: trim cache
env:
CCACHE_DIR: /mnt/ccache
CCACHE_MAXSIZE: 300M
run: ccache -c