mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-01-12 18:39:32 +08:00
+ add artifact upload steps
+ remvoe VS detection, it relies on vswhere which is used by the scripts anyway + separate the deps & build steps
This commit is contained in:
parent
2e69c038cc
commit
c408cc4808
58
.github/workflows/msbuild.yml
vendored
58
.github/workflows/msbuild.yml
vendored
@ -20,24 +20,22 @@ env:
|
||||
THIRD_PARTY_BASE_DIR: 'third-party'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
deps:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# just to be sure Visual Studio is available
|
||||
- name: Add MSBuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.3.1
|
||||
|
||||
### deps
|
||||
- name: Check cache for deps
|
||||
- name: Lookup cache for deps
|
||||
id: cache-deps-win
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-deps
|
||||
path: build-win-deps
|
||||
lookup-only: true
|
||||
|
||||
# we need the repo to build the deps since it has the build scripts
|
||||
- name: Checkout branch
|
||||
if: steps.cache-deps-win.outputs.cache-hit != 'true'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Clone third-party deps (deps/win)
|
||||
if: steps.cache-deps-win.outputs.cache-hit != 'true'
|
||||
@ -72,11 +70,22 @@ jobs:
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
run: build_win_deps.bat
|
||||
|
||||
- name: Clean third-party deps
|
||||
if: steps.cache-deps-win.outputs.cache-hit != 'true'
|
||||
shell: cmd
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
run: rmdir /s /q third-party & exit /b 0
|
||||
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
### deps
|
||||
- name: Grab cache for deps
|
||||
id: cache-deps-win
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
key: ${{ runner.os }}-deps
|
||||
path: build-win-deps
|
||||
fail-on-cache-miss: true
|
||||
|
||||
### build
|
||||
- name: Clone third-party build helpers (common/win)
|
||||
@ -97,5 +106,20 @@ jobs:
|
||||
working-directory: ${{env.GITHUB_WORKSPACE}}
|
||||
run: build_win.bat debug
|
||||
|
||||
### upload artifact
|
||||
#- name: Upload
|
||||
### upload artifacts
|
||||
- name: Upload build (release)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 'build-win-release'
|
||||
path: 'build-win/release/'
|
||||
if-no-files-found: 'error'
|
||||
compression-level: 9
|
||||
|
||||
- name: Upload build (debug)
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: 'build-win-debug'
|
||||
path: 'build-win/debug/'
|
||||
if-no-files-found: 'error'
|
||||
compression-level: 9
|
||||
|
Loading…
x
Reference in New Issue
Block a user