remove lsb_release from cmake as a required dependency #9
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 and cpack | |
on: [ push, pull_request ] | |
jobs: | |
ubuntu-22-04: | |
runs-on: ubuntu-latest | |
name: Build on ${{ matrix.container }} x86_64 | |
strategy: | |
# | |
# matrix for containers | |
# | |
matrix: | |
container: | |
- ubuntu:latest | |
- debian:latest | |
- fedora:latest | |
# - alt:sisyphus | |
container: | |
image: ${{ matrix.container }} | |
steps: | |
- name: Get current date | |
id: date | |
run: echo "date=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_OUTPUT | |
- name: Get commit sha | |
id: git_sha | |
run: echo "git_sha=$(echo $GITHUB_SHA)" >> $GITHUB_OUTPUT | |
- uses: actions/checkout@v4 | |
# install dependencies | |
- name: devel-pkgs | |
run: | | |
case "${{ matrix.container }}" in | |
ubuntu*|debian*) | |
apt-get update -y && apt-get install -yq binutils git make cmake catch2 gcc g++ lsb-release | |
;; | |
fedora*) | |
yum update -y && yum install -yq binutils git make cmake catch2-devel gcc gcc-c++ rpm-build redhat-lsb | |
;; | |
alt*) | |
apt-get update -y && apt-get install -yq binutils git make cmake ctest catch2-devel gcc gcc-c++ rpm-build lsb-release | |
;; | |
esac | |
# build project | |
- name: mkdir | |
run: mkdir cmake-build-release | |
- name: cmake cmake-build-release | |
run: cmake -DCOMMITTER_DATE="${{ steps.date.outputs.date }}" -DCOMMITTER_FULLSHA="${{ steps.git_sha.outputs.git_sha }}" -DCOMMITTER_SHORTSHA="$(echo ${{ steps.git_sha.outputs.git_sha }} | cut -c1-7)" -DCMAKE_BUILD_TYPE=Release -Bcmake-build-release -H. | |
- name: cmake make | |
run: cmake --build cmake-build-release/ --target all --parallel | |
- name: get-version | |
id: get-version | |
run: echo "prj_ver=$(cat ./VERSION.txt)" >> $GITHUB_OUTPUT | |
- name: ctest | |
run: cd cmake-build-release && ctest && cd .. | |
- name: cpack | |
run: | | |
case "${{ matrix.container }}" in | |
ubuntu*|debian*) | |
cd cmake-build-release && cpack -G DEB && cd .. | |
;; | |
fedora*) | |
cd cmake-build-release && cpack -G RPM && cd .. | |
;; | |
alt*) | |
cd cmake-build-release && echo "%_allow_root_build 1" > /etc/rpm/macros.d/02-enable-build-root && cpack -G RPM && cd .. | |
;; | |
esac | |
- uses: mad9000/actions-find-and-replace-string@3 | |
id: container | |
with: | |
source: ${{ matrix.container }} | |
find: ':' # we want to remove : from container name | |
replace: '-' # and replace it with - | |
- name: Upload BTree binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ format('BTree-{0}.{1}', steps.get-version.outputs.prj_ver, steps.container.outputs.value) }} | |
path: cmake-build-release/${{ format('BTree-{0}-noarch.???', steps.get-version.outputs.prj_ver) }} | |
avx512f-gcc-cmake: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: sudo apt-get update -y && sudo apt-get install -yq binutils git make cmake catch2 gcc g++ lsb-release | |
- name: mkdir | |
run: mkdir cmake-build-release | |
- name: cmake cmake-build-release | |
run: cmake -DFORCE_USE_SIMD=ON -DCMAKE_BUILD_TYPE=Release -Bcmake-build-release -H. | |
- name: cmake make | |
run: cmake --build cmake-build-release/ --target all --parallel | |
- name: sde-test | |
uses: petarpetrovt/[email protected] | |
- name: test | |
run: cp cmake-build-release/fc_tests ${SDE_PATH} && cd ${SDE_PATH} && ./sde64 -knl -- ./fc_tests --benchmark-samples=1 | |
macos-clang-cmake: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: brew install git ninja cmake catch2 | |
- name: mkdir | |
run: mkdir cmake-build-release | |
- name: cmake cmake-build-release | |
run: cmake -DFORCE_PREFER_BINARY_SEARCH=ON -DCMAKE_BUILD_TYPE=Release -Bcmake-build-release -H. | |
- name: cmake make | |
run: cmake --build cmake-build-release/ --target all --parallel | |
- name: test | |
run: cd cmake-build-release && ctest && cd .. |