Skip to content

Commit

Permalink
Add support for incremental building. (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
domchen authored Oct 24, 2023
1 parent 5526edc commit 926727c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ jobs:
key: third-party-macos-${{ hashFiles('DEPS') }}-${{ hashFiles('vendor.json') }}-${{ hashFiles('test/baseline/version.json') }}
restore-keys: third-party-macos-

- name: Get Build Cache
uses: actions/cache@v3
with:
path: |
out/release
key: tgfx-build-cache-macos-${{ github.sha }}
restore-keys: tgfx-build-cache-macos-

- name: Run depsync
run: |
chmod +x sync_deps.sh
Expand All @@ -78,17 +86,17 @@ jobs:

- name: Build iOS
run: |
node build_tgfx -p ios -x
node build_tgfx -p ios -x -i
- name: Build Android
run: |
node build_tgfx -p android
node build_tgfx -p android -i
env:
NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}

- name: Build Web
run: |
node build_tgfx -p web
node build_tgfx -p web -i
- name: Save Environment Cache
if: ${{ (github.event_name == 'push') && (steps.environment-cache.outputs.cache-hit != 'true') }}
Expand Down Expand Up @@ -168,6 +176,14 @@ jobs:
key: third-party-windows-${{ hashFiles('DEPS') }}-${{ hashFiles('vendor.json') }}-${{ hashFiles('test/baseline/version.json') }}
restore-keys: third-party-windows-

- name: Get Build Cache
uses: actions/cache@v3
with:
path: |
out/release
key: tgfx-build-cache-windows-${{ github.sha }}
restore-keys: tgfx-build-cache-windows-

- name: Run depsync
run: |
npm install depsync -g
Expand All @@ -176,7 +192,7 @@ jobs:

- name: Build Windows
run: |
node build_tgfx -p win
node build_tgfx -p win -i
- name: Save Third-Party Cache
if: ${{ (github.event_name == 'push') && (steps.third-party-cache.outputs.cache-hit != 'true') }}
Expand Down Expand Up @@ -217,6 +233,14 @@ jobs:
key: third-party-linux-${{ hashFiles('DEPS') }}-${{ hashFiles('vendor.json') }}-${{ hashFiles('test/baseline/version.json') }}
restore-keys: third-party-linux-

- name: Get Build Cache
uses: actions/cache@v3
with:
path: |
out/release
key: tgfx-build-cache-linux-${{ github.sha }}
restore-keys: tgfx-build-cache-linux-

- uses: seanmiddleditch/gha-setup-ninja@master

- name: Run depsync
Expand All @@ -227,7 +251,7 @@ jobs:

- name: Build Linux
run: |
node build_tgfx -DTGFX_USE_SWIFTSHADER=ON -p linux
node build_tgfx -DTGFX_USE_SWIFTSHADER=ON -p linux -i
- name: Save Third-Party Cache
if: ${{ (github.event_name == 'push') && (steps.third-party-cache.outputs.cache-hit != 'true') }}
Expand Down
10 changes: 1 addition & 9 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"common": [
{
"url": "${PAG_GROUP}/vendor_tools.git",
"commit": "e26ed58910df111edab062c01ae30172f69922fa",
"commit": "28627925ca672d99c07764d50377e739fe1c9793",
"dir": "vendor_tools"
},
{
Expand Down Expand Up @@ -67,14 +67,6 @@
{
"command": "depsync --clean",
"dir": "third_party"
},
{
"command": "git lfs prune",
"dir": "./"
},
{
"command": "git lfs pull",
"dir": "./"
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions update_baseline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
STASH_LIST_AFTER=$(git stash list)
git switch main --quiet

depsync

if [[ $1 == "1" ]]; then
BUILD_DIR=build
else
Expand Down

0 comments on commit 926727c

Please sign in to comment.