Aiden Grossman ca44e11e00
[CI][Github] Bump actions/checkout to v5.0.0 (#153340)
https://github.com/actions/checkout/releases/tag/v5.0.0 was released a
couple of days ago (still new, sufficient bake time that there probably
is not a significant security issue). There are few changes, with the
most notable ones being dependency bumps, specifically the node version
bump to v24. This requires actions runner v2.327.1. I will land this
after all of the infrastructure has been moved over to the new runner
version.
2025-08-13 21:17:53 -07:00

80 lines
2.4 KiB
YAML

name: Release Lit
permissions:
contents: read
on:
workflow_dispatch:
inputs:
release-version:
description: 'Release Version'
required: true
type: string
workflow_call:
inputs:
release-version:
description: 'Release Version'
required: true
type: string
secrets:
RELEASE_TASKS_USER_TOKEN:
description: "Secret used to check user permissions."
required: false
jobs:
release-lit:
name: Release Lit
runs-on: ubuntu-24.04
steps:
- name: Checkout LLVM
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: "llvmorg-${{ inputs.release-version }}"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-setuptools python3-psutil python3-github
- name: Check Permissions
env:
GITHUB_TOKEN: ${{ github.token }}
USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
run: |
./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
- name: Setup Cpp
uses: aminya/setup-cpp@17c11551771948abc5752bbf3183482567c7caf0 # v1.1.1
with:
compiler: llvm-16.0.6
cmake: true
ninja: true
- name: Test lit
run: |
mkdir build && cd build
export FILECHECK_OPTS='-dump-input-filter=all -vv -color'
cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja
ninja -v -j $(nproc) check-lit
- name: Package lit
run: |
cd llvm/utils/lit
# Remove 'dev' suffix from lit version.
sed -i 's/ + "dev"//g' lit/__init__.py
python3 setup.py sdist bdist_wheel
- name: Upload lit to test.pypi.org
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
repository-url: https://test.pypi.org/legacy/
packages-dir: llvm/utils/lit/dist/
- name: Upload lit to pypi.org
uses: pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
with:
password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
packages-dir: llvm/utils/lit/dist/