-
Notifications
You must be signed in to change notification settings - Fork 10
123 lines (106 loc) · 4.26 KB
/
release-tasks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Release Task
permissions:
contents: read
on:
push:
tags:
# The regex support here is limited, so just match everything that starts with llvmorg- and filter later.
- 'llvmorg-*'
jobs:
release-tasks:
permissions:
contents: write # To upload assets to release.
runs-on: ubuntu-latest
if: github.repository == 'llvm/llvm-project'
steps:
- name: Validate Tag
id: validate-tag
run: |
test "${{ github.actor }}" = "tstellar" || test "${{ github.actor }}" = "tru"
echo "${{ github.ref_name }}" | grep -e '^llvmorg-[0-9]\+\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?$'
release_version=$(echo "${{ github.ref_name }}" | sed 's/llvmorg-//g')
echo "release-version=$release_version" >> $GITHUB_OUTPUT
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
doxygen \
graphviz \
python3-github \
python3-recommonmark \
python3-sphinx \
ninja-build \
texlive-font-utils
pip3 install --user sphinx-markdown-tables
- name: Checkout LLVM
uses: actions/checkout@v3
- name: Create Release
run: |
./llvm/utils/release/./github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} create
- name: Build Documentation
run: |
./llvm/utils/release/build-docs.sh -release ${{ steps.validate-tag.outputs.release-version }}
./llvm/utils/release/github-upload-release.py --token ${{ github.token }} --release ${{ steps.validate-tag.outputs.release-version }} upload --files *doxygen*.tar.xz
- name: Create Release Notes Artifact
uses: actions/upload-artifact@v3
with:
name: release-notes
path: docs-build/html-export/
- name: Clone www-releases
if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
uses: actions/checkout@v3
with:
repository: ${{ github.repository_owner }}/www-releases
ref: main
fetch-depth: 0
path: www-releases
- name: Upload Release Notes
if: ${{ !contains(steps.validate-tag.outputs.release-version, 'rc') }}
run: |
mkdir -p ../www-releases/${{ steps.validate-tag.outputs.release-version }}
mv ./docs-build/html-export/* ../www-releases/${{ steps.validate-tag.outputs.release-version }}
cd ../www-releases
git add ${{ steps.validate-tag.outputs.release-version }}
git config user.email "[email protected]"
git config user.name "llvmbot"
git commit -a -m "Add ${{ steps.validate-tag.outputs.release-version }} documentation"
git push https://${{ secrets.WWW_RELEASES_TOKEN }}@github.com/${{ github.repository_owner }}/www-releases main:main
release-lit:
runs-on: ubuntu-latest
if: github.repository == 'llvm/llvm-project'
steps:
- name: Checkout LLVM
uses: actions/checkout@v3
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: llvm-16.0.6
cmake: true
ninja: true
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-setuptools python3-psutil
- 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@release/v1
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@release/v1
with:
password: ${{ secrets.LLVM_LIT_PYPI_API_TOKEN }}
packages-dir: llvm/utils/lit/dist/