Skip to content

print more

print more #889

Workflow file for this run

name: ci
on:
push:
tags:
- "v*"
branches:
- "**"
paths:
- ".github/workflows/ci.yml"
- "3rdparty/include/**"
- "MaaDeps/**"
- "include/**"
- "source/**"
- "sample/**"
- "cmake/**"
- "CMakeLists.txt"
- "*.sln"
pull_request:
branches:
- "**"
paths:
- ".github/workflows/ci.yml"
- "3rdparty/include/**"
- "MaaDeps/**"
- "include/**"
- "source/**"
- "sample/**"
- "cmake/**"
- "CMakeLists.txt"
- "*.sln"
workflow_dispatch:
jobs:
meta:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- id: set_tag
run: |
is_release=${{ startsWith(github.ref, 'refs/tags/v') }}
tag=$(git describe --tags --match "v*" ${{ github.ref }} || true)
if [[ $tag != v* ]]; then
tag=$(curl -sX GET "https://api.github.com/repos/MaaAssistantArknights/MaaFramework/releases/latest" --header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' | awk '/tag_name/{print $4}' FS='["]')
if [[ $tag != v* ]]; then
tag="v0.0.0"
fi
tag=$(date "+$tag-%y%m%d-$(git rev-parse --short HEAD)")
fi
if ! $($is_release) ; then
prefix=${tag%-*-*}
suffix=${tag#$prefix-}
tag="$prefix-ci.$suffix"
fi
echo tag=$tag | tee -a $GITHUB_OUTPUT
echo is_release=$is_release | tee -a $GITHUB_OUTPUT
outputs:
tag: ${{ steps.set_tag.outputs.tag }}
is_release: ${{ steps.set_tag.outputs.is_release }}
windows-debug:
needs: meta
runs-on: windows-latest
strategy:
matrix:
arch: [x86_64]
fail-fast: false
steps:
- name: Windows runner hack
shell: cmd
run: |
dir d:\a
cd ..
mkdir C:\MaaFramework
rmdir MaaFramework
mklink /j MaaFramework C:\MaaFramework
dism /Online /Disable-Feature /FeatureName:Windows-Defender /Remove /NoRestart /Quiet
cd .
- name: Windows runner hack (2)
uses: al-cheb/[email protected]
with:
minimum-size: 16GB
maximum-size: 16GB
disk-root: "D:"
- uses: actions/checkout@v3
with:
submodules: true
- name: Bootstrap MaaDeps
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python3 maadeps-download.py x64-windows
- name: Build MAA
run: |
cmake --preset "MSVC 2022" -DMAADEPS_TRIPLET="maa-x64-windows" -DMAA_HASH_VERSION='${{ needs.meta.outputs.tag }}' -DCMAKE_BUILD_TYPE=Debug
cmake --build build --preset "MSVC 2022 - Debug" -j 16
- name: Install
shell: bash
if: always()
run: |
cmake --install build --prefix install
cp -r docs install
rm -rf install/bin/msvc-debug
- uses: actions/upload-artifact@v3
if: always()
with:
name: MAA-win-x64-debug
path: "install"