From bb97704d50a20ed53cfc48485dd7d5ea0f67db99 Mon Sep 17 00:00:00 2001 From: Daniel 'MrAdder' Green Date: Sun, 22 Mar 2026 09:31:04 +0000 Subject: [PATCH] Update build.yml --- .github/workflows/build.yml | 62 +++++++++++++------------------------ 1 file changed, 22 insertions(+), 40 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3dbb08488..159fbc595 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,6 +7,9 @@ on: - "alpha" - "beta" pull_request: + paths-ignore: + - "docs/**" + - "**/*.md" jobs: build: @@ -38,6 +41,14 @@ jobs: - name: Setup Ninja uses: seanmiddleditch/gha-setup-ninja@master + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.9 + + - name: Configure sccache + run: | + echo "SCCACHE_GHA_ENABLED=true" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "SCCACHE_IDLE_TIMEOUT=0" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + # cURL - name: Cache cURL id: cache-curl @@ -73,29 +84,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: "16" - - - name: Get Yarn Cache Directory - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Load Yarn Cache - uses: actions/cache@v5 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Load Cached Node Modules - uses: actions/cache@v5 - with: - path: "**/node_modules" - key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} + cache: yarn + cache-dependency-path: "**/yarn.lock" # Install yarn things - name: Install Assets - run: yarn + run: yarn --frozen-lockfile - name: Setup Build Version env: @@ -108,6 +102,8 @@ jobs: CFLAGS: -m32 CXX: clang-cl CXXFLAGS: -m32 + CMAKE_C_COMPILER_LAUNCHER: sccache + CMAKE_CXX_COMPILER_LAUNCHER: sccache run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja -Bbuild # Run the build and tests @@ -120,6 +116,9 @@ jobs: run: | ctest -C Release --output-on-failure --no-tests=error + - name: Show sccache stats + run: sccache --show-stats + # Do Srclinting - name: Get Changed Files (Src) id: changed-files-src @@ -202,29 +201,12 @@ jobs: uses: actions/setup-node@v4 with: node-version: "16" - - - name: Get Yarn Cache Directory - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" - - - name: Load Yarn Cache - uses: actions/cache@v5 - id: yarn-cache - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - - - name: Load Cached Node Modules - uses: actions/cache@v5 - with: - path: "**/node_modules" - key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }} + cache: yarn + cache-dependency-path: "**/yarn.lock" # Install yarn things - name: Install Assets - run: yarn + run: yarn --frozen-lockfile # Download build artifacts - name: Download Core Binary