mirror of
https://github.com/xenia-project/xenia.git
synced 2026-01-02 14:50:09 +01:00
106 lines
2.9 KiB
YAML
106 lines
2.9 KiB
YAML
name: Windows build
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '.clang-format'
|
|
- '.drone.star'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.gdbinit'
|
|
- '.github/*'
|
|
- '.github/workflows/Linux_build.yml'
|
|
- '.github/*_TEMPLATE/**'
|
|
- '*.md'
|
|
- '*.yml'
|
|
- '*.txt'
|
|
- 'docs/**'
|
|
- 'src/**/*_posix.*'
|
|
- 'src/**/*_linux.*'
|
|
- 'src/**/*_gnulinux.*'
|
|
- 'src/**/*_x11.*'
|
|
- 'src/**/*_gtk.*'
|
|
- 'src/**/*_android.*'
|
|
- 'src/**/*_mac.*'
|
|
- 'LICENSE'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '.clang-format'
|
|
- '.drone.star'
|
|
- '.gitattributes'
|
|
- '.gitignore'
|
|
- '.gdbinit'
|
|
- '.github/*'
|
|
- '.github/workflows/Linux_build.yml'
|
|
- '.github/*_TEMPLATE/**'
|
|
- '*.md'
|
|
- '*.yml'
|
|
- '*.txt'
|
|
- 'docs/**'
|
|
- 'src/**/*_posix.*'
|
|
- 'src/**/*_linux.*'
|
|
- 'src/**/*_gnulinux.*'
|
|
- 'src/**/*_x11.*'
|
|
- 'src/**/*_gtk.*'
|
|
- 'src/**/*_android.*'
|
|
- 'src/**/*_mac.*'
|
|
- 'LICENSE'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
lint:
|
|
name: Lint
|
|
runs-on: windows-latest
|
|
env:
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
- name: Lint
|
|
run: python xenia-build.py lint --all
|
|
|
|
build:
|
|
name: Build
|
|
needs: lint
|
|
runs-on: windows-2025
|
|
env:
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
steps:
|
|
- uses: actions/checkout@main
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup
|
|
run: python xenia-build.py setup
|
|
- name: Build
|
|
run: python xenia-build.py build --no_premake --config=Release --target=src\xenia-app
|
|
- name: Prepare artifacts
|
|
id: prepare_artifacts
|
|
run: |
|
|
foreach ($file in 'build\bin\Windows\Release\xenia_canary.exe','build\bin\Windows\Release\xenia_canary.pdb') {
|
|
if ((get-item $file).Length -le 100000) {
|
|
echo "::error::$file is too small."
|
|
}
|
|
}
|
|
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0
|
|
robocopy build\bin\Windows\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0
|
|
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
|
|
- name: Upload xenia canary artifacts
|
|
if: steps.prepare_artifacts.outcome == 'success'
|
|
uses: actions/upload-artifact@main
|
|
with:
|
|
name: xenia_canary_windows
|
|
path: artifacts\xenia_canary
|
|
if-no-files-found: error
|
|
|
|
create-release:
|
|
name: Create release
|
|
needs: [lint, build]
|
|
if: |
|
|
github.repository == 'xenia-canary/xenia-canary' &&
|
|
github.event.action != 'pull_request' &&
|
|
github.ref == 'refs/heads/canary_experimental'
|
|
uses: ./.github/workflows/Create_release.yml
|
|
with:
|
|
os: windows
|
|
secrets:
|
|
RELEASE_TOKEN: ${{ secrets.RELEASE_TOKEN }}
|