brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.4 KiB · e7a9457 Raw
80 lines · yaml
1name: Release Lit2 3permissions:4  contents: read5 6on:7  workflow_dispatch:8    inputs:9      release-version:10        description: 'Release Version'11        required: true12        type: string13 14  workflow_call:15    inputs:16      release-version:17        description: 'Release Version'18        required: true19        type: string20    secrets:21      RELEASE_TASKS_USER_TOKEN:22        description: "Secret used to check user permissions."23        required: false24 25jobs:26  release-lit:27    name: Release Lit28    runs-on: ubuntu-24.0429    steps:30      - name: Checkout LLVM31        uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.032        with:33          ref: "llvmorg-${{ inputs.release-version }}"34 35      - name: Install dependencies36        run: |37          sudo apt-get update38          sudo apt-get install -y python3-setuptools python3-psutil python3-github39 40      - name: Check Permissions41        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-permissions46 47      - name: Setup Cpp48        uses: aminya/setup-cpp@9bc9b8cd8a8d678f920e4e1e73f29da8010ced51 # v1.7.249        with:50          compiler: llvm-16.0.651          cmake: true52          ninja: true53 54      - name: Test lit55        run: |56          mkdir build && cd build57          export FILECHECK_OPTS='-dump-input-filter=all -vv -color'58          cmake ../llvm -DCMAKE_BUILD_TYPE=Release -G Ninja59          ninja -v -j $(nproc) check-lit60 61      - name: Package lit62        run: |63          cd llvm/utils/lit64          # Remove 'dev' suffix from lit version.65          sed -i 's/ + "dev"//g' lit/__init__.py66          python3 setup.py sdist bdist_wheel67 68      - name: Upload lit to test.pypi.org69        uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.070        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/74 75      - name: Upload lit to pypi.org76        uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.077        with:78          password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}79          packages-dir: llvm/utils/lit/dist/80