This repository was archived by the owner on Nov 27, 2025. It is now read-only.
ci: @actions/cache v2 was deprecated #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This piece of code was made by ChatGPT because I don't care enough to learn this | |
| name: Build project | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📥 Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive # Gets submodules | |
| - name: ⚙️ Set up dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y cmake ninja-build clang g++ | |
| sudo apt-get install -y mesa-utils libglu1-mesa-dev freeglut3-dev mesa-common-dev | |
| sudo apt-get install -y libglew-dev libglfw3-dev libglm-dev | |
| sudo apt-get install -y libfontconfig1-dev libfreetype-dev libjpeg-turbo8-dev libpng-dev libwebp-dev | |
| sudo apt-get install -y libharfbuzz-dev libicu-dev | |
| - name: Cache build directory | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/ | |
| key: ${{ runner.os }}-build-${{ hashFiles('**/CMakeLists.txt', '**/*.cpp') }} | |
| restore-keys: | | |
| ${{ runner.os }}-build- | |
| - name: 🏗️ Configure and build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake .. | |
| cmake --build . -j$(nproc) | |
| - name: 📦 Upload executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: RenderingLab | |
| path: | | |
| build/* | |
| if-no-files-found: error |