Skip to content

Commit 82b36e7

Browse files
authored
[eudsl-tblgen] pybind TableGen (#24)
1 parent f0606d1 commit 82b36e7

30 files changed

+11863
-238
lines changed

.clang-format

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BasedOnStyle: LLVM
2+
AlwaysBreakTemplateDeclarations: Yes

.github/actions/setup_base/action.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
restore-key:
1515
required: true
1616
description: ''
17+
python-version:
18+
required: false
19+
description: ''
20+
default: '3.12'
1721

1822
outputs:
1923
cache-dir:
@@ -45,7 +49,7 @@ runs:
4549
id: canonicalize-cache-dir
4650
shell: bash
4751
run: |
48-
if [[ "${{ inputs.os }}" == "almalinux" ]]; then
52+
if [[ "${{ inputs.os }}" == "almalinux" ]] || [[ "${{ inputs.os }}" == "ubuntu" ]]; then
4953
echo "cache-dir=/tmp/.container-cache" >> $GITHUB_OUTPUT
5054
elif [[ "${{ inputs.os }}" == "macos" ]]; then
5155
echo "cache-dir=/tmp/.container-cache" >> $GITHUB_OUTPUT
@@ -81,18 +85,18 @@ runs:
8185
8286
- name: "Install Python"
8387
uses: actions/setup-python@v4
84-
if: ${{ startsWith(inputs.os, 'macos') || startsWith(inputs.os, 'windows') }}
88+
if: ${{ startsWith(inputs.os, 'macos') || startsWith(inputs.os, 'windows') || startsWith(inputs.os, 'ubuntu') }}
8589
with:
86-
python-version: '3.12'
90+
python-version: ${{ inputs.python-version }}
8791

8892
- name: "Setup compiler/toolchain"
8993
uses: aminya/setup-cpp@v1
90-
if: ${{ startsWith(inputs.os, 'almalinux') || startsWith(inputs.os, 'windows') }}
94+
if: ${{ startsWith(inputs.os, 'almalinux') || startsWith(inputs.os, 'ubuntu') || startsWith(inputs.os, 'windows') }}
9195
with:
9296
compiler: llvm-18
9397
cmake: true
9498
ninja: true
95-
ccache: ${{ startsWith(inputs.os, 'windows') }}
99+
ccache: ${{ startsWith(inputs.os, 'windows') || startsWith(inputs.os, 'ubuntu') }}
96100
vcvarsall: ${{ startsWith(inputs.os, 'windows') }}
97101

98102
- name: "Set CC/CXX"
@@ -101,6 +105,9 @@ runs:
101105
if [[ "${{ inputs.os }}" == "almalinux" ]]; then
102106
echo "CC=/github/home/llvm/bin/clang" >> $GITHUB_ENV
103107
echo "CXX=/github/home/llvm/bin/clang++" >> $GITHUB_ENV
108+
elif [[ "${{ inputs.os }}" == "ubuntu" ]]; then
109+
echo "CC=/usr/lib/llvm-18/bin/clang" >> $GITHUB_ENV
110+
echo "CXX=/usr/lib/llvm-18/bin/clang++" >> $GITHUB_ENV
104111
elif [[ "${{ inputs.os }}" == "windows" ]]; then
105112
echo "CC=/C/Users/runneradmin/llvm/bin/clang-cl.exe" >> $GITHUB_ENV
106113
echo "CXX=/C/Users/runneradmin/llvm/bin/clang-cl.exe" >> $GITHUB_ENV
@@ -113,8 +120,8 @@ runs:
113120
shell: bash
114121
run: |
115122
python3_command=""
116-
if (command -v python3.12 &> /dev/null); then
117-
python3_command="python3.12"
123+
if (command -v python${{ inputs.python-version }} &> /dev/null); then
124+
python3_command="python${{ inputs.python-version }}"
118125
elif (command -v python3 &> /dev/null); then
119126
python3_command="python3"
120127
elif (command -v python &> /dev/null); then
@@ -139,6 +146,7 @@ runs:
139146
echo "CCACHE_CPP2=true" >> $GITHUB_ENV
140147
echo "CCACHE_UMASK=002" >> $GITHUB_ENV
141148
149+
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
142150
echo "CMAKE_C_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
143151
echo "CMAKE_CXX_COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV
144152
echo "Python3_EXECUTABLE=$(which $python3_command)" >> $GITHUB_ENV

.github/workflows/build_eudsl.yml

-154
This file was deleted.

0 commit comments

Comments
 (0)