Skip to content

Commit 66dead9

Browse files
committed
ci: add clean up of repo
1 parent c547aa0 commit 66dead9

File tree

1 file changed

+66
-65
lines changed

1 file changed

+66
-65
lines changed

.github/workflows/self-hosted.yml

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -26,79 +26,80 @@ jobs:
2626
steps:
2727
- name: Cleanup workspace
2828
run: |
29-
echo ${{ github.workspace }}
29+
rm -rf ${{ github.workspace }}/*
30+
rm -rf ${{ github.workspace }}/.*
3031
31-
# - uses: actions/checkout@v4
32-
# with:
33-
# submodules: recursive
32+
- uses: actions/checkout@v4
33+
with:
34+
submodules: recursive
3435

35-
# - name: Set environment variables
36-
# run: |
37-
# echo "CUDA_PATH=/usr/local/cuda-12.8" >> $GITHUB_ENV
38-
# echo "${CUDA_PATH}/bin" >> $GITHUB_PATH
39-
# echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
40-
# echo "CC=/usr/bin/gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
41-
# echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
42-
# echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
43-
# echo "CUDACXX=/usr/local/cuda-${{ matrix.cuda }}/bin/nvcc" >> $GITHUB_ENV
36+
- name: Set environment variables
37+
run: |
38+
echo "CUDA_PATH=/usr/local/cuda-12.8" >> $GITHUB_ENV
39+
echo "${CUDA_PATH}/bin" >> $GITHUB_PATH
40+
echo "LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH}" >> $GITHUB_ENV
41+
echo "CC=/usr/bin/gcc-${{ matrix.gcc }}" >> $GITHUB_ENV
42+
echo "CXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
43+
echo "CUDAHOSTCXX=/usr/bin/g++-${{ matrix.gcc }}" >> $GITHUB_ENV
44+
echo "CUDACXX=/usr/local/cuda-${{ matrix.cuda }}/bin/nvcc" >> $GITHUB_ENV
4445
45-
# - name: Configure CMake build
46-
# run: cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCUBOOL_BUILD_TESTS=ON
46+
- name: Configure CMake build
47+
run: cmake . -B ${{ env.build_dir }} -DCMAKE_BUILD_TYPE=${{ env.config }} -DCUBOOL_BUILD_TESTS=ON
4748

48-
# - name: Build library sources
49-
# working-directory: ${{ env.build_dir }}
50-
# run: cmake --build . --target all --verbose -j `nproc`
49+
- name: Build library sources
50+
working-directory: ${{ env.build_dir }}
51+
run: cmake --build . --target all --verbose -j `nproc`
5152

52-
# test:
53-
# name: Test ${{ matrix.os }} GCC ${{ matrix.gcc }} CUDA ${{ matrix.cuda }}
54-
# needs: build
55-
# runs-on: self-hosted
56-
# env:
57-
# unit-test-file: test_fallback.txt
58-
# regression-test-file: test_regression.txt
59-
# strategy:
60-
# fail-fast: false
61-
# matrix:
62-
# include:
63-
# - os: ubuntu-24.04
64-
# cuda: "12.8"
65-
# gcc: 13
53+
test:
54+
name: Test ${{ matrix.os }} GCC ${{ matrix.gcc }} CUDA ${{ matrix.cuda }}
55+
needs: build
56+
runs-on: self-hosted
57+
env:
58+
unit-test-file: test_fallback.txt
59+
regression-test-file: test_regression.txt
60+
strategy:
61+
fail-fast: false
62+
matrix:
63+
include:
64+
- os: ubuntu-24.04
65+
cuda: "12.8"
66+
gcc: 13
6667

67-
# steps:
68-
# - name: Run unit-tests
69-
# working-directory: ${{ env.build_dir }}
70-
# run: |
71-
# chmod +x scripts/run_tests_fallback.sh
72-
# ./scripts/run_tests_fallback.sh | tee ${{ env.unit-test-file }}
68+
steps:
69+
- name: Run unit-tests
70+
working-directory: ${{ env.build_dir }}
71+
run: |
72+
chmod +x scripts/run_tests_fallback.sh
73+
./scripts/run_tests_fallback.sh | tee ${{ env.unit-test-file }}
7374
74-
# - name: Upload unit tests resutls
75-
# uses: actions/upload-artifact@v4
76-
# with:
77-
# name: ${{ env.unit-test-file }}
78-
# path: ${{ env.build_dir }}/${{ env.unit-test-file }}
75+
- name: Upload unit tests resutls
76+
uses: actions/upload-artifact@v4
77+
with:
78+
name: ${{ env.unit-test-file }}
79+
path: ${{ env.build_dir }}/${{ env.unit-test-file }}
7980

80-
# - name: Check for unit tests results
81-
# working-directory: ${{ env.build_dir }}
82-
# run: |
83-
# if cat ${{ env.unit-test-file }} | grep -q "FAILED"; then
84-
# exit 1
85-
# fi
81+
- name: Check for unit tests results
82+
working-directory: ${{ env.build_dir }}
83+
run: |
84+
if cat ${{ env.unit-test-file }} | grep -q "FAILED"; then
85+
exit 1
86+
fi
8687
87-
# - name: Run regression-tests
88-
# working-directory: ${{ env.build_dir }}/python
89-
# run: |
90-
# chmod +x run_tests.sh
91-
# ./run_tests.sh | tee ${{ env.regression-test-file }}
88+
- name: Run regression-tests
89+
working-directory: ${{ env.build_dir }}/python
90+
run: |
91+
chmod +x run_tests.sh
92+
./run_tests.sh | tee ${{ env.regression-test-file }}
9293
93-
# - name: Upload regression tests resutls
94-
# uses: actions/upload-artifact@v4
95-
# with:
96-
# name: ${{ env.regression-test-file }}
97-
# path: ${{ env.build_dir }}/python/${{ env.regression-test-file }}
94+
- name: Upload regression tests resutls
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: ${{ env.regression-test-file }}
98+
path: ${{ env.build_dir }}/python/${{ env.regression-test-file }}
9899

99-
# - name: Check for regression tests results
100-
# working-directory: ${{ env.build_dir }}/python
101-
# run: |
102-
# if cat ${{ env.regression-test-file }} | grep -q "FAILED"; then
103-
# exit 1
104-
# fi
100+
- name: Check for regression tests results
101+
working-directory: ${{ env.build_dir }}/python
102+
run: |
103+
if cat ${{ env.regression-test-file }} | grep -q "FAILED"; then
104+
exit 1
105+
fi

0 commit comments

Comments
 (0)