Copied CI commits from canary_new

This commit is contained in:
Gliniak 2021-01-31 11:10:55 +01:00
parent f9fd3e5fec
commit ef235e29c3
3 changed files with 122 additions and 64 deletions

View File

@ -3,12 +3,14 @@ version: 1.0.{build}-{branch}
branches:
except:
- gh-pages
- master
skip_tags: true
skip_commits:
files:
- .drone.star
- .azure-pipelines.yml
- .github/**
- android/**
- docs/**
@ -27,76 +29,17 @@ skip_branch_with_pr: true
pull_requests:
do_not_increment_build_number: true
os: Visual Studio 2019
init:
- ps: |
If (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) {
$env:is_not_pr = "true"
}
If (-Not $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED) {
$env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED = " "
}
image: Visual Studio 2019
install:
- |
vcpkg integrate remove
xb setup
platform: Windows
configuration: [Release, Checked]
- xb setup
build_script:
- xb build --config=%CONFIGURATION% --target=src\xenia-app --target=tests\xenia-base-tests --target=tests\xenia-cpu-ppc-tests --target=src\xenia-vfs-dump
- xb build --config=Release --target=src\xenia-app --target=src\xenia-vfs-dump
after_build:
- |
IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%"
IF NOT "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SWITCHES=--"
IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SUFFIX=%APPVEYOR_REPO_BRANCH%_FOR-DEVS-ONLY"
IF "%CONFIGURATION%"=="Checked" SET "ARCHIVE_SWITCHES="-pI know what I am doing." --"
7z a xenia_%ARCHIVE_SUFFIX%.zip %ARCHIVE_SWITCHES% LICENSE "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.exe" "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia.pdb"
7z a xenia-vfs-dump_%ARCHIVE_SUFFIX%.zip %ARCHIVE_SWITCHES% LICENSE "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.exe" "%APPVEYOR_BUILD_FOLDER%\build\bin\%PLATFORM%\%CONFIGURATION%\xenia-vfs-dump.pdb"
before_test:
- xb gentests
test_script:
- xb test --config=%CONFIGURATION% --no_build
7z a xenia_canary.zip ".\build\bin\Windows\Release\xenia_canary.exe" ".\build\bin\Windows\Release\xenia_canary.pdb" LICENSE
7z a xenia-vfs-dump_canary.zip ".\build\bin\Windows\Release\xenia-vfs-dump.exe" ".\build\bin\Windows\Release\xenia-vfs-dump.pdb" LICENSE
artifacts:
- path: '*.zip'
- path: xenia-cpu-ppc-test.log
deploy:
- provider: Environment
name: xenia-master
release: xenia-$(appveyor_repo_branch)-v$(appveyor_build_version)
artifact: '*.zip'
draft: false
prerelease: true
on:
branch: master
configuration: release
appveyor_repo_tag: true
is_not_pr: true
- provider: GitHub
name: xenia-master
repository: xenia-project/release-builds-windows
auth_token:
secure: /8he47z1WnPN7LcCTe5T5KMxxX0SmqFj9QMpeWEa3aZ64kMsfupOT/jKakqTM8af
tag: v$(appveyor_build_version)
release: v$(appveyor_build_version)
description: |
Windows release build for https://github.com/xenia-project/xenia/commit/$(APPVEYOR_REPO_COMMIT).
$(APPVEYOR_REPO_COMMIT_MESSAGE)
$(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)
draft: false
prerelease: false
on:
branch: master
configuration: release
is_not_pr: true

46
.azure-pipelines.yml Normal file
View File

@ -0,0 +1,46 @@
trigger:
branches:
include: [ '*' ]
exclude: [ gh-pages, master ]
paths:
exclude:
- 'docs/**'
- '.github/**'
- 'LICENSE'
- 'README.md'
- '.appveyor.yml'
- '.travis.yml'
pr:
branches:
include: [ '*' ]
exclude: [ gh-pages, master ]
paths:
exclude:
- 'docs/**'
- '.github/**'
- 'LICENSE'
- 'README.md'
- '.appveyor.yml'
- '.travis.yml'
pool:
vmImage: windows-latest
variables:
POWERSHELL_TELEMETRY_OPTOUT: 1
steps:
- pwsh: .\xb setup
displayName: Setup
- pwsh: .\xb build --target=src\xenia-app --target=src\xenia-vfs-dump
displayName: Build
- pwsh: |-
robocopy . build\bin\Windows\Release LICENSE /r:0 /w:0
robocopy build\bin\Windows\Release $(Build.ArtifactStagingDirectory)\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0
robocopy build\bin\Windows\Release $(Build.ArtifactStagingDirectory)\xenia-vfs-dump_canary xenia-vfs-dump.exe xenia-vfs-dump.pdb LICENSE /r:0 /w:0
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
displayName: Prepare artifacts
- publish: $(Build.ArtifactStagingDirectory)\xenia_canary
artifact: xenia_canary
displayName: Publish xenia_canary artifacts
- publish: $(Build.ArtifactStagingDirectory)\xenia-vfs-dump_canary
artifact: xenia-vfs-dump_canary
displayName: Publish xenia-vfs-dump_canary artifacts

69
.github/workflows/CI.yml vendored Normal file
View File

@ -0,0 +1,69 @@
name: CI
on:
push:
branches-ignore: [ gh-pages, master ]
paths-ignore:
- '.github/*'
- '.github/*_TEMPLATE/**'
- '*.md'
- '*.yml'
- 'docs/**'
- 'LICENSE'
pull_request:
branches-ignore: [ gh-pages, master ]
paths-ignore:
- '.github/*'
- '.github/*_TEMPLATE/**'
- '*.md'
- '*.yml'
- 'docs/**'
- 'LICENSE'
workflow_dispatch:
jobs:
build-windows:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup
run: .\xb setup
- name: Build
run: .\xb build --config=Release --target=src\xenia-app --target=src\xenia-vfs-dump
- name: Prepare artifacts
id: prepare_artifacts
run: |
robocopy . build\bin\${{ runner.os }}\Release LICENSE /r:0 /w:0
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia_canary xenia_canary.exe xenia_canary.pdb LICENSE /r:0 /w:0
robocopy build\bin\${{ runner.os }}\Release artifacts\xenia-vfs-dump xenia-vfs-dump.exe xenia-vfs-dump.pdb LICENSE /r:0 /w:0
If ($LastExitCode -le 7) { echo "LastExitCode = $LastExitCode";$LastExitCode = 0 }
7z a xenia_canary.zip .\artifacts\xenia_canary\*.exe LICENSE
echo "::set-output name=short_commit_sha::$(git rev-parse --short HEAD)"
- name: Upload xenia-vfs-dump artifacts
uses: actions/upload-artifact@v2
with:
name: xenia-vfs-dump_canary
path: artifacts\xenia-vfs-dump
if-no-files-found: error
- name: Upload xenia artifacts
uses: actions/upload-artifact@v2
with:
name: xenia_canary
path: artifacts\xenia_canary
if-no-files-found: error
- uses: softprops/action-gh-release@v1
if: |
github.repository == 'xenia-canary/xenia-canary' &&
github.event.action != 'pull_request' &&
contains(github.ref, 'refs/heads/canary')
with:
files: '*.zip'
tag_name: ${{ steps.prepare_artifacts.outputs.short_commit_sha }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}