Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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 Dec 8, 2024
49ca7bc
[libc] add multi-platform pre-commit github actions
SchrodingerZhu Dec 8, 2024
a16c16e
[libc] add multi-platform pre-commit github actions
SchrodingerZhu Dec 8, 2024
feb3428
[libc] add multi-platform pre-commit github actions
SchrodingerZhu Dec 8, 2024
d1af585
[libc] add multi-platform pre-commit github actions
SchrodingerZhu Dec 8, 2024
0cf345f
prepare to fix windows build
SchrodingerZhu Dec 8, 2024
008ffef
add ubuntu preparation step
SchrodingerZhu Dec 8, 2024
1263dbc
setup ninja
SchrodingerZhu Dec 8, 2024
a7738ed
remove build type
SchrodingerZhu Dec 8, 2024
8f3c0ee
fix winget installation
SchrodingerZhu Dec 8, 2024
df70886
fix winget installation
SchrodingerZhu Dec 8, 2024
08d00cc
more fixes
SchrodingerZhu Dec 8, 2024
fcb2500
more fixes
SchrodingerZhu Dec 8, 2024
0be378f
more fixes
SchrodingerZhu Dec 8, 2024
779c806
enable fullbuild
SchrodingerZhu Dec 8, 2024
009b76c
fix
SchrodingerZhu Dec 8, 2024
6776e8d
fix
SchrodingerZhu Dec 8, 2024
a9eba5e
fix
SchrodingerZhu Dec 8, 2024
8482b9d
fix
SchrodingerZhu Dec 8, 2024
5c8fba1
skip gcc and speed up clang testing
SchrodingerZhu Dec 8, 2024
39e83dc
use windows-2022 instead of windows-latest
SchrodingerZhu Dec 8, 2024
6f3b9eb
improve windows sccache hit
SchrodingerZhu Dec 8, 2024
0b4323b
try use ninja on all platforms
SchrodingerZhu Dec 8, 2024
7cee92f
Merge branch 'main' into libc/github-action
SchrodingerZhu Dec 8, 2024
19c4456
switch caching
SchrodingerZhu Dec 8, 2024
1b0d03b
switch caching (fix syntax)
SchrodingerZhu Dec 8, 2024
2356ffd
switch caching (changing key)
SchrodingerZhu Dec 8, 2024
2e014bd
switch caching (fix)
SchrodingerZhu Dec 8, 2024
e2f1982
Merge branch 'main' into libc/github-action
SchrodingerZhu Dec 8, 2024
ad8b7d8
lift uncompressed local storage size to 1G
SchrodingerZhu Dec 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
85 changes: 85 additions & 0 deletions .github/workflows/libc-overlay-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# 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-24.04, windows-2022, macos-14 ]
compiler: [
{ c_compiler: gcc, cpp_compiler: g++ },
{ c_compiler: clang, cpp_compiler: clang++ },
{ c_compiler: clang-cl, cpp_compiler: clang-cl }
]
exclude:
- os: windows-2022
compiler: { c_compiler: gcc, cpp_compiler: g++ }
- os: windows-2022
compiler: { c_compiler: clang, cpp_compiler: clang++ }
- os: ubuntu-24.04
compiler: { c_compiler: clang-cl, cpp_compiler: clang-cl }
- os: macos-14
compiler: { c_compiler: clang-cl, cpp_compiler: clang-cl }
- os: macos-14
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: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake libmpfr-dev libgmp-dev libmpc-dev

- name: Prepare dependencies (Windows)
if: runner.os == 'Windows'
run: |
echo "C:\\Program Files\\LLVM\\bin" >> $GITHUB_PATH

- 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
Loading