Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 22 additions & 40 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
- "alpha"
- "beta"
pull_request:
paths-ignore:
- "docs/**"
- "**/*.md"

jobs:
build:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading