[ORC-RT][LoongArch] Add initial support for loongarch64 in ELFNixPlatform (#123575)
[llvm-project.git] / .github / workflows / release-lit.yml
blob9d6f3140e6883079663195c055e77a1c6c25a996
1 name: Release Lit
3 permissions:
4   contents: read
6 on:
7   workflow_dispatch:
8     inputs:
9       release-version:
10         description: 'Release Version'
11         required: true
12         type: string
14   workflow_call:
15     inputs:
16       release-version:
17         description: 'Release Version'
18         required: true
19         type: string
20     secrets:
21       RELEASE_TASKS_USER_TOKEN:
22         description: "Secret used to check user permissions."
23         required: false
25 jobs:
26   release-lit:
27     name: Release Lit
28     runs-on: ubuntu-latest
29     steps:
30       - name: Checkout LLVM
31         uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
32         with:
33           ref: "llvmorg-${{ inputs.release-version }}"
35       - name: Install dependencies
36         run: |
37           sudo apt-get update
38           sudo apt-get install -y python3-setuptools python3-psutil python3-github
40       - name: Check Permissions
41         env:
42           GITHUB_TOKEN: ${{ github.token }}
43           USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }}
44         run: |
45           ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions
47       - name: Setup Cpp
48         uses: aminya/setup-cpp@v1
49         with:
50           compiler: llvm-16.0.6
51           cmake: true
52           ninja: true
54       - name: Test lit
55         run: |
56           mkdir build && cd build
57           export FILECHECK_OPTS='-dump-input-filter=all -vv -color'
58           cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja
59           ninja -v -j $(nproc) check-lit
61       - name: Package lit
62         run: |
63           cd llvm/utils/lit
64           # Remove 'dev' suffix from lit version.
65           sed -i 's/ + "dev"//g' lit/__init__.py
66           python3 setup.py sdist bdist_wheel
68       - name: Upload lit to test.pypi.org
69         uses: pypa/gh-action-pypi-publish@release/v1
70         with:
71           password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
72           repository-url: https://test.pypi.org/legacy/
73           packages-dir: llvm/utils/lit/dist/
75       - name: Upload lit to pypi.org
76         uses: pypa/gh-action-pypi-publish@release/v1
77         with:
78           password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
79           packages-dir: llvm/utils/lit/dist/