Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stage cache before build #39

Merged
merged 11 commits into from
Oct 20, 2024
21 changes: 20 additions & 1 deletion .github/workflows/cmake-single-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,29 @@ jobs:
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

- name: Restore build cache
uses: actions/cache@v4
with:
path: build
key: ${{ runner.os }}-build-${{ hashFiles('**/*.cpp', '**/*.h') }}
restore-keys: |
${{ runner.os }}-build-

- name: Build project
run: |
docker run --rm -v ${{ github.workspace }}:/workspace apriltags_cuda:latest \
bash -c "cd /workspace && cmake -B build -DCMAKE_CUDA_COMPILER=clang++-17 -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_CUDA_ARCHITECTURES=52 -DNUM_PROCESSORS=2 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} && cmake --build build"
bash -c "cd /workspace && \
git config --system --add safe.directory /workspace/build/OpenCV/src/OpenCV && \
git config --system --add safe.directory /workspace/build/wpilib/src/wpilib && \
git config --system --add safe.directory /workspace/build/wpilib/src/wpilib-build/_deps/googletest-src && \
git config --system --add safe.directory /workspace/build/wpilib/src/wpilib-build/_deps/apriltaglib-src && \
git config --system --add safe.directory /workspace/build/seasocks/src/seasocks && \
git config --system --add safe.directory /workspace/build/cccl/src/CCCL && \
git config --system --add safe.directory /workspace/build/json/src/json && \
git config --system --add safe.directory /workspace/build/apriltag/src/apriltag && \
cmake -B build -DCMAKE_CUDA_COMPILER=clang++-17 \
-DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_CUDA_ARCHITECTURES=52 \
-DNUM_PROCESSORS=2 -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} && cmake --build build"

- name: Run tests
run: |
Expand Down
Loading