forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflows: Consolidate tests to reduce the number of build jobs
Merge the llvm, clang, and libclc tests into a single job. This is the most sub-projects we can test at once without running out of disk space on the GitHub runners. Reviewed By: thieta Differential Revision: https://reviews.llvm.org/D120872
- Loading branch information
Showing
6 changed files
with
129 additions
and
154 deletions.
There are no files selected for viewing
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: LLVM Project Tests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
build_target: | ||
required: true | ||
type: string | ||
|
||
projects: | ||
required: true | ||
type: string | ||
|
||
concurrency: | ||
# Skip intermediate builds: always. | ||
# Cancel intermediate builds: only if it is a pull request build. | ||
# If the group name here is the same as the group name in the workflow that includes | ||
# this one, then the action will try to wait on itself and get stuck. | ||
group: llvm-project-${{ github.workflow }}-${{ inputs.projects}}${{ github.ref }} | ||
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | ||
|
||
env: | ||
# Workaround for build faliure on Mac OS X: llvm.org/PR46190, https://github.com/actions/virtual-environments/issues/2274 | ||
CPLUS_INCLUDE_PATH: /usr/local/opt/llvm/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include | ||
|
||
jobs: | ||
lit-tests: | ||
name: Lit Tests | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
# Use a specific version of macOS to ensure the CPLUS_INCLUDE_PATH workaround works. | ||
- macOS-10.15 | ||
steps: | ||
- name: Setup Windows | ||
if: startsWith(matrix.os, 'windows') | ||
uses: llvm/actions/setup-windows@main | ||
with: | ||
arch: amd64 | ||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@main | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 250 | ||
- name: Build and Test | ||
uses: llvm/actions/build-test-llvm-project@main | ||
with: | ||
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF' | ||
build_target: '${{ inputs.build_target }}' | ||
|
||
- name: Build and Test libclc | ||
if: "!startsWith(matrix.os, 'windows') && contains(inputs.projects, 'libclc')" | ||
run: | | ||
# Make sure all of LLVM libraries that llvm-config needs are built. | ||
ninja -C build | ||
cmake -G Ninja -S libclc -B libclc-build -DLLVM_CONFIG=`pwd`/build/bin/llvm-config -DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl" | ||
ninja -C libclc-build | ||
ninja -C libclc-build test |
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