- Notifications
You must be signed in to change notification settings - Fork 15.3k
attempt to introduce reusable workflow #76243
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
Draft
EricWF wants to merge 1 commit into llvm:main Choose a base branch from efcs:reusable-workflow
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Draft
Conversation
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
Member
| @llvm/pr-subscribers-libcxx @llvm/pr-subscribers-github-workflow Author: Eric (EricWF) ChangesFull diff: https://github.com/llvm/llvm-project/pull/76243.diff 2 Files Affected:
diff --git a/.github/workflows/libcxx-build-action.yaml b/.github/workflows/libcxx-build-action.yaml new file mode 100644 index 00000000000000..f127b6e99df2ef --- /dev/null +++ b/.github/workflows/libcxx-build-action.yaml @@ -0,0 +1,88 @@ +name: "Libc++ Build and Test Action" +description: "Reusable build and test action for libc++" +inputs: + ref: + description: 'LLVM reference to check out' + required: false + default: 'main' + skip_checkout: + description: 'Skip checking out llvm-project' + required: false + default: 'false' + type: choice + options: + - 'true' + - 'false' + config: + description: 'the run-buildbot target to use' + type: str + required: true + runners: + description: 'the runners to use' + type: str + required: false + default: libcxx-runners-8-set + cc: + description: 'the C compiler to use' + type: str + required: false + default: clang-18 + cxx: + description: 'the C++ compiler to use' + type: str + required: false + default: clang++-18 + enable_clang_tidy: + description: 'whether to enable clang-tidy' + type: choice + required: false + default: ON + options: + - ON + - OFF + enable_std_modules: + description: 'whether to enable std modules' + type: choice + required: false + default: ON + options: + - ON + - OFF + +runs: + using: "composite" + steps: + - name: Checkout llvm-project + if: github.event.inputs.skip_checkout == 'false' + uses: actions/checkout@v4 + with: + repository: llvm/llvm-project + ref: ${{ github.event.inputs.ref }} + - name: run buildbot + cmd: libcxx/utils/ci/run-buildbot ${{ github.event.inputs.config }} + env: + CC: ${{ github.event.inputs.cc }} + CXX: ${{ github.event.inputs.cxx }} + ENABLE_CLANG_TIDY: ${{ github.event.inputs.enable_clang_tidy }} + ENABLE_STD_MODULES: ${{ github.event.inputs.enable_std_modules }} + - uses: actions/upload-artifact@v3 + if: always() + with: + name: ${{ github.events.input.config }}-results + path: | + **/test-results.xml + **/*.abilist + **/CMakeError.log + **/CMakeOutput.log + **/crash_diagnostics/* + + + +permissions: + contents: read # Default everything to read-only + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + + diff --git a/.github/workflows/libcxx-single-workflow.yaml b/.github/workflows/libcxx-single-workflow.yaml new file mode 100644 index 00000000000000..c2c23e105ff2c9 --- /dev/null +++ b/.github/workflows/libcxx-single-workflow.yaml @@ -0,0 +1,100 @@ +# This file defines pre-commit CI for libc++, libc++abi, and libunwind (on Github). +# +# We split the configurations in multiple stages with the intent of saving compute time +# when a job fails early in the pipeline. This is why the jobs are marked as `continue-on-error: false`. +# We try to run the CI configurations with the most signal in the first stage. +# +# Stages 1 & 2 are meant to be "smoke tests", and are meant to catch most build/test failures quickly and without using +# too many resources. +# Stage 3 is "everything else", and is meant to catch breakages on more niche or unique configurations. +# +# Therefore, we "fail-fast" for any failures during stages 1 & 2, meaning any job failing cancels all other running jobs, +# under the assumption that if the "smoke tests" fail, then the other configurations will likely fail in the same way. +# However, stage 3 does not fail fast, as it's more likely that any one job failing is a flake or a configuration-specific +# + +permissions: + contents: read # Default everything to read-only + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +on: + workflow_dispatch: + inputs: + llvm_ref: + description: 'LLVM reference to check out' + required: false + default: 'main' + config: + description: 'the run-buildbot target to use' + type: str + required: true + runners: + description: 'the runners to use' + type: str + required: false + default: libcxx-runners-8-set + cc: + description: 'the C compiler to use' + type: str + required: false + default: clang-18 + cxx: + description: 'the C++ compiler to use' + type: str + required: false + default: clang++-18 + enable_clang_tidy: + description: 'whether to enable clang-tidy' + type: choice + required: false + default: ON + options: + - ON + - OFF + enable_std_modules: + description: 'whether to enable std modules' + type: choice + required: false + default: ON + options: + - ON + - OFF + + +env: + CMAKE: "/opt/bin/cmake" + # LLVM POST-BRANCH bump version + # LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17" + # LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15" + LLVM_HEAD_VERSION: "18" # Used compiler, update POST-BRANCH. + LLVM_PREVIOUS_VERSION: "17" + LLVM_OLDEST_VERSION: "16" + GCC_STABLE_VERSION: "13" + LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-18" + CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics" + + + +jobs: + build-and-test: + runs-on: {{ github.event.inputs.runners }} + + steps: + - uses: ./.github/workflows/libcxx-build-action + with: + repository: llvm/llvm-project + ref: ${{ github.event.inputs.llvm_ref }} + cc: ${{ github.event.inputs.cc }} + cxx: ${{ github.event.inputs.cxx }} + config: ${{ github.event.inputs.config }} + enable_clang_tidy: ${{ github.event.inputs.enable_clang_tidy }} + enable_std_modules: ${{ github.event.inputs.enable_std_modules }} + + + + + + |
Member
| @EricWF What's the state of this? |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
No description provided.