-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[libc] add multi-platform pre-commit github actions #119104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
e6e227a
[libc] add multi-platform pre-commit github actions
SchrodingerZhu 49ca7bc
[libc] add multi-platform pre-commit github actions
SchrodingerZhu a16c16e
[libc] add multi-platform pre-commit github actions
SchrodingerZhu feb3428
[libc] add multi-platform pre-commit github actions
SchrodingerZhu d1af585
[libc] add multi-platform pre-commit github actions
SchrodingerZhu 0cf345f
prepare to fix windows build
SchrodingerZhu 008ffef
add ubuntu preparation step
SchrodingerZhu 1263dbc
setup ninja
SchrodingerZhu a7738ed
remove build type
SchrodingerZhu 8f3c0ee
fix winget installation
SchrodingerZhu df70886
fix winget installation
SchrodingerZhu 08d00cc
more fixes
SchrodingerZhu fcb2500
more fixes
SchrodingerZhu 0be378f
more fixes
SchrodingerZhu 779c806
enable fullbuild
SchrodingerZhu 009b76c
fix
SchrodingerZhu 6776e8d
fix
SchrodingerZhu a9eba5e
fix
SchrodingerZhu 8482b9d
fix
SchrodingerZhu 5c8fba1
skip gcc and speed up clang testing
SchrodingerZhu 39e83dc
use windows-2022 instead of windows-latest
SchrodingerZhu 6f3b9eb
improve windows sccache hit
SchrodingerZhu 0b4323b
try use ninja on all platforms
SchrodingerZhu 7cee92f
Merge branch 'main' into libc/github-action
SchrodingerZhu 19c4456
switch caching
SchrodingerZhu 1b0d03b
switch caching (fix syntax)
SchrodingerZhu 2356ffd
switch caching (changing key)
SchrodingerZhu 2e014bd
switch caching (fix)
SchrodingerZhu e2f1982
Merge branch 'main' into libc/github-action
SchrodingerZhu ad8b7d8
lift uncompressed local storage size to 1G
SchrodingerZhu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,81 @@ | ||
| # This workflow is for pre-commit testing of the LLVM-libc project. | ||
| name: LLVM-libc Pre-commit Overlay Tests | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ "main" ] | ||
| paths: | ||
| - 'libc/**' | ||
| - '.github/workflows/libc-overlay-tests.yml' | ||
|
|
||
| jobs: | ||
| build: | ||
| env: | ||
| SCCACHE_GHA_ENABLED: "true" | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| # Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, windows-latest, macos-latest] | ||
SchrodingerZhu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| build_type: [Release, Debug] | ||
| compiler: [ | ||
| { c_compiler: gcc, cpp_compiler: g++ }, | ||
| { c_compiler: clang, cpp_compiler: clang++ }, | ||
| { c_compiler: clang-cl, cpp_compiler: clang-cl } | ||
| ] | ||
| exclude: | ||
| - os: windows-latest | ||
| compiler: { c_compiler: gcc, cpp_compiler: g++ } | ||
| - os: windows-latest | ||
| compiler: { c_compiler: clang, cpp_compiler: clang++ } | ||
| - os: ubuntu-latest | ||
| compiler: { c_compiler: clang-cl, cpp_compiler: clang-cl } | ||
| - os: macos-latest | ||
| compiler: { c_compiler: clang-cl, cpp_compiler: clang-cl } | ||
| - os: macos-latest | ||
| compiler: { c_compiler: gcc, cpp_compiler: g++ } | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Run sccache-cache | ||
| uses: mozilla-actions/[email protected] | ||
|
|
||
| - name: Prepare dependencies (Ubuntu) | ||
| if: matrix.os == 'ubuntu-latest' | ||
SchrodingerZhu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y cmake ninja-build libmpfr-dev libgmp-dev libmpc-dev | ||
|
|
||
| - name: Set reusable strings | ||
| id: strings | ||
| shell: bash | ||
| run: | | ||
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Configure CMake | ||
| run: > | ||
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | ||
| -DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }} | ||
| -DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }} | ||
| -DCMAKE_BUILD_TYPE=RelWithDebInfo | ||
| -DCMAKE_C_COMPILER_LAUNCHER=sccache | ||
| -DCMAKE_CXX_COMPILER_LAUNCHER=sccache | ||
| -DLLVM_ENABLE_RUNTIMES=libc | ||
| -S ${{ github.workspace }}/runtimes | ||
|
|
||
| - name: Build | ||
| run: > | ||
| cmake | ||
| --build ${{ steps.strings.outputs.build-output-dir }} | ||
| --parallel | ||
| --config RelWithDebInfo | ||
| --target libc | ||
|
|
||
| - name: Test | ||
| run: > | ||
| cmake | ||
| --build ${{ steps.strings.outputs.build-output-dir }} | ||
| --parallel | ||
| --target check-libc | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.