Build LLVM nightly #2895
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
| name: Build LLVM nightly | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| schedule: | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: {} | |
| # Cancel the workflow if a new one is requested for the same PR/branch, but still test all commits on the master branch. | |
| env: | |
| RETRY: 'retry() { "$@" || for i in 1 2 3 4; do echo "retrying..."; sleep 30; "$@" && break; done; }; retry' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/master'}} | |
| jobs: | |
| CI-LLVM-nightly: | |
| runs-on: ubuntu-22.04 | |
| timeout-minutes: 30 | |
| container: | |
| image: ubuntu:25.04 | |
| steps: | |
| - run: ${{ env.RETRY }} apt-get update | |
| - run: ${{ env.RETRY }} apt-get -qq install -y gcc g++ wget lsb-release wget software-properties-common gnupg git cmake flex mawk python3-pebble python3-psutil python3-chardet python3-msgspec python3-pytest python3-pytest-mock python3-pytest-subprocess python3-jsonschema python3-zstandard vim unifdef sudo | |
| - uses: rui314/setup-mold@v1 | |
| with: | |
| make-default: false | |
| - run: ld --version | |
| - run: nproc | |
| - run: ${{ env.RETRY }} wget https://apt.llvm.org/llvm.sh | |
| - run: chmod +x llvm.sh | |
| - run: ${{ env.RETRY }} ./llvm.sh 22 | |
| - run: ${{ env.RETRY }} apt-get install -y bolt-22 clang-22 libclang-common-22-dev libclang-22-dev mlir-22-tools llvm-22-tools libclang-common-22-dev libclang-22-dev libclang1-22 clang-format-22 python3-clang-22 clangd-22 clang-tidy-22 libomp-22-dev | |
| # TODO: remove in the future | |
| - run: touch /usr/lib/llvm-22/lib/libLibcTableGenUtil.a | |
| - uses: actions/checkout@v6 | |
| - run: mkdir objdir | |
| - run: cmake .. -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=mold" -DCMAKE_SHARED_LINKER_FLAGS="-fuse-ld=mold" | |
| working-directory: objdir | |
| - run: make -j`nproc` VERBOSE=1 | |
| working-directory: objdir | |
| - run: pytest | |
| working-directory: objdir |