[llvm] workflows: Refactor release-tasks.yml (PR #69523)

Tobias Hieta via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 08:23:18 PST 2023


================
@@ -0,0 +1,74 @@
+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
+
+jobs:
+  release-lit:
+    name: Release Lit
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout LLVM
+        uses: actions/checkout at v4
+        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 }}
+        run: |
+          ./llvm/utils/release/./github-upload-release.py --token "$GITHUB_TOKEN" --user ${{ github.actor }} check-permissions
+
+      - name: Setup Cpp
+        uses: aminya/setup-cpp at v1
+        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
+
+      - name: Upload lit to test.pypi.org
+        uses: pypa/gh-action-pypi-publish at release/v1
+        with:
+          password: ${{ secrets.LLVM_LIT_TEST_PYPI_API_TOKEN }}
+          repository-url: https://test.pypi.org/legacy/
----------------
tru wrote:

is the legacy part of this URL intentional?

https://github.com/llvm/llvm-project/pull/69523


More information about the llvm-commits mailing list