-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexander Indenbaum <[email protected]>
- Loading branch information
Alexander Indenbaum
committed
Nov 19, 2024
1 parent
c5eacfc
commit c114adf
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
name: "Containerized CEPH build" | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
branches: | ||
- '*' | ||
pull_request: | ||
branches: | ||
- main | ||
# Credit: https://stackoverflow.com/a/72408109 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
env: | ||
BUILD_ARTIFACT: build.tar.bz2 | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 480 # Set timeout to 8 hours | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Build ceph in centos9 stream container | ||
run: | | ||
docker run --rm -v "$(pwd):/src" -w /src quay.io/centos/centos:stream9 /bin/bash -c "./do_containerized_build.sh" | ||
- name: Save ceph build | ||
run: | | ||
tar -cjf ${{ env.BUILD_ARTIFACT }} -C ./build . | ||
- name: Upload ceph build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ceph_build | ||
path: | | ||
${{ env.BUILD_ARTIFACT }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh -ex | ||
|
||
# This script is intended to run within centos-9 container | ||
# image name: quay.io/centos/centos:stream9 | ||
# docker run --rm -v "$(pwd):/src" -w /src quay.io/centos/centos:stream9 /bin/bash -c "./do_containerized_build.sh" | ||
# Based on https://docs.ceph.com/en/reef/install/build-ceph/#:~:text=You%20can%20get%20Ceph%20software,packages%20and%20install%20the%20packages. | ||
|
||
|
||
# Before you can build Ceph source code, you need to install several libraries and tools: | ||
./install-deps.sh | ||
|
||
# The container root ownership issue | ||
#fatal: detected dubious ownership in repository at '/src' | ||
# To add an exception for this directory, call: | ||
git config --global --add safe.directory /src | ||
|
||
# Ceph is built using cmake. | ||
./do_cmake.sh | ||
cd build | ||
ninja | ||
|
||
# return the ownership to the user | ||
#sudo chown -R $(id -u):$(id -g) . |