Nightly check #132
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: Nightly check | |
| on: | |
| # pull_request: {} # Uncomment only to test this WF file update. | |
| schedule: | |
| - cron: '0 7 * * *' # Runs daily at 1:00 AM CST | |
| workflow_dispatch: {} | |
| jobs: | |
| build-and-runtest-nightly: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Clang 20 | |
| uses: egor-tensin/setup-clang@v1 | |
| with: | |
| version: "20" | |
| platform: x64 | |
| - name: Install libc++ and libc++abi | |
| run: | | |
| sudo apt update | |
| sudo apt install -y clang libc++-dev libc++abi-dev ccache libclang-rt-20-dev | |
| - name: Build and Test with Clang and show versions | |
| run: | | |
| echo "clang version" | |
| clang --version | |
| echo "clang++ version" | |
| clang++ -stdlib=libc++ --version | |
| dpkg -L clang | |
| echo '#include <iostream>' > test.cpp | |
| echo 'int main() { std::cout << "Hello, Clang on Ubuntu 24.04!" << std::endl; return 0; }' >> test.cpp | |
| clang++ -std=c++17 -stdlib=libc++ test.cpp -o test_clang | |
| ./test_clang | |
| - name: CPU and Memory information | |
| run: | | |
| echo "Number of CPUs:" | |
| nproc --all # or grep -c ^processor /proc/cpuinfo | |
| echo "Memory information:" | |
| free -h # or cat /proc/meminfo | |
| - name: Checkout llvm-project | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: llvm/llvm-project | |
| path: llvm-project | |
| ref: main | |
| - name: Checkout eld | |
| uses: actions/checkout@v4 | |
| with: | |
| path: llvm-project/llvm/tools/eld | |
| ref: main | |
| - name: Configure workflow environment variables | |
| uses: ./llvm-project/llvm/tools/eld/.github/workflows/ConfigureBuildWorkflowENV | |
| - name: Record pre-build entry | |
| if: github.event_name == 'schedule' | |
| uses: ./llvm-project/llvm/tools/eld/.github/workflows/BuildStatusDataRecorder | |
| with: | |
| enabled: true | |
| project: "llvm-project/llvm/tools/eld" | |
| stage: "pre-" | |
| workflow-name: "nightly" | |
| record-mode: "record" | |
| status: "fail" | |
| run-id: ${{github.run_id}} | |
| arch-name: "all" | |
| branch-name: "${{env.BUILD_BRANCH}}" | |
| - name: Run CMake | |
| run: | | |
| mkdir obj | |
| cd obj | |
| cmake -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra" \ | |
| -DCMAKE_C_COMPILER:STRING=`which clang` \ | |
| -DCMAKE_CXX_COMPILER:STRING=`which clang++` \ | |
| -DCMAKE_CXX_FLAGS:STRING="-stdlib=libc++" \ | |
| -DLLVM_TARGETS_TO_BUILD:STRING="ARM;AArch64;RISCV;Hexagon;X86" \ | |
| -DLLVM_CCACHE_BUILD:BOOL=ON \ | |
| -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install-nightly-toolchain \ | |
| -DLLVM_CCACHE_DIR:STRING=$PWD/ccache/ \ | |
| -DLLVM_ENABLE_SPHINX=OFF \ | |
| -DLLVM_INSTALL_UTILS=On \ | |
| ../llvm-project/llvm | |
| - name: Build and install toolchain | |
| run: | | |
| cd obj | |
| ninja -j8 install | |
| - name: Pack toolchain tarball | |
| run: | | |
| tar -C ${{ github.workspace }}/ \ | |
| -Jcvf install-nightly-toolchain.tar.xz install-nightly-toolchain | |
| - name: Upload toolchain tarball | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: install-nightly-toolchain.tar.xz | |
| path: install-nightly-toolchain.tar.xz | |
| - name: Run tests | |
| run: | | |
| cd obj | |
| ninja -j8 check-eld | |
| - name: Update build entry | |
| if: github.event_name == 'schedule' | |
| uses: ./llvm-project/llvm/tools/eld/.github/workflows/BuildStatusDataRecorder | |
| with: | |
| enabled: true | |
| project: "llvm-project/llvm/tools/eld" | |
| stage: "post-" | |
| workflow-name: "nightly" | |
| record-mode: "update" | |
| status: "pass" | |
| run-id: ${{github.run_id}} | |
| arch-name: "all" | |
| branch-name: "${{env.BUILD_BRANCH}}" |