@@ -39,84 +39,108 @@ jobs:
3939 make -C build -j"$NPROC"
4040 shell : bash
4141
42- - name : Upload build artifacts
43- uses : actions/upload-artifact@v4
42+ - name : Archive entire workspace
43+ run : |
44+ cd "$GITHUB_WORKSPACE"
45+ tar -cf linux-riscv64-workspace.tar .
46+ shell : bash
47+
48+ - name : Upload workspace artifacts
49+ uses : actions/upload-artifact@v7
4450 with :
45- name : linux-riscv64-build
46- path : build
51+ name : linux-riscv64-workspace
52+ path : ${{ github.workspace }}/linux-riscv64-workspace.tar
4753 if-no-files-found : error
48- compression-level : 0
4954
5055 cpp-tests :
51- name : C++ Tests (linux-riscv64)
56+ name : C++ Tests
5257 runs-on : ubuntu-24.04-riscv
5358 needs : build
5459
5560 steps :
56- - name : Checkout code
57- uses : actions/checkout@v6
61+ - name : Install test dependencies
62+ run : |
63+ sudo apt-get update
64+ sudo apt-get install -y python3-pybind11 pybind11-dev libgtest-dev liburing-dev
65+ shell : bash
66+
67+ - name : Download workspace artifacts
68+ uses : actions/download-artifact@v8
5869 with :
59- submodules : recursive
70+ name : linux-riscv64-workspace
71+ path : ${{ github.workspace }}
6072
61- - name : Set up environment variables
73+ - name : Extract workspace
6274 run : |
63- NPROC=$(nproc 2>/dev/null || echo 2)
64- echo "NPROC=$NPROC" >> "$GITHUB_ENV"
75+ cd "$GITHUB_WORKSPACE"
76+ tar -xf linux-riscv64-workspace.tar
6577 shell : bash
6678
67- - name : Download build artifacts
68- uses : actions/download-artifact@v4
69- with :
70- name : linux-riscv64-build
71- path : build
79+ - name : Reconfigure build directory
80+ run : |
81+ cd "$GITHUB_WORKSPACE"
82+ cmake -S . -B build \
83+ -G "Unix Makefiles" \
84+ -DCMAKE_BUILD_TYPE=Release \
85+ -DBUILD_TOOLS=ON \
86+ -DBUILD_PYTHON_BINDINGS=ON
87+ shell : bash
7288
7389 - name : Run C++ Tests
7490 run : |
7591 cd "$GITHUB_WORKSPACE/build"
92+ NPROC=$(nproc 2>/dev/null || echo 2)
7693 make unittest -j"$NPROC"
7794 shell : bash
7895
7996 python-tests :
80- name : Python Tests (linux-riscv64)
97+ name : Python Tests
8198 runs-on : ubuntu-24.04-riscv
8299 needs : build
83100
84101 steps :
85- - name : Checkout code
86- uses : actions/checkout@v6
87- with :
88- submodules : recursive
89-
90102 - name : Select Python
91103 run : |
92104 python3.10 --version
93105 echo "PYTHON=python3.10" >> "$GITHUB_ENV"
94106 shell : bash
95107
96- - name : Set up environment variables
108+ - name : Download workspace artifacts
109+ uses : actions/download-artifact@v8
110+ with :
111+ name : linux-riscv64-workspace
112+ path : ${{ github.workspace }}
113+
114+ - name : Extract workspace
97115 run : |
98- NPROC=$(nproc 2>/dev/null || echo 2)
99- echo "NPROC=$NPROC" >> "$GITHUB_ENV"
116+ cd "$GITHUB_WORKSPACE"
117+ tar -xf linux-riscv64-workspace.tar
100118 echo "$($PYTHON -c 'import site; print(site.USER_BASE)')/bin" >> "$GITHUB_PATH"
101119 shell : bash
102120
103- - name : Download build artifacts
104- uses : actions/download-artifact@v4
105- with :
106- name : linux-riscv64-build
107- path : build
108-
109121 - name : Install dependencies
110122 run : |
123+ sudo apt-get update
124+ sudo apt-get install -y libgtest-dev liburing-dev
111125 $PYTHON -m pip install --upgrade pip
112126 $PYTHON -m pip install numpy==2.2.2 cmake==3.30.0 ninja==1.11.1.1 --index-url "$RISE_PYPI"
113127 $PYTHON -m pip install pybind11==3.0 pytest scikit-build-core setuptools_scm
114128 shell : bash
115129
116- - name : Install from existing build directory
130+ - name : Reconfigure build directory
117131 run : |
118132 cd "$GITHUB_WORKSPACE"
133+ cmake -S . -B build \
134+ -G "Unix Makefiles" \
135+ -DCMAKE_BUILD_TYPE=Release \
136+ -DBUILD_TOOLS=ON \
137+ -DBUILD_PYTHON_BINDINGS=ON
138+ shell : bash
119139
140+ - name : Install from existing build directory
141+ run : |
142+ cd "$GITHUB_WORKSPACE"
143+ NPROC=$(nproc 2>/dev/null || echo 2)
120144 export SKBUILD_BUILD_DIR="$GITHUB_WORKSPACE/build"
121145 CMAKE_GENERATOR="Unix Makefiles" \
122146 CMAKE_BUILD_PARALLEL_LEVEL="$NPROC" \
@@ -132,32 +156,28 @@ jobs:
132156 shell : bash
133157
134158 cpp-examples :
135- name : C++ Examples (linux-riscv64)
159+ name : C++ Examples
136160 runs-on : ubuntu-24.04-riscv
137161 needs : build
138162
139163 steps :
140- - name : Checkout code
141- uses : actions/checkout@v6
164+ - name : Download workspace artifacts
165+ uses : actions/download-artifact@v8
142166 with :
143- submodules : recursive
167+ name : linux-riscv64-workspace
168+ path : ${{ github.workspace }}
144169
145- - name : Set up environment variables
170+ - name : Extract workspace
146171 run : |
147- NPROC=$(nproc 2>/dev/null || echo 2)
148- echo "NPROC=$NPROC" >> "$GITHUB_ENV"
172+ cd "$GITHUB_WORKSPACE"
173+ tar -xf linux-riscv64-workspace.tar
149174 shell : bash
150175
151- - name : Download build artifacts
152- uses : actions/download-artifact@v4
153- with :
154- name : linux-riscv64-build
155- path : build
156-
157176 - name : Run C++ Examples
158177 run : |
159178 cd "$GITHUB_WORKSPACE/examples/c++"
160- mkdir build && cd build
179+ NPROC=$(nproc 2>/dev/null || echo 2)
180+ mkdir -p build && cd build
161181 cmake .. -DCMAKE_BUILD_TYPE=Release
162182 make -j "$NPROC"
163183 ./db-example
@@ -166,32 +186,28 @@ jobs:
166186 shell : bash
167187
168188 c-examples :
169- name : C Examples (linux-riscv64)
189+ name : C Examples
170190 runs-on : ubuntu-24.04-riscv
171191 needs : build
172192
173193 steps :
174- - name : Checkout code
175- uses : actions/checkout@v6
194+ - name : Download workspace artifacts
195+ uses : actions/download-artifact@v8
176196 with :
177- submodules : recursive
197+ name : linux-riscv64-workspace
198+ path : ${{ github.workspace }}
178199
179- - name : Set up environment variables
200+ - name : Extract workspace
180201 run : |
181- NPROC=$(nproc 2>/dev/null || echo 2)
182- echo "NPROC=$NPROC" >> "$GITHUB_ENV"
202+ cd "$GITHUB_WORKSPACE"
203+ tar -xf linux-riscv64-workspace.tar
183204 shell : bash
184205
185- - name : Download build artifacts
186- uses : actions/download-artifact@v4
187- with :
188- name : linux-riscv64-build
189- path : build
190-
191206 - name : Run C Examples
192207 run : |
193208 cd "$GITHUB_WORKSPACE/examples/c"
194- mkdir build && cd build
209+ NPROC=$(nproc 2>/dev/null || echo 2)
210+ mkdir -p build && cd build
195211 cmake .. -DCMAKE_BUILD_TYPE=Release
196212 make -j "$NPROC"
197213 ./c_api_basic_example
0 commit comments