Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CI] Change on-push-verification job name to "In-tree build" #523

Merged
merged 2 commits into from
May 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 2 additions & 31 deletions .github/workflows/on-push-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# to choose correct dependencies revisions
# ===---

name: On push & pull-request verification
name: In-tree build
run-name: '${{ github.event_name }}: ${{ github.base_ref }} ${{ github.ref_name }}' # github.base_ref null for 'on: push'

permissions:
Expand All @@ -28,10 +28,9 @@ on:
jobs:

verify_default_branch:
name: Verify for `main` branch
name: Linux
# ref_name for 'on: push'
# base_ref for 'on: pull_request'
if: ${{ (github.event_name == 'push' && github.ref_name == 'main') || (github.event_name == 'pull_request' && github.base_ref == 'main') }}
runs-on: ubuntu-22.04
steps:

Expand All @@ -44,31 +43,3 @@ jobs:
ref_llvm: main
ref_translator: main
ref_opencl-clang: ${{ github.ref }}

verify_release_branch:
name: Verify for `ocl-open-*` release branch
# ref_name for 'on: push'
# base_ref for 'on: pull_request'
if: ${{ github.ref_name != 'main' && github.base_ref != 'main' }}
runs-on: ubuntu-22.04
steps:

- name: Checkout opencl-clang sources for action files
uses: actions/checkout@v4

# This step will fail when the branch naming scheme 'ocl-open-XXX' changes!
- name: Parse LLVM version from branch name
id: check-llvm-version
run: |
BRANCH="${{ github.base_ref }}" # on: pull_request, otherwise null
BRANCH=${BRANCH:-${{ github.ref_name }}} # on: push
LLVM_VERSION_LONG=$(echo $BRANCH | grep -oP '\d+') # Eg. 150 for LLVM 15
LLVM_VERSION_SHORT=${LLVM_VERSION_LONG::-1} # Eg. 15 for LLVM 15
echo "llvm_version=$LLVM_VERSION_SHORT" >> $GITHUB_OUTPUT

- name: Run build-opencl-clang action
uses: ./.github/actions/build-opencl-clang
with:
ref_llvm: release/${{ steps.check-llvm-version.outputs.llvm_version }}.x
ref_translator: llvm_release_${{ steps.check-llvm-version.outputs.llvm_version }}0
ref_opencl-clang: ${{ github.ref }}
Loading