-
Notifications
You must be signed in to change notification settings - Fork 18k
[Github][RFC] Add workflow to diff codegen on llvm-test-suite #190010
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
Changes from all commits
f208b30
ba5f906
68707da
af377f0
56563cf
4465c79
fc12789
0cd6c26
387d32b
9a18f4a
6fccd7b
765dc04
aa01aa3
ad54fac
fc4e6af
4aec090
3505249
cc3e4c6
79560bb
9563694
e16151c
399653c
c6d774f
3c33b26
f7ba728
eeee3bc
cd8ffdf
4fb58ee
6ac80fd
0521211
9aa7930
a37a98e
b3e1e01
576de46
f0f7a3f
4b1dd8e
69d91de
10594a5
f55d071
7e1c645
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,156 @@ | ||||||||||||||||||||||||||||||||||||||||
| # When /test-suite is commented on a PR, checks out the PR, builds clang and | ||||||||||||||||||||||||||||||||||||||||
| # then the test-suite in several configurations. It then checks out the base of | ||||||||||||||||||||||||||||||||||||||||
| # the PR, builds clang and the test-suite again, and then uploads the diff of | ||||||||||||||||||||||||||||||||||||||||
| # the codegen. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| # TODO: React to the comment to let the user know the workflow has kicked | ||||||||||||||||||||||||||||||||||||||||
| # off. We'll need to do this in a separate workflow like issue-write.yml with | ||||||||||||||||||||||||||||||||||||||||
| # elevated permissions, since this workflow can't have write permissions on | ||||||||||||||||||||||||||||||||||||||||
| # account for the arbitrary code execution. | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| name: Diff test-suite codegen | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
|
boomanaiden154 marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||||||||||||||||
| issue_comment: | ||||||||||||||||||||||||||||||||||||||||
| types: | ||||||||||||||||||||||||||||||||||||||||
| - created | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||||||||||
| test-suite: | ||||||||||||||||||||||||||||||||||||||||
| name: Build test-suite and diff | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-24.04 | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you look at trying to use the CI container for this workflow? It should be about the same, just have a (significantly) faster default toolchain and also enable the use of precompiled headers given we use clang instead of gcc.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in ad54fac. Kicked off a test run with it here: https://github.com/lukel97/llvm-project/actions/runs/23910646008
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wow the build is almost twice as fast. The only issue is that it looks like the cross compile builds are failing because the version of CMake is too old. It looks like it's version 3.28 on the image but we need at least 3.29 since the toolchain files use CMAKE_LINKER_TYPE. The default github ubuntu runner has 3.31: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#tools. Are you able to update the CMake version in the image or should we try and install a newer version in this workflow?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the CMake version in this image for now in cc3e4c6
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could, but ubuntu 26.04 also comes out in a week or two, so I think we can just wait until then to upgrade.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looking at the timetable from here it will take some time before the 26.04 images will be available:
|
||||||||||||||||||||||||||||||||||||||||
| container: | ||||||||||||||||||||||||||||||||||||||||
| image: ghcr.io/llvm/ci-ubuntu-24.04:35e958d7f0b7 | ||||||||||||||||||||||||||||||||||||||||
| if: github.event.issue.pull_request && startswith(github.event.comment.body, '/test-suite') | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - name: Check permissions | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is nitpicking but I suggest to give the user some feedback by reacting to the comment with an
Suggested change
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually originally had the action give a thumbs up react on the comment! But I removed it in 9a18f4a since it requires the I think we can probably do this if we create another workflow similar to issue-write.yml. Would you be happy if I do that as a follow up just so that this PR doesn't get too big?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I forgot about that. Doing it in a separate PR would be nice for testing anyways.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes it would be nice and it would highlight why we need the write permission. Thank you for this.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a TODO in 7e1c645 |
||||||||||||||||||||||||||||||||||||||||
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| script: | | ||||||||||||||||||||||||||||||||||||||||
| await github.rest.teams.getMembershipForUserInOrg({ | ||||||||||||||||||||||||||||||||||||||||
| org: 'llvm', | ||||||||||||||||||||||||||||||||||||||||
| team_slug: 'llvm-committers', | ||||||||||||||||||||||||||||||||||||||||
| username: context.actor | ||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||
| - name: Get pull request | ||||||||||||||||||||||||||||||||||||||||
| id: get-pr | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| script: | | ||||||||||||||||||||||||||||||||||||||||
| const { data: pr } = await github.rest.pulls.get({ | ||||||||||||||||||||||||||||||||||||||||
| owner: context.repo.owner, | ||||||||||||||||||||||||||||||||||||||||
| repo: context.repo.repo, | ||||||||||||||||||||||||||||||||||||||||
| pull_number: context.payload.issue.number | ||||||||||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||||||||||
| return pr | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+39
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do you need this step, isn't all the PR information available via the context?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately we only get the issue object fields so it's missing PR-specific things like the head ref, merge commit, mergability status etc. E.g. if you check the documentation on the payload object, the FWIW I was also surprised it was this awkward to get the PR info out of the event |
||||||||||||||||||||||||||||||||||||||||
| - name: Check pull request is mergeable | ||||||||||||||||||||||||||||||||||||||||
| if: ${{ !fromJSON(steps.get-pr.outputs.result).mergeable }} | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| cat << EOF > comments | ||||||||||||||||||||||||||||||||||||||||
| [{"body": "Unable to diff test-suite with PR, PR isn't mergeable"}] | ||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||
| exit 1 | ||||||||||||||||||||||||||||||||||||||||
| - name: Checkout pull request | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
|
boomanaiden154 marked this conversation as resolved.
|
||||||||||||||||||||||||||||||||||||||||
| ref: ${{ fromJSON(steps.get-pr.outputs.result).merge_commit_sha }} | ||||||||||||||||||||||||||||||||||||||||
| repository: ${{ fromJSON(steps.get-pr.outputs.result).head.repo.full_name }} | ||||||||||||||||||||||||||||||||||||||||
| fetch-depth: 2 | ||||||||||||||||||||||||||||||||||||||||
| path: llvm-project | ||||||||||||||||||||||||||||||||||||||||
| persist-credentials: false | ||||||||||||||||||||||||||||||||||||||||
| - name: Checkout llvm/llvm-test-suite | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+56
to
+64
Check warningCode scanning / CodeQL Checkout of untrusted code in a non-privileged context Medium test
Potential unsafe checkout of untrusted pull request on non-privileged workflow.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you comment on this please?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine given we're doing the permissions check for commit access above. |
||||||||||||||||||||||||||||||||||||||||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| repository: llvm/llvm-test-suite | ||||||||||||||||||||||||||||||||||||||||
| path: llvm-test-suite | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+64
to
+68
Check noticeCode scanning / zizmor credential persistence through GitHub Actions artifacts Note test
credential persistence through GitHub Actions artifacts
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you comment on this please?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need to set
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 6fccd7b |
||||||||||||||||||||||||||||||||||||||||
| persist-credentials: false | ||||||||||||||||||||||||||||||||||||||||
| - name: Setup environment variables | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| echo "HEAD_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||
| echo "BASE_SHA=$(git rev-parse HEAD^)" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||
| SCRIPTS_DIR="$GITHUB_WORKSPACE/llvm-project/.github/workflows/test-suite" | ||||||||||||||||||||||||||||||||||||||||
| echo "SCRIPTS_DIR=$SCRIPTS_DIR" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||
| echo "$SCRIPTS_DIR" >> $GITHUB_PATH | ||||||||||||||||||||||||||||||||||||||||
| echo "$GITHUB_WORKSPACE/llvm-project/build/bin" >> $GITHUB_PATH | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-project | ||||||||||||||||||||||||||||||||||||||||
| - name: Install system dependencies | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| # Install newer version of CMake (llvm/ci-ubuntu-24.04 image has CMake 3.28) | ||||||||||||||||||||||||||||||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add a TODO (assign it to me if you want) to drop this once we're on 26.04?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in 9aa7930
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we need a newer cmake version here?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We need it specifically for CMAKE_LINKER_TYPE=LLD which is only available in 3.29. The cross compilation toolchain files need it so we can just use LLD instead of having to install several target specific linkers |
||||||||||||||||||||||||||||||||||||||||
| # TODO(boomanaiden154): Remove once upgraded to Ubuntu 26.04 | ||||||||||||||||||||||||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y wget | ||||||||||||||||||||||||||||||||||||||||
| wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null | ||||||||||||||||||||||||||||||||||||||||
| echo 'deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main' | sudo tee /etc/apt/sources.list.d/kitware.list >/dev/null | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| sudo apt-get update | ||||||||||||||||||||||||||||||||||||||||
| sudo apt-get install -y cmake tcl libc6-dev-arm64-cross libc6-dev-riscv64-cross libgcc-14-dev-arm64-cross libgcc-14-dev-riscv64-cross libstdc++-14-dev-arm64-cross libstdc++-14-dev-riscv64-cross | ||||||||||||||||||||||||||||||||||||||||
| - name: Configure Clang | ||||||||||||||||||||||||||||||||||||||||
| run: cmake -B build -C $SCRIPTS_DIR/llvm.cmake llvm -GNinja | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-project | ||||||||||||||||||||||||||||||||||||||||
| - name: Build Clang @ head | ||||||||||||||||||||||||||||||||||||||||
| run: ninja -C build | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-project | ||||||||||||||||||||||||||||||||||||||||
| - name: Configure and build test-suite @ head | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| configure-and-build.sh rva23u64-O3-head $SCRIPTS_DIR/riscv64.cmake | ||||||||||||||||||||||||||||||||||||||||
| configure-and-build.sh armv9-a-O3-head $SCRIPTS_DIR/aarch64.cmake | ||||||||||||||||||||||||||||||||||||||||
| configure-and-build.sh x86_64-O3-head $SCRIPTS_DIR/x86_64.cmake | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-test-suite | ||||||||||||||||||||||||||||||||||||||||
| - name: Build Clang @ base | ||||||||||||||||||||||||||||||||||||||||
| run: git checkout $BASE_SHA && ninja -C build | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-project | ||||||||||||||||||||||||||||||||||||||||
| - name: Configure and build test-suite @ base | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| configure-and-build.sh rva23u64-O3-base $SCRIPTS_DIR/riscv64.cmake | ||||||||||||||||||||||||||||||||||||||||
| configure-and-build.sh armv9-a-O3-base $SCRIPTS_DIR/aarch64.cmake | ||||||||||||||||||||||||||||||||||||||||
| configure-and-build.sh x86_64-O3-base $SCRIPTS_DIR/x86_64.cmake | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-test-suite | ||||||||||||||||||||||||||||||||||||||||
| - name: Compute diffs | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| mkdir diffs | ||||||||||||||||||||||||||||||||||||||||
| ./utils/tdiff.py -a build.rva23u64-O3-base -b build.rva23u64-O3-head -s all > diffs/rva23u64-O3.diff || true | ||||||||||||||||||||||||||||||||||||||||
| ./utils/tdiff.py -a build.armv9-a-O3-base -b build.armv9-a-O3-head -s all > diffs/armv9-a-O3.diff || true | ||||||||||||||||||||||||||||||||||||||||
| ./utils/tdiff.py -a build.x86_64-O3-base -b build.x86_64-O3-head -s all > diffs/x86_64-O3.diff || true | ||||||||||||||||||||||||||||||||||||||||
| working-directory: llvm-test-suite | ||||||||||||||||||||||||||||||||||||||||
| - name: Upload diffs | ||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7.0.0 | ||||||||||||||||||||||||||||||||||||||||
| id: upload-diffs | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| name: diffs | ||||||||||||||||||||||||||||||||||||||||
| path: llvm-test-suite/diffs | ||||||||||||||||||||||||||||||||||||||||
| - name: Upload results | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f #v7.0.0 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| name: results | ||||||||||||||||||||||||||||||||||||||||
| path: llvm-test-suite/results*.json | ||||||||||||||||||||||||||||||||||||||||
| - name: Create comment | ||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||
| ARTIFACT_URL: ${{ steps.upload-diffs.outputs.artifact-url }} | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| cat << EOF > comments | ||||||||||||||||||||||||||||||||||||||||
| [{"body" : "test-suite diff from $BASE_SHA...$HEAD_SHA: $ARTIFACT_URL"}] | ||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||
| - name: Create comment on failure | ||||||||||||||||||||||||||||||||||||||||
| if: failure() | ||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||
| RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| cat << EOF > comments | ||||||||||||||||||||||||||||||||||||||||
| [{"body" : "Failed to get test-suite diff from $BASE_SHA...$HEAD_SHA: $RUN_URL"}] | ||||||||||||||||||||||||||||||||||||||||
| EOF | ||||||||||||||||||||||||||||||||||||||||
| - name: Save PR number | ||||||||||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||
| PR_NUMBER: ${{ fromJSON(steps.get-pr.outputs.result).number }} | ||||||||||||||||||||||||||||||||||||||||
| run: echo $PR_NUMBER > pr_number | ||||||||||||||||||||||||||||||||||||||||
| - name: Upload comment and PR number | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0 | ||||||||||||||||||||||||||||||||||||||||
| if: always() | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| name: workflow-args | ||||||||||||||||||||||||||||||||||||||||
| path: | | ||||||||||||||||||||||||||||||||||||||||
| comments | ||||||||||||||||||||||||||||||||||||||||
| pr_number | ||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| set(CMAKE_SYSTEM_NAME Linux) | ||
| set(CMAKE_C_COMPILER $ENV{GITHUB_WORKSPACE}/llvm-project/build/bin/clang) | ||
| set(CMAKE_CXX_COMPILER $ENV{GITHUB_WORKSPACE}/llvm-project/build/bin/clang++) | ||
| set(CMAKE_C_COMPILER_TARGET aarch64-linux-gnu) | ||
| set(CMAKE_CXX_COMPILER_TARGET aarch64-linux-gnu) | ||
| set(CMAKE_C_FLAGS_INIT "-march=armv9-a -save-temps=obj") | ||
| set(CMAKE_CXX_FLAGS_INIT "-march=armv9-a -save-temps=obj") | ||
| set(CMAKE_SYSTEM_PROCESSOR arm64) | ||
| set(CMAKE_LINKER_TYPE LLD) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/bin/sh | ||
|
|
||
| set -eux | ||
|
|
||
| cmake -B build.$1 \ | ||
| --toolchain $2 \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably enable ccache here on the assumption that had and base are going to be pretty similar?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably not the llvm-test-suite build because the compiler will always be different anyway. But I've added sccache to the LLVM build in a37a98e |
||
| -C cmake/caches/O3.cmake \ | ||
| -GNinja \ | ||
| -DTEST_SUITE_BENCHMARKING_ONLY=ON \ | ||
| -DTEST_SUITE_RUN_BENCHMARKS=OFF | ||
| ninja -C build.$1 | ||
| llvm-lit build.$1 -o results.$1.json | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| set(CMAKE_BUILD_TYPE Release CACHE STRING "") | ||
| set(LLVM_TARGETS_TO_BUILD "AArch64;RISCV;X86" CACHE STRING "") | ||
| set(LLVM_ENABLE_PROJECTS "clang;lld" CACHE STRING "") | ||
| set(LLVM_APPEND_VC_REV OFF CACHE BOOL "") | ||
| set(CMAKE_C_COMPILER_LAUNCHER sccache CACHE STRING "") | ||
| set(CMAKE_CXX_COMPILER_LAUNCHER sccache CACHE STRING "") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| set(CMAKE_SYSTEM_NAME Linux) | ||
| set(CMAKE_C_COMPILER $ENV{GITHUB_WORKSPACE}/llvm-project/build/bin/clang) | ||
| set(CMAKE_CXX_COMPILER $ENV{GITHUB_WORKSPACE}/llvm-project/build/bin/clang++) | ||
| set(CMAKE_C_COMPILER_TARGET riscv64-linux-gnu) | ||
| set(CMAKE_CXX_COMPILER_TARGET riscv64-linux-gnu) | ||
| set(CMAKE_C_FLAGS_INIT "-march=rva23u64 -save-temps=obj") | ||
| set(CMAKE_CXX_FLAGS_INIT "-march=rva23u64 -save-temps=obj") | ||
| set(CMAKE_SYSTEM_PROCESSOR riscv64) | ||
| set(CMAKE_LINKER_TYPE LLD) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| set(CMAKE_C_COMPILER $ENV{GITHUB_WORKSPACE}/llvm-project/build/bin/clang) | ||
| set(CMAKE_CXX_COMPILER $ENV{GITHUB_WORKSPACE}/llvm-project/build/bin/clang++) | ||
| set(CMAKE_C_FLAGS_INIT "-save-temps=obj") | ||
| set(CMAKE_CXX_FLAGS_INIT "-save-temps=obj") | ||
| set(CMAKE_LINKER_TYPE LLD) |
Uh oh!
There was an error while loading. Please reload this page.