-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[github] Update llvm-project-tests based on upstream changes.
- Loading branch information
Showing
1 changed file
with
51 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,12 @@ | ||
name: LLVM Project Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
build_target: | ||
required: false | ||
projects: | ||
required: false | ||
workflow_call: | ||
inputs: | ||
build_target: | ||
|
@@ -19,9 +25,15 @@ concurrency: | |
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/Cellar/llvm/14.0.6/include/c++/v1:/usr/local/Cellar/llvm@13/13.0.1/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include | ||
|
||
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/Cellar/llvm/14.0.6/include/c++/v1:/usr/local/Cellar/llvm@13/13.0.1/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include | ||
# Workaround for https://github.com/actions/virtual-environments/issues/5900. | ||
# This should be a no-op for non-mac OSes | ||
CPLUS_INCLUDE_PATH: /usr/local/Cellar/llvm/14.0.6_1/include/c++/v1:/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include | ||
# PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//11 | ||
|
||
jobs: | ||
lit-tests: | ||
|
@@ -32,9 +44,12 @@ jobs: | |
matrix: | ||
os: | ||
- ubuntu-latest | ||
# - windows-latest | ||
# Use a specific version of macOS to ensure the CPLUS_INCLUDE_PATH workaround works. | ||
- macOS-10.15 | ||
# # Use windows-2019 due to: | ||
# # https://developercommunity.visualstudio.com/t/Prev-Issue---with-__assume-isnan-/1597317 | ||
# - windows-2019 | ||
# We're using a specific version of macOS due to: | ||
# https://github.com/actions/virtual-environments/issues/5900 | ||
- macOS-11 | ||
steps: | ||
- name: Setup Windows | ||
if: startsWith(matrix.os, 'windows') | ||
|
@@ -44,16 +59,45 @@ jobs: | |
- name: Check macOS (for debugging) | ||
if: startsWith(matrix.os, 'macos') | ||
run: | | ||
ls /Library/Developer/CommandLineTools/SDKs | ||
find /usr/local -name "cmath*" | ||
# On Windows, starting with win19/20220814.1, cmake choose the 32-bit | ||
# python3.10.6 libraries instead of the 64-bit libraries when building | ||
# lldb. Using this setup-python action to make 3.10 the default | ||
# python fixes this. | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install Ninja | ||
uses: llvm/actions/install-ninja@main | ||
- uses: actions/checkout@v1 | ||
# actions/checkout deletes any existing files in the new git directory, | ||
# so this needs to either run before ccache-action or it has to use | ||
# clean: false. | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 250 | ||
- name: Setup ccache | ||
uses: hendrikmuhs/[email protected] | ||
with: | ||
# A full build of llvm, clang, lld, and lldb takes about 250MB | ||
# of ccache space. There's not much reason to have more than this, | ||
# because we usually won't need to save cache entries from older | ||
# builds. Also, there is an overall 10GB cache limit, and each | ||
# run creates a new cache entry so we want to ensure that we have | ||
# enough cache space for all the tests to run at once and still | ||
# fit under the 10 GB limit. | ||
max-size: 500M | ||
key: sccache-${{ matrix.os }} | ||
variant: sccache | ||
- name: Build and Test | ||
uses: llvm/actions/build-test-llvm-project@main | ||
env: | ||
# Workaround for https://github.com/actions/virtual-environments/issues/5900. | ||
# This should be a no-op for non-mac OSes | ||
PKG_CONFIG_PATH: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig//12 | ||
with: | ||
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF' | ||
cmake_args: '-GNinja -DLLVM_ENABLE_PROJECTS="${{ inputs.projects }}" -DCMAKE_BUILD_TYPE=Release -DLLDB_INCLUDE_TESTS=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache' | ||
build_target: '${{ inputs.build_target }}' | ||
|
||
- name: Build and Test libclc | ||
|