|
| 1 | +name: In-tree build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - ocl-open-90 |
| 7 | + paths-ignore: # no need to check build for: |
| 8 | + - 'docs/**' # documentation |
| 9 | + - '**.md' # README |
| 10 | + pull_request: |
| 11 | + branches: |
| 12 | + - ocl-open-90 |
| 13 | + paths-ignore: # no need to check build for: |
| 14 | + - 'docs/**' # documentation |
| 15 | + - '**.md' # README |
| 16 | + schedule: |
| 17 | + # Weekly build on Mondays |
| 18 | + # Ideally, we might want to simplify our regular nightly build as we |
| 19 | + # probably don't need every configuration to be built every day: most of |
| 20 | + # them are only necessary in pre-commits to avoid breakages |
| 21 | + - cron: 0 0 * * 0 |
| 22 | + |
| 23 | +env: |
| 24 | + LLVM_VERSION: 9 |
| 25 | + |
| 26 | +jobs: |
| 27 | + build_and_test_linux: |
| 28 | + name: Linux |
| 29 | + strategy: |
| 30 | + matrix: |
| 31 | + build_type: [Release] |
| 32 | + include: |
| 33 | + - build_type: Release |
| 34 | + fail-fast: false |
| 35 | + runs-on: ubuntu-18.04 |
| 36 | + steps: |
| 37 | + - name: Install dependencies |
| 38 | + run: | |
| 39 | + curl -L "https://apt.llvm.org/llvm-snapshot.gpg.key" | sudo apt-key add - |
| 40 | + curl -L "https://packages.lunarg.com/lunarg-signing-key-pub.asc" | sudo apt-key add - |
| 41 | + echo "deb https://apt.llvm.org/bionic/ llvm-toolchain-bionic-${{ env.LLVM_VERSION }} main" | sudo tee -a /etc/apt/sources.list |
| 42 | + echo "deb https://packages.lunarg.com/vulkan bionic main" | sudo tee -a /etc/apt/sources.list |
| 43 | + sudo apt-get update |
| 44 | + - name: setup git config |
| 45 | + run: | |
| 46 | + git config --global user.email "<>" |
| 47 | + git config --global user.name "GitHub Actions Bot" |
| 48 | + - name: Checkout LLVM sources |
| 49 | + uses: actions/checkout@v2 |
| 50 | + with: |
| 51 | + repository: llvm/llvm-project |
| 52 | + ref: release/9.x |
| 53 | + path: llvm-project |
| 54 | + - name: Checkout the translator sources |
| 55 | + uses: actions/checkout@v2 |
| 56 | + with: |
| 57 | + repository: KhronosGroup/SPIRV-LLVM-Translator |
| 58 | + ref: llvm_release_90 |
| 59 | + path: llvm-project/SPIRV-LLVM-Translator |
| 60 | + - name: Checkout opencl-clang sources |
| 61 | + uses: actions/checkout@v2 |
| 62 | + with: |
| 63 | + path: llvm-project/opencl-clang |
| 64 | + - name: Configure |
| 65 | + run: | |
| 66 | + mkdir build && cd build |
| 67 | + cmake ${{ github.workspace }}/llvm-project/llvm \ |
| 68 | + -DLLVM_ENABLE_PROJECTS="clang" \ |
| 69 | + -DLLVM_EXTERNAL_PROJECTS="llvm-spirv;opencl-clang" \ |
| 70 | + -DLLVM_EXTERNAL_LLVM_SPIRV_SOURCE_DIR=${{ github.workspace }}/llvm-project/SPIRV-LLVM-Translator \ |
| 71 | + -DLLVM_EXTERNAL_OPENCL_CLANG_SOURCE_DIR=${{ github.workspace }}/llvm-project/opencl-clang \ |
| 72 | + -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ |
| 73 | + -DLLVM_TARGETS_TO_BUILD="X86" \ |
| 74 | + -G "Unix Makefiles" |
| 75 | + - name: Build |
| 76 | + run: | |
| 77 | + cd build |
| 78 | + |
| 79 | + make opencl-clang -j2 |
0 commit comments