core: drop SetUTF8Locale #2848
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 Artifacts (RPM) | |
on: | |
workflow_dispatch: | |
inputs: | |
logLevel: | |
description: 'Log level' | |
required: true | |
default: 'warning' | |
type: choice | |
options: | |
- info | |
- warning | |
- debug | |
tags: | |
description: 'Test scenario tags' | |
required: false | |
type: boolean | |
pull_request: | |
branches: [master, develop] | |
paths-ignore: | |
- '**/*.md' | |
- '.circleci/**' | |
- '.cirrus.yml' | |
push: | |
branches: [master, develop] | |
paths-ignore: | |
- '**/*.md' | |
- '.circleci/**' | |
- '.cirrus.yml' | |
release: | |
types: [published] | |
schedule: | |
- cron: '0 16 * * *' | |
concurrency: | |
group: ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }} | |
cancel-in-progress: ${{ startsWith(github.event_name, 'pull') }} | |
env: | |
CACHE_EPOCH: 125-1 | |
GOPROXY: direct | |
jobs: | |
docker_publish: | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- 'centos7' | |
- 'centos8' | |
- 'fedora38' | |
- 'alpine319' | |
- 'opensuse15' | |
# - 'centos9' | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache docker files (dummy) | |
id: docker-cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
docker/dummy | |
key: ${{ runner.os }}-docker-${{ matrix.container }}-${{ hashFiles(format('docker/{0}.Dockerfile', matrix.container)) }}-v1 | |
- name: Login to GitHub Container Registry | |
if: ${{ steps.docker-cache.outputs.cache-hit != 'true' }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Docker Image | |
if: ${{ steps.docker-cache.outputs.cache-hit != 'true' }} | |
run: | | |
cd docker | |
docker build --cache-from ghcr.io/chilledheart/${{ matrix.container }} \ | |
-f ${{ matrix.container }}.Dockerfile \ | |
-t ghcr.io/chilledheart/${{ matrix.container }} \ | |
. | |
- name: Push Docker Image | |
if: ${{ steps.docker-cache.outputs.cache-hit != 'true' }} | |
run: | | |
docker push --all-tags ghcr.io/chilledheart/${{ matrix.container }} | |
rpm-release: | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- 'centos7' | |
- 'centos8' | |
- 'fedora38' | |
- 'opensuse15' | |
# - 'centos9' | |
runs-on: ubuntu-22.04 | |
needs: docker_publish | |
container: | |
image: 'ghcr.io/chilledheart/${{ matrix.container }}' | |
env: | |
DISTRO: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Checkout with shallow submodules | |
run: | | |
# ignore annoying failures | |
git config --global --add safe.directory "$PWD" | |
# unshallow must come first otherwise submodule may be get unshallowed | |
git fetch --tags --unshallow | |
git submodule update --init --depth 1 | |
- name: Cache clang | |
id: clang-cache | |
uses: actions/cache@v4 | |
if: ${{ env.DISTRO != 'centos7' }} | |
with: | |
path: | | |
third_party/llvm-build/Release+Asserts | |
key: ${{ runner.os }}-toolchain-${{ hashFiles('CLANG_REVISION') }}-v${{ env.CACHE_EPOCH }} | |
- name: Cache clang (el7) | |
id: clang-cache-el7 | |
uses: actions/cache@v3 | |
if: ${{ env.DISTRO == 'centos7' }} | |
with: | |
path: | | |
third_party/llvm-build/Release+Asserts | |
key: ${{ runner.os }}-toolchain-el7-${{ hashFiles('CLANG_REVISION') }}-v${{ env.CACHE_EPOCH }} | |
- name: Cache golang | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-docker-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-docker- | |
- name: "Install dependency: prebuilt clang and clang-tidy binaries" | |
if: ${{ steps.clang-cache.outputs.cache-hit != 'true' && env.DISTRO != 'centos7' }} | |
run: | | |
./scripts/download-clang-prebuilt-binaries.py | |
rm -f third_party/llvm-build/Release+Asserts/*.tgz | |
- name: "Install dependency: prebuilt clang and clang-tidy binaries (el7 patch)" | |
if: ${{ steps.clang-cache-el7.outputs.cache-hit != 'true' && env.DISTRO == 'centos7' }} | |
run: | | |
./scripts/download-clang-prebuilt-binaries.py | |
rm -f third_party/llvm-build/Release+Asserts/*.tgz | |
./scripts/libstdc++-el7.sh | |
- name: Set clang environment (centos and opensuse only) | |
if: ${{ env.DISTRO == 'centos7' || env.DISTRO == 'centos8' || env.DISTRO == 'centos9' || env.DISTRO == 'opensuse15' }} | |
run: | | |
echo "CC=${{ github.workspace }}/third_party/llvm-build/Release+Asserts/bin/clang" >> $GITHUB_ENV | |
echo "CXX=${{ github.workspace }}/third_party/llvm-build/Release+Asserts/bin/clang++" >> $GITHUB_ENV | |
- name: Set LTO environment | |
if: ${{ env.DISTRO == 'centos7' }} | |
run: | | |
# newer ld.lld doesn't work on glibc 2.17 | |
echo "DISABLE_LLD=1" >> $GITHUB_ENV | |
- name: Build RPM packages | |
run: | | |
./scripts/build-rpm.sh | |
- name: Upload dist tarball (including debuginfo) | |
if: ${{ github.event_name == 'release' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload --clobber ${{ github.event.release.tag_name }} yass*.rpm | |
musl-release: | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
- 'alpine319' | |
runs-on: ubuntu-22.04 | |
needs: docker_publish | |
container: | |
image: 'ghcr.io/chilledheart/${{ matrix.container }}' | |
env: | |
DISTRO: ${{ matrix.container }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout with shallow submodules | |
run: | | |
# ignore annoying failures | |
git config --global --add safe.directory "$PWD" | |
# unshallow must come first otherwise submodule may be get unshallowed | |
git fetch --tags --unshallow | |
git submodule update --init --depth 1 | |
- name: Cache golang | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cache/go-build | |
~/go/pkg/mod | |
key: ${{ runner.os }}-go-docker-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go-docker- | |
- name: Build build tool | |
run: | | |
cd tools | |
go build | |
- name: Build TGZ packages | |
run: | | |
export CC=clang | |
export CXX=clang++ | |
./tools/build --arch amd64 --system linux --subsystem musl -build-benchmark -build-test \ | |
--cmake-build-type MinSizeRel | |
- name: Run tests (amd64) | |
run: | | |
./build-linux-musl-amd64/yass_test | |
./build-linux-musl-amd64/yass_benchmark | |
- name: Upload dist tarball (including debuginfo) | |
if: ${{ github.event_name == 'release' }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ github.event.release.tag_name }} yass*.tgz | |
- name: Cleanup before Cache callbacks | |
run: | | |
rm -rf build-* | |