Skip to content

split into matrix

split into matrix #34

Workflow file for this run

# Copyright (c) Facebook, Inc. and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Multi-Stage Linux Build
on:
push:
paths:
- "velox/**"
- "!velox/docs/**"
- "CMakeLists.txt"
- "CMake/**"
- "third_party/**"
- ".github/workflows/linux-build.yml"
pull_request:
paths:
- "velox/**"
- "!velox/docs/**"
- "CMakeLists.txt"
- "CMake/**"
- "third_party/**"
- ".github/workflows/linux-build.yml"
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.runner }}
container: ghcr.io/facebookincubator/velox-dev:circleci-avx
name: "Linux ${{ matrix.scope.name }} ${{ matrix.type }} Build on ${{ matrix.runner }}"
strategy:
fail-fast: false
matrix:
scope:
- { name: "minimal", flags: "VELOX_BUILD_MINIMAL=ON VELOX_BUILD_TESTING=OFF" }
- { name: "default", flags: "" }
type: ["release", "debug"]
runner: ["8-core"]
env:
CC: /opt/rh/gcc-toolset-9/root/bin/gcc
CXX: /opt/rh/gcc-toolset-9/root/bin/g++
CCACHE_DIR: "${{ github.workspace }}/.ccache"
CCACHE_BASEDIR: "${{ github.workspace }}"
MAKEFLAGS: 'NUM_THREADS=8 MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=4'
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: Install gh
run: |
dnf install -y -q 'dnf-command(config-manager)'
dnf config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo
dnf install -y -q gh jq python39
alternatives --remove python3 /usr/bin/python3.6
git config --global --add safe.directory /__w/velox/velox
- uses: assignUser/stash/restore@main
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-linux-${{ matrix.scope.name }}-${{ matrix.type }}
- run: |
mkdir -p .ccache
- name: CCache before
run: |
ccache -s
- name: Build
run: |
du -sh .
ccache -s
make ${{ matrix.scope.flags }} '${{ matrix.type }}'
du -sh .
- name: CCache after
run: |
ccache -s
- uses: assignUser/stash/save@main
with:
path: '${{ env.CCACHE_DIR }}'
key: ccache-linux-${{ matrix.scope.name }}-${{ matrix.type }}
- name: Run Tests
if: ${{ matrix.scope.name != 'minimal' }}
run: |
cd _build/${{ matrix.type }} && ctest -j 8 --output-on-failure