Debian Codegraph @

llvm-project/llvm/projects/opencl-clang/.github/workflows/on-push-verification.yml

raw
1 # ===---
2 # Running on push & pull_request.
3 # This workflow parses the destination branch
4 # to choose correct dependencies revisions
5 # ===---
6
7 name: In-tree build
8 run-name: '${{ github.event_name }}: ${{ github.base_ref }} ${{ github.ref_name }}' # github.base_ref null for 'on: push'
9
10 on:
11 push:
12 branches:
13 - main
14 - ocl-open-*
15 pull_request:
16 branches:
17 - main
18 - ocl-open-*
19 types:
20 - opened
21 - reopened
22 - synchronize # commit pushed to the PR
23 - ready_for_review # moved from draft state
24
25 jobs:
26
27 verify_release_branch:
28 name: Linux
29 # ref_name for 'on: push'
30 # base_ref for 'on: pull_request'
31 if: ${{ github.ref_name != 'main' && github.base_ref != 'main' }}
32 runs-on: ubuntu-22.04
33 steps:
34
35 - name: Checkout opencl-clang sources for action files
36 uses: actions/checkout@v3
37
38 # This step will fail when the branch naming scheme 'ocl-open-XXX' changes!
39 - name: Parse LLVM version from branch name
40 id: check-llvm-version
41 run: |
42 BRANCH="${{ github.base_ref }}" # on: pull_request, otherwise null
43 BRANCH=${BRANCH:-${{ github.ref_name }}} # on: push
44 LLVM_VERSION_LONG=$(echo $BRANCH | grep -oP '\d+') # Eg. 150 for LLVM 15
45 LLVM_VERSION_SHORT=${LLVM_VERSION_LONG::-1} # Eg. 15 for LLVM 15
46 echo "llvm_version=$LLVM_VERSION_SHORT" >> $GITHUB_OUTPUT
47
48 - name: Run build-opencl-clang action
49 uses: ./.github/actions/build-opencl-clang
50 with:
51 ref_llvm: release/${{ steps.check-llvm-version.outputs.llvm_version }}.x
52 ref_translator: llvm_release_${{ steps.check-llvm-version.outputs.llvm_version }}0
53 ref_opencl-clang: ${{ github.ref }}