|
73 | 73 | secrets: |
74 | 74 | RELEASE_TASKS_USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} |
75 | 75 |
|
| 76 | + # The pypi trusted publishing does not support called workflows, so we |
| 77 | + # can't use them here. |
| 78 | + release-lit: |
| 79 | + name: Release Lit |
| 80 | + runs-on: ubuntu-24.04 |
| 81 | + permissions: |
| 82 | + id-token: write # Requred for pypi publishing |
| 83 | + environment: pypi |
| 84 | + steps: |
| 85 | + - name: Checkout LLVM |
| 86 | + uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 |
| 87 | + with: |
| 88 | + ref: "llvmorg-${{ needs.validate-tag.outputs.release-version }}" |
| 89 | + |
| 90 | + - name: Install dependencies |
| 91 | + run: | |
| 92 | + sudo apt-get update |
| 93 | + sudo apt-get install -y python3-build python3-psutil python3-github |
| 94 | +
|
| 95 | + - name: Check Permissions |
| 96 | + env: |
| 97 | + GITHUB_TOKEN: ${{ github.token }} |
| 98 | + USER_TOKEN: ${{ secrets.RELEASE_TASKS_USER_TOKEN }} |
| 99 | + run: | |
| 100 | + ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} --user-token "$USER_TOKEN" check-permissions |
| 101 | +
|
| 102 | + - name: Test lit |
| 103 | + run: | |
| 104 | + mkdir build && cd build |
| 105 | + export FILECHECK_OPTS='-dump-input-filter=all -vv -color' |
| 106 | + cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja |
| 107 | + ninja -v -j $(nproc) check-lit |
| 108 | +
|
| 109 | + - name: Package lit |
| 110 | + run: | |
| 111 | + cd llvm/utils/lit |
| 112 | + # Remove 'dev' suffix from lit version. |
| 113 | + sed -i 's/ + "dev"//g' lit/__init__.py |
| 114 | + python3 -m build |
| 115 | +
|
| 116 | + - uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 |
| 117 | + with: |
| 118 | + name: lit-${{ inputs.release-version }}-release-binary |
| 119 | + path: | |
| 120 | + llvm/utils/lit/dist |
| 121 | +
|
| 122 | + - name: Upload lit to test.pypi.org |
| 123 | + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 |
| 124 | + with: |
| 125 | + repository-url: https://test.pypi.org/legacy/ |
| 126 | + packages-dir: llvm/utils/lit/dist/ |
| 127 | + |
| 128 | + - name: Upload lit to pypi.org |
| 129 | + uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0 |
| 130 | + with: |
| 131 | + packages-dir: llvm/utils/lit/dist/ |
| 132 | + |
76 | 133 | release-binaries: |
77 | 134 | name: Build Release Binaries |
78 | 135 | permissions: |
|
0 commit comments