@@ -12,78 +12,83 @@ concurrency:
1212jobs :
1313 build-and-deploy :
1414 runs-on :
15- labels : ubuntu-22 .04-32core
15+ labels : ubuntu-24 .04-16core
1616 permissions :
1717 contents : write
1818 steps :
19- - name : Checkout
20- uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3
21- with :
22- fetch-depth : 0 # Fetch all history for .GitInfo and .Lastmod
23- - name : Cache bazel build artifacts
24- uses :
actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # [email protected] 25- with :
26- path : |
27- ~/.cache/bazel
28- key : ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
29- restore-keys : |
30- ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-
19+ - name : Checkout
20+ uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # pin@v3
21+ with :
22+ fetch-depth : 0 # Fetch all history for .GitInfo and .Lastmod
3123
24+ - name : Install dependencies
25+ run : |
26+ ./.github/install_clang_version.sh 19
3227
33- # This requires building mlir-tblgen, but may not require a full llvm build
34- # as a result. It results in the files being added to their respective
35- # locations (relative to each *_inc_gen target) under bazel-bin. Note the
36- # _filegroup suffix is required to actually write the markdown files to
37- # disk.
38- - name : " Build markdown files from tblgen sources "
39- run : |
40- bazel query "filter('_filegroup ', siblings(kind('gentbl_rule ', @heir//...)))" | \
41- xargs bazel build --//:enable_openmp=0 -c fastbuild "$@"
28+ - name : Cache bazel build artifacts
29+ uses : actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # [email protected] 30+ with :
31+ path : |
32+ ~/.cache/bazel
33+ key : ${{ runner.os }}-clang19-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
34+ restore-keys : |
35+ ${{ runner.os }}-clang19-${{ hashFiles('.bazelversion ', '.bazelrc ', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-${{ hashFiles('bazel/import_llvm.bzl') }}
36+ ${{ runner.os }}-clang19-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE.bzlmod', 'MODULE.bazel') }}-
4237
43- - name : " Copy markdown files to docs/"
44- run : |
45- python -m pip install --upgrade pip
46- python -m pip install pyyaml==6.0.2 fire==0.7.0
47- # heir-opt is needed to generate the doctest examples
48- bazel build --//:enable_openmp=0 -c fastbuild //tools:heir-opt
49- python -m scripts.docs.copy_tblgen_files
38+ # This requires building mlir-tblgen, but may not require a full llvm build
39+ # as a result. It results in the files being added to their respective
40+ # locations (relative to each *_inc_gen target) under bazel-bin. Note the
41+ # _filegroup suffix is required to actually write the markdown files to
42+ # disk.
43+ - name : " Build markdown files from tblgen sources"
44+ run : |
45+ bazel query "filter('_filegroup', siblings(kind('gentbl_rule', @heir//...)))" | \
46+ xargs bazel build --//:enable_openmp=0 -c opt "$@"
5047
51- # Please update the local install instructions at docs/README.md if
52- # changing hugo version
53- - name : Setup Hugo
54- uses : peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # [email protected] .0 55- with :
56- hugo-version : ' 0.113.0 '
57- extended : true
48+ - name : " Copy markdown files to docs/"
49+ run : |
50+ python -m pip install --upgrade pip
51+ python -m pip install pyyaml==6.0.2 fire==0.7 .0
52+ # heir-opt is needed to generate the doctest examples
53+ bazel build --//:enable_openmp=0 -c opt //tools:heir-opt
54+ python -m scripts.docs.copy_tblgen_files
5855
59- # Please update the local install instructions at docs/README.md if
60- # changing node version
61- - name : Setup Node
62- uses : actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
63- with :
64- node-version : ' 18'
65- cache : ' npm'
66- # The action defaults to search for the dependency file (package-lock.json,
67- # npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
68- # hash as a part of the cache key.
69- # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
70- cache-dependency-path : ' **/package-lock.json'
56+ # Please update the local install instructions at docs/README.md if
57+ # changing hugo version
58+ - name : Setup Hugo
59+ uses :
peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # [email protected] 60+ with :
61+ hugo-version : ' 0.113.0'
62+ extended : true
7163
72- - name : Install Docsy dependencies
73- working-directory : ./docs
74- run : npm ci
64+ # Please update the local install instructions at docs/README.md if
65+ # changing node version
66+ - name : Setup Node
67+ uses : actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # v4.0.4
68+ with :
69+ node-version : ' 18'
70+ cache : ' npm'
71+ # The action defaults to search for the dependency file (package-lock.json,
72+ # npm-shrinkwrap.json or yarn.lock) in the repository root, and uses its
73+ # hash as a part of the cache key.
74+ # https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
75+ cache-dependency-path : ' **/package-lock.json'
7576
76- - name : Build
77- working-directory : ./docs
78- run : hugo --minify
77+ - name : Install Docsy dependencies
78+ working-directory : ./docs
79+ run : npm ci
7980
80- - name : Copy CNAME to hugo public dir
81- working-directory : ./docs
82- run : cp CNAME public/CNAME
81+ - name : Build
82+ working-directory : ./docs
83+ run : hugo --minify
8384
84- - name : Deploy
85- uses :
peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # [email protected] 86- if : github.ref == 'refs/heads/main'
87- with :
88- github_token : ${{ secrets.GITHUB_TOKEN }}
89- publish_dir : ./docs/public
85+ - name : Copy CNAME to hugo public dir
86+ working-directory : ./docs
87+ run : cp CNAME public/CNAME
88+
89+ - name : Deploy
90+ uses :
peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # [email protected] 91+ if : github.ref == 'refs/heads/main'
92+ with :
93+ github_token : ${{ secrets.GITHUB_TOKEN }}
94+ publish_dir : ./docs/public
0 commit comments