musllvm

musl and LLVM cross-toolchain build system
git clone https://git.daat.foo/musllvm.git
Log | Files | Refs | README | LICENSE

ci.yml (2157B)


      1 name: Toolchain checks
      2 
      3 on:
      4   push:
      5   pull_request:
      6   workflow_dispatch:
      7     inputs:
      8       llvm_mode:
      9         description: LLVM host tool build
     10         type: choice
     11         options: [system, source, static]
     12         default: system
     13 
     14 permissions:
     15   contents: read
     16 
     17 jobs:
     18   driver:
     19     runs-on: ubuntu-24.04
     20     steps:
     21       - uses: actions/checkout@v4
     22       - run: make check
     23 
     24   cross:
     25     runs-on: ubuntu-24.04
     26     timeout-minutes: ${{ inputs.llvm_mode && inputs.llvm_mode != 'system' && 360 || 90 }}
     27     strategy:
     28       fail-fast: false
     29       matrix:
     30         arch: [x86_64, aarch64]
     31     env:
     32       ARCH: ${{ matrix.arch }}
     33       LLVM_MODE: ${{ inputs.llvm_mode || 'system' }}
     34     steps:
     35       - uses: actions/checkout@v4
     36       - name: Install host dependencies
     37         run: |
     38           curl --fail --location --show-error --retry 3 https://apt.llvm.org/llvm-snapshot.gpg.key |
     39             sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc > /dev/null
     40           echo 'deb [signed-by=/etc/apt/trusted.gpg.d/apt.llvm.org.asc] https://apt.llvm.org/noble/ llvm-toolchain-noble-21 main' |
     41             sudo tee /etc/apt/sources.list.d/llvm.list
     42           sudo apt-get update
     43           sudo apt-get install -y clang-21 lld-21 llvm-21 llvm-21-dev cmake ninja-build curl xz-utils perl rsync patch pkg-config qemu-user
     44           echo /usr/lib/llvm-21/bin >> "$GITHUB_PATH"
     45       - uses: actions/cache@v4
     46         with:
     47           path: sources
     48           key: sources-${{ hashFiles('sources.list') }}
     49       - name: Build and run smoke tests
     50         run: |
     51           if [ "$ARCH" = aarch64 ]; then
     52             make JOBS=2 RUNNER=qemu-aarch64
     53           else
     54             make JOBS=2
     55           fi
     56       - name: Check a resumed build
     57         run: make runtimes JOBS=2
     58       - name: Save build diagnostics
     59         if: failure()
     60         uses: actions/upload-artifact@v4
     61         with:
     62           name: diagnostics-${{ matrix.arch }}
     63           path: |
     64             build/work/**/CMakeCache.txt
     65             build/work/**/CMakeFiles/CMakeConfigureLog.yaml
     66             build/work/**/verify/*.header
     67             build/work/**/verify/*.segments
     68             build/work/**/verify/*.dynamic