Files
MaaAssistantArknights/.github/workflows/dev-build.yml
2022-10-13 23:29:46 +10:00

106 lines
3.0 KiB
YAML

# ------------------------------------------------------------------------------
# <auto-generated>
#
# This code was generated.
#
# - To turn off auto-generation set:
#
# [GitHubActions (AutoGenerate = false)]
#
# - To trigger manual generation invoke:
#
# nuke --generate-configuration GitHubActions_dev-build --host GitHubActions
#
# </auto-generated>
# ------------------------------------------------------------------------------
name: dev-build
on:
push:
branches-ignore:
- master
paths:
- 'src/MeoAssistant/**'
- 'src/MeoAsstGui/**'
- '3rdparty/**'
- 'tools/MaaBuilder/**'
- tools/MaaBuilder.sln
- 'include/**'
- 'resource/**'
- MeoAssistantArknights.sln
pull_request:
branches:
- dev
paths:
- 'src/MeoAssistant/**'
- 'src/MeoAsstGui/**'
- '3rdparty/**'
- 'tools/MaaBuilder/**'
- tools/MaaBuilder.sln
- 'include/**'
- 'resource/**'
- MeoAssistantArknights.sln
workflow_dispatch:
inputs:
Reason:
description: "Reason"
required: true
ReleaseSimulation:
description: "Release Simulation"
required: true
jobs:
windows-latest:
name: windows-latest
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Cache .nuke/temp, ~/.nuget/packages
uses: actions/cache@v2
with:
path: |
.nuke/temp
~/.nuget/packages
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj') }}
- name: Run './build.cmd DevBuild'
run: ./build.cmd DevBuild
env:
Reason: ${{ github.event.inputs.Reason }}
ReleaseSimulation: ${{ github.event.inputs.ReleaseSimulation }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/upload-artifact@v1
with:
name: MaaBundle-x64-Windows
path: artifacts
macos-latest:
name: macos-latest
runs-on: macos-12
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Cache Homebrew
uses: actions/cache@v3
with:
path: $(brew --prefix)
key: ${{ runner.os }}-homebrew-${{ hashFiles('.config/brew/Brewfile') }}
- name: Install Dependencies
run: |
brew update --preinstall
brew install ninja range-v3
- name: Configure MeoAssistant
run: |
mkdir build && cd build
cmake .. -GNinja -DBUILD_XCFRAMEWORK=ON -DBUILD_UNIVERSAL=ON
- name: Build libMeoAssistant
run: cmake --build build
- name: Build MeoAsstMac
working-directory: src/MeoAsstMac
run: xcodebuild ARCHS="arm64 x86_64" CODE_SIGN_IDENTITY="-" DEVELOPMENT_TEAM="-" ONLY_ACTIVE_ARCH=NO -derivedDataPath DerivedData -project MeoAsstMac.xcodeproj -scheme MeoAsstMac
- uses: actions/upload-artifact@v1
with:
name: MaaBundle-darwin
path: src/MeoAsstMac/DerivedData/Build/Products/Debug