| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- name: Build Template
- on:
- workflow_call:
- inputs:
- arch:
- required: false
- type: string
- default: x86_64
- DISTR:
- required: false
- type: string
- default: jammy
- CTEST_CMAKE_GENERATOR:
- required: false
- type: string
- default: Ninja
- CTEST_CONFIGURATION_TYPE:
- required: false
- type: string
- default: RelWithDebInfo
- WITH_COVERAGE:
- required: false
- type: number
- default: 0
- UNITY_BUILD:
- required: false
- type: number
- default: 1
- version:
- required: false
- type: string
- default: ""
- build_tag:
- required: false
- type: string
- default: ""
- cmake_command:
- required: false
- type: string
- default: "ctest -VV -S misc/ctest/gltest.cmake --no-compress-output"
- cache_key:
- required: false
- type: string
- default: build_linux_x86_64
- boost_url_key:
- required: false
- type: string
- default: boost_nov22
- sysroot_url_key:
- required: false
- type: string
- default: roots_nov22
- artifact_list:
- required: false
- type: string
- default: "build/xml build/CMakeFiles/CMake*.log build/api/libsphinxclient/testcli build/src/indexer build/src/indextool build/src/searchd build/src/tests build/src/gtests/gmanticoretest build/config/*.c build/config/*.h build/**/*.cxx build/**/*.gcno"
- artifact_name:
- required: false
- type: string
- HOMEBREW_PREFIX:
- required: false
- type: string
- default:
- PACK_GALERA:
- required: false
- type: number
- default: 0
- COLUMNAR_LOCATOR:
- required: false
- type: string
- default: ""
-
- jobs:
- build:
- runs-on: ubuntu-22.04
- defaults:
- run:
- shell: bash
- timeout-minutes: 30
- container:
- image: manticoresearch/external_toolchain:vcpkg331_20250114
- env:
- CACHEB: "../cache"
- DIAGNOSTIC: 1
- PACK_ICUDATA: 0
- NO_TESTS: 1
- DISTR: ${{ inputs.DISTR }}
- boost: ${{ inputs.boost_url_key }}
- sysroot: ${{ inputs.sysroot_url_key }}
- arch: ${{ inputs.arch }}
- CTEST_CMAKE_GENERATOR: ${{ inputs.CTEST_CMAKE_GENERATOR }}
- CTEST_CONFIGURATION_TYPE: ${{ inputs.CTEST_CONFIGURATION_TYPE }}
- WITH_COVERAGE: ${{ inputs.WITH_COVERAGE }}
- UNITY_BUILD: ${{ inputs.UNITY_BUILD }}
- SYSROOT_URL: https://repo.manticoresearch.com/repository/sysroots
- HOMEBREW_PREFIX: ${{ inputs.HOMEBREW_PREFIX }}
- PACK_GALERA: ${{ inputs.PACK_GALERA }}
- COLUMNAR_LOCATOR: ${{ inputs.COLUMNAR_LOCATOR }}
- BUILD_TAG: ${{ inputs.build_tag }}
- steps:
- - name: Checkout repository
- uses: actions/checkout@v3
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- set-safe-directory: true
- - name: Patch version
- if: inputs.version != ''
- run: |
- sed -i "s/0\.0\.0/${{ inputs.version }}/g" src/sphinxversion.h.in
- cat src/sphinxversion.h.in
- - name: Initialization
- run: | # without adding the safe.directory cmake fails to do git log -1 --date=short --format=%cd
- bash /sysroot/root/entry_point.sh
- git config --global --add safe.directory /__w/manticoresearch/manticoresearch
- git config --global core.abbrev 9
- - name: Set output artifact name
- id: artifact_name
- run: |
- USER_INPUT=${{ inputs.artifact_name }}
- echo "value=${USER_INPUT:-"build_${{ inputs.DISTR }}_${{ inputs.CTEST_CONFIGURATION_TYPE }}_${{ inputs.arch }}"}" >> "$GITHUB_OUTPUT"
- - name: Check out cache before building
- uses: actions/cache@v4
- with:
- path: cache
- enableCrossOsArchive: true
- key: ${{ inputs.cache_key }}
- - name: 🚀 Build
- run: |
- ${{ inputs.cmake_command }}
- - name: Upload build artifacts
- if: success()
- uses: manticoresoftware/upload_artifact_with_retries@v4
- with:
- name: ${{ steps.artifact_name.outputs.value }}
- path: ${{ inputs.artifact_list }}
|