|
53 | 53 | build-hstream-admin-store: |
54 | 54 | needs: pre-build |
55 | 55 | runs-on: ubuntu-latest |
| 56 | + if: false |
56 | 57 | strategy: |
57 | 58 | fail-fast: false |
58 | 59 | steps: |
@@ -159,97 +160,128 @@ jobs: |
159 | 160 | ${{ env.CABAL }} update |
160 | 161 | ${{ env.SHELL }} "'make clean'" |
161 | 162 | ${{ env.SHELL }} make |
162 | | - ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} build --enable-tests --enable-benchmarks all |
163 | | - ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} install hstream |
164 | | -
|
165 | | - - name: start hstream server |
166 | | - run: | |
167 | | - export CONTAINER_NAME=$TEST_CONTAINER_NAME |
168 | | - export IMAGE="docker.io/hstreamdb/haskell:${{ matrix.ghc }}" |
169 | | - export EXTRA_OPTS="--check --no-interactive --detach" |
170 | | - export COMMAND=" " |
171 | | - export EXE=$(find dist-newstyle -name "hstream-server" -type f) |
172 | | - ./script/start-server.sh |
173 | | - sleep 5 |
174 | | - docker logs --tail 100 $TEST_CONTAINER_NAME |
175 | | -
|
176 | | - - name: test |
177 | | - run: | |
178 | | - ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} test --test-show-details=direct all |
| 163 | + ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} build hstream-common-stats-test |
| 164 | + # ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} build --enable-tests --enable-benchmarks all |
| 165 | + # ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} install hstream |
| 166 | +
|
| 167 | +# - name: start hstream server |
| 168 | +# run: | |
| 169 | +# export CONTAINER_NAME=$TEST_CONTAINER_NAME |
| 170 | +# export IMAGE="docker.io/hstreamdb/haskell:${{ matrix.ghc }}" |
| 171 | +# export EXTRA_OPTS="--check --no-interactive --detach" |
| 172 | +# export COMMAND=" " |
| 173 | +# export EXE=$(find dist-newstyle -name "hstream-server" -type f) |
| 174 | +# ./script/start-server.sh |
| 175 | +# sleep 5 |
| 176 | +# docker logs --tail 100 $TEST_CONTAINER_NAME |
| 177 | +# |
| 178 | +# - name: test |
| 179 | +# run: | |
| 180 | +# for i in {1..100}; do |
| 181 | +# ${{ env.CABAL }} ${{ env.EXTRA_CABAL_ARGS }} test --test-show-details=direct all |
| 182 | +# done |
| 183 | +# |
| 184 | +# - name: collect hserver logs |
| 185 | +# if: ${{ success() }} || ${{ failure() }} |
| 186 | +# run: | |
| 187 | +# rm -rf hserver.log |
| 188 | +# docker logs $TEST_CONTAINER_NAME &> hserver.log |
| 189 | +# |
| 190 | +# - name: upload hserver logs |
| 191 | +# uses: actions/upload-artifact@v3 |
| 192 | +# if: ${{ success() }} || ${{ failure() }} |
| 193 | +# with: |
| 194 | +# name: hserver-logs-${{ matrix.ghc }} |
| 195 | +# path: hserver.log |
| 196 | +# retention-days: 7 |
| 197 | +# |
| 198 | +# # Due to an [cabal bug](https://github.com/haskell/cabal/issues/7423), |
| 199 | +# # `cabal check` will emit a warning even if the `-O2` option is just |
| 200 | +# # an flag. This is disabled until the problem is fixed. |
| 201 | +# #- name: check |
| 202 | +# # run: | |
| 203 | +# # python3 script/dev-tools cabal --check --no-interactive -i docker.io/hstreamdb/haskell:${{ matrix.ghc }} -- sdist all |
| 204 | +# |
| 205 | +# # # unfortunately, there is no `cabal check all` |
| 206 | +# # #log_info "Run all cabal check..." |
| 207 | +# # # Note that we ignore hstream-store package to run cabal check, because there |
| 208 | +# # # is an unexpected warning: |
| 209 | +# # # ... |
| 210 | +# # # Warning: 'cpp-options': -std=c++17 is not portable C-preprocessor flag |
| 211 | +# # # Warning: Hackage would reject this package. |
| 212 | +# # for dir in hstream-sql hstream-processing hstream; do |
| 213 | +# # python3 script/dev-tools shell --check --no-interactive -i docker.io/hstreamdb/haskell:${{ matrix.ghc }} "'cd $dir && cabal check'" |
| 214 | +# # done |
| 215 | +# |
| 216 | +# # TODO |
| 217 | +# #- name: haddock |
| 218 | +# # python3 script/dev-tools cabal --check --no-interactive -i docker.io/hstreamdb/haskell:${{ matrix.ghc }} -- haddock haddock --enable-documentation --haddock-for-hackage all |
| 219 | +# |
| 220 | +# # ------------------------------------------------------------------------------- |
| 221 | +# |
| 222 | +# - name: stop all started services |
| 223 | +# run: docker rm -f $(docker ps -a -q) |
| 224 | +# |
| 225 | +# # NOTE: The quick-build-dev-image relies on the "hstreamdb/hstream" base image. |
| 226 | +# # If you have installed any additional libraries in the builder image (hstreamdb/haskell), |
| 227 | +# # and these libraries are required (e.g., if a lib.so file is needed), you may encounter a |
| 228 | +# # linking error during the integration tests that follow. In such cases, you will need to |
| 229 | +# # publish a new version of the hstreamdb/hstream image first, which includes the necessary |
| 230 | +# # libraries. |
| 231 | +# - name: quick build new hstream image |
| 232 | +# run: | |
| 233 | +# mkdir -p ~/data |
| 234 | +# if [ "${{ env.GHC_MAJOR_VER }}" = "8" ]; then |
| 235 | +# python3 script/dev-tools quick-build-dev-image \ |
| 236 | +# --builder-image docker.io/hstreamdb/haskell:${{ matrix.ghc }} \ |
| 237 | +# --project-file cabal.project.ghc810 \ |
| 238 | +# --only-hstream \ |
| 239 | +# -t $NEW_HSTREAM_IMAGE |
| 240 | +# else |
| 241 | +# python3 script/dev-tools quick-build-dev-image \ |
| 242 | +# --builder-image docker.io/hstreamdb/haskell:${{ matrix.ghc }} \ |
| 243 | +# --only-hstream \ |
| 244 | +# -t $NEW_HSTREAM_IMAGE |
| 245 | +# fi |
| 246 | +# |
| 247 | +# docker save -o ~/data/new_hstream_image.tar $NEW_HSTREAM_IMAGE |
| 248 | +# |
| 249 | +# - uses: actions/upload-artifact@v3 |
| 250 | +# with: |
| 251 | +# name: image-testing-${{ matrix.ghc }} |
| 252 | +# path: ~/data/new_hstream_image.tar |
| 253 | +# retention-days: 2 |
179 | 254 |
|
180 | | - - name: collect hserver logs |
181 | | - if: ${{ success() }} || ${{ failure() }} |
182 | | - run: | |
183 | | - rm -rf hserver.log |
184 | | - docker logs $TEST_CONTAINER_NAME &> hserver.log |
| 255 | + - uses: actions/upload-artifact@v3 |
| 256 | + with: |
| 257 | + name: stats_test |
| 258 | + path: dist-newstyle/build/x86_64-linux/ghc-9.2.7/hstream-common-stats-0.1.0.0/build/hstream-common-stats-test/hstream-common-stats-test |
| 259 | + retention-days: 2 |
185 | 260 |
|
186 | | - - name: upload hserver logs |
187 | | - uses: actions/upload-artifact@v3 |
188 | | - if: ${{ success() }} || ${{ failure() }} |
| 261 | + stats-tests: |
| 262 | + needs: [build-and-test] |
| 263 | + runs-on: ubuntu-latest |
| 264 | + name: run-stats-tests |
| 265 | + steps: |
| 266 | + - uses: actions/download-artifact@v3 |
189 | 267 | with: |
190 | | - name: hserver-logs-${{ matrix.ghc }} |
191 | | - path: hserver.log |
192 | | - retention-days: 7 |
| 268 | + name: stats_test |
| 269 | + path: ~/data/hstream-common-stats-test |
193 | 270 |
|
194 | | - # Due to an [cabal bug](https://github.com/haskell/cabal/issues/7423), |
195 | | - # `cabal check` will emit a warning even if the `-O2` option is just |
196 | | - # an flag. This is disabled until the problem is fixed. |
197 | | - #- name: check |
198 | | - # run: | |
199 | | - # python3 script/dev-tools cabal --check --no-interactive -i docker.io/hstreamdb/haskell:${{ matrix.ghc }} -- sdist all |
200 | | - |
201 | | - # # unfortunately, there is no `cabal check all` |
202 | | - # #log_info "Run all cabal check..." |
203 | | - # # Note that we ignore hstream-store package to run cabal check, because there |
204 | | - # # is an unexpected warning: |
205 | | - # # ... |
206 | | - # # Warning: 'cpp-options': -std=c++17 is not portable C-preprocessor flag |
207 | | - # # Warning: Hackage would reject this package. |
208 | | - # for dir in hstream-sql hstream-processing hstream; do |
209 | | - # python3 script/dev-tools shell --check --no-interactive -i docker.io/hstreamdb/haskell:${{ matrix.ghc }} "'cd $dir && cabal check'" |
210 | | - # done |
211 | | - |
212 | | - # TODO |
213 | | - #- name: haddock |
214 | | - # python3 script/dev-tools cabal --check --no-interactive -i docker.io/hstreamdb/haskell:${{ matrix.ghc }} -- haddock haddock --enable-documentation --haddock-for-hackage all |
215 | | - |
216 | | - # ------------------------------------------------------------------------------- |
217 | | - |
218 | | - - name: stop all started services |
219 | | - run: docker rm -f $(docker ps -a -q) |
220 | | - |
221 | | - # NOTE: The quick-build-dev-image relies on the "hstreamdb/hstream" base image. |
222 | | - # If you have installed any additional libraries in the builder image (hstreamdb/haskell), |
223 | | - # and these libraries are required (e.g., if a lib.so file is needed), you may encounter a |
224 | | - # linking error during the integration tests that follow. In such cases, you will need to |
225 | | - # publish a new version of the hstreamdb/hstream image first, which includes the necessary |
226 | | - # libraries. |
227 | | - - name: quick build new hstream image |
| 271 | + - name: CPU info |
228 | 272 | run: | |
229 | | - mkdir -p ~/data |
230 | | - if [ "${{ env.GHC_MAJOR_VER }}" = "8" ]; then |
231 | | - python3 script/dev-tools quick-build-dev-image \ |
232 | | - --builder-image docker.io/hstreamdb/haskell:${{ matrix.ghc }} \ |
233 | | - --project-file cabal.project.ghc810 \ |
234 | | - --only-hstream \ |
235 | | - -t $NEW_HSTREAM_IMAGE |
236 | | - else |
237 | | - python3 script/dev-tools quick-build-dev-image \ |
238 | | - --builder-image docker.io/hstreamdb/haskell:${{ matrix.ghc }} \ |
239 | | - --only-hstream \ |
240 | | - -t $NEW_HSTREAM_IMAGE |
241 | | - fi |
| 273 | + sudo apt-get install cpuid |
| 274 | + cpuid |
242 | 275 |
|
243 | | - docker save -o ~/data/new_hstream_image.tar $NEW_HSTREAM_IMAGE |
244 | | -
|
245 | | - - uses: actions/upload-artifact@v3 |
246 | | - with: |
247 | | - name: image-testing-${{ matrix.ghc }} |
248 | | - path: ~/data/new_hstream_image.tar |
249 | | - retention-days: 2 |
| 276 | + - run: | |
| 277 | + chmod +x ~/data/hstream-common-stats-test/hstream-common-stats-test |
| 278 | + for i in {1..1000}; do |
| 279 | + docker run -t --rm -v $HOME/data:/data docker.io/hstreamdb/haskell:9.2.7 /data/hstream-common-stats-test/hstream-common-stats-test |
| 280 | + done |
250 | 281 |
|
251 | 282 | integration-tests: |
252 | 283 | needs: [pre-build, build-and-test] |
| 284 | + if: false |
253 | 285 | runs-on: ubuntu-latest |
254 | 286 | name: integration-tests-ghc-${{ matrix.ghc }} |
255 | 287 | strategy: |
@@ -307,6 +339,7 @@ jobs: |
307 | 339 |
|
308 | 340 | integration-tests-rqlite: |
309 | 341 | needs: [pre-build, build-and-test] |
| 342 | + if: false |
310 | 343 | runs-on: ubuntu-latest |
311 | 344 | name: integration-tests-rqlite-ghc-${{ matrix.ghc }} |
312 | 345 | strategy: |
@@ -365,6 +398,7 @@ jobs: |
365 | 398 |
|
366 | 399 | distributed-tests: |
367 | 400 | needs: [pre-build, build-and-test] |
| 401 | + if: false |
368 | 402 | runs-on: ubuntu-latest |
369 | 403 | name: distributed-tests-ghc-${{ matrix.ghc }} |
370 | 404 | strategy: |
|
0 commit comments