diff --git a/.github/workflows/linux-build-clang.yml b/.github/workflows/linux-build-clang.yml new file mode 100644 index 0000000000000..8f0bc32a585ee --- /dev/null +++ b/.github/workflows/linux-build-clang.yml @@ -0,0 +1,53 @@ +# 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: Linux Build using Clang + +on: + push: + branches: + - "main" + paths: + - "velox/**" + - "!velox/docs/**" + - "CMakeLists.txt" + - "CMake/**" + - "third_party/**" + - "scripts/setup-ubuntu.sh" + - "scripts/setup-helper-functions.sh" + - ".github/workflows/linux-build.yml" + + pull_request: + paths: + - "velox/**" + - "!velox/docs/**" + - "CMakeLists.txt" + - "CMake/**" + - "third_party/**" + - "scripts/setup-ubuntu.sh" + - "scripts/setup-helper-functions.sh" + - ".github/workflows/linux-build.yml" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + ubuntu-clang: + uses: linux-build.yaml + with: + use-clang: 'true' diff --git a/.github/workflows/linux-build-gcc.yml b/.github/workflows/linux-build-gcc.yml new file mode 100644 index 0000000000000..ec0fc35ae125d --- /dev/null +++ b/.github/workflows/linux-build-gcc.yml @@ -0,0 +1,51 @@ +# 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: Linux Build using GCC + +on: + push: + branches: + - "main" + paths: + - "velox/**" + - "!velox/docs/**" + - "CMakeLists.txt" + - "CMake/**" + - "third_party/**" + - "scripts/setup-ubuntu.sh" + - "scripts/setup-helper-functions.sh" + - ".github/workflows/linux-build.yml" + + pull_request: + paths: + - "velox/**" + - "!velox/docs/**" + - "CMakeLists.txt" + - "CMake/**" + - "third_party/**" + - "scripts/setup-ubuntu.sh" + - "scripts/setup-helper-functions.sh" + - ".github/workflows/linux-build.yml" + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }} + cancel-in-progress: true + +jobs: + ubuntu-gcc: + uses: linux-build.yaml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index f2db425f37e17..f82456a244a45 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -15,36 +15,13 @@ name: Linux Build on: - push: - branches: - - "main" - paths: - - "velox/**" - - "!velox/docs/**" - - "CMakeLists.txt" - - "CMake/**" - - "third_party/**" - - "scripts/setup-ubuntu.sh" - - "scripts/setup-helper-functions.sh" - - ".github/workflows/linux-build.yml" - - pull_request: - paths: - - "velox/**" - - "!velox/docs/**" - - "CMakeLists.txt" - - "CMake/**" - - "third_party/**" - - "scripts/setup-ubuntu.sh" - - "scripts/setup-helper-functions.sh" - - ".github/workflows/linux-build.yml" - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.repository }}-${{ github.head_ref || github.sha }} - cancel-in-progress: true + workflow_call: + inputs: + use-clang: + description: 'Use Clang to compile the project.' + default: '' + required: false + type: string jobs: adapters: @@ -64,6 +41,7 @@ jobs: xsimd_SOURCE: BUNDLED Arrow_SOURCE: AUTO CUDA_VERSION: "12.4" + USE_CLANG: "${{ inputs.use-clang }}" steps: - uses: actions/checkout@v4 @@ -136,6 +114,7 @@ jobs: name: "Ubuntu debug with resolve_dependency" env: CCACHE_DIR: "${{ github.workspace }}/.ccache" + USE_CLANG: "${{ inputs.use-clang }}" defaults: run: shell: bash @@ -171,7 +150,7 @@ jobs: MAKEFLAGS: "NUM_THREADS=8 MAX_HIGH_MEM_JOBS=4 MAX_LINK_JOBS=3" EXTRA_CMAKE_FLAGS: "-DVELOX_ENABLE_ARROW=ON -DVELOX_ENABLE_PARQUET=ON" run: | - make debug + make debug - name: CCache after run: |