Skip to content

Merge pull request #2455 from berryzplus/feature/change_uipi_check #862

Merge pull request #2455 from berryzplus/feature/change_uipi_check

Merge pull request #2455 from berryzplus/feature/change_uipi_check #862

Workflow file for this run

name: build sakura
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
push:
paths-ignore:
- '**/*.md'
- .gitignore
- .editorconfig
pull_request:
paths-ignore:
- '**/*.md'
- .gitignore
- .editorconfig
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
name: MSBuild
runs-on: windows-latest
env:
CI_ACCOUNT_NAME: ${{ github.actor }}
CI_REPO_NAME: ${{ github.repository }}
CI_BUILD_VERSION: ${{ github.run_id }}
CI_BUILD_NUMBER: ${{ github.run_number }}
CI_BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
GITHUB_COMMIT_URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
strategy:
matrix:
config:
- Debug
- Release
platform:
- Win32
- x64
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
## see https://github.com/actions/checkout
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
## see https://github.com/microsoft/setup-msbuild
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
- name: Set up Python
if: ${{ matrix.platform == 'x64' }}
uses: actions/setup-python@v6
- name: Setup PR environment variables
if: github.event_name == 'pull_request'
run: |
echo "GITHUB_PR_NUMBER=${{ github.event.pull_request.number }}" >> $env:GITHUB_ENV
echo "GITHUB_PR_HEAD_URL=${{ github.server_url }}/${{ github.repository }}/pull/${{ github.event.pull_request.number }}/commits/${{ github.event.pull_request.head.sha }}" >> $env:GITHUB_ENV
echo "GITHUB_PR_HEAD_COMMIT=${{ github.event.pull_request.head.sha }}" >> $env:GITHUB_ENV
echo "GITHUB_PR_HEAD_SHORT_COMMIT=$('${{ github.event.pull_request.head.sha }}'.SubString(0, 8))" >> $env:GITHUB_ENV
shell: pwsh
- name: MSBuild
run: build-sln.bat ${{ matrix.platform }} ${{ matrix.config }}
shell: cmd
- name: Run unit tests
run: .\tests1.exe --gtest_output=xml:${{github.workspace}}\tests1.exe-googletest-${{matrix.platform}}-${{matrix.config}}.xml
working-directory: ${{github.workspace}}\${{matrix.platform}}\${{matrix.config}}
shell: pwsh
# Toolbar Bitmap Split/Mux
- run: build-bmp-tools.bat ${{matrix.config}}
name: Bitmap Split/Mux
shell: cmd
- name: Install AutoHotKey
run: |
$AutohotkeyDir = "$HOME\autohotkey"
if (!(Test-Path $AutohotkeyDir)) { New-Item -ItemType Directory -Path $AutohotkeyDir }
$ProgressPreference = 'SilentlyContinue'
Invoke-WebRequest -Uri https://github.com/AutoHotkey/AutoHotkey/releases/download/v2.0.19/AutoHotkey_2.0.19.zip -OutFile "AutoHotkey.zip"
Expand-Archive -Path "AutoHotkey.zip" -DestinationPath $AutohotkeyDir -Force
echo "AutoHotKey=$HOME\autohotkey\AutoHotkey32.exe" >> $env:GITHUB_ENV
- name: Install Locale Emulator
run: |
$LEExpandDir = "${{ github.workspace }}\tools\LocaleEmulator"
$LEInitScript = "${{ github.workspace }}\tools\LocaleEmulator\init-locale-emulator.ahk"
Expand-Archive "${{ github.workspace }}\externals\LocaleEmulator\locale-emulator.zip" "${LEExpandDir}"
Start-Process $env:AutoHotKey "${LEInitScript}"
Start-Process "${LEExpandDir}\LEInstaller.exe"
echo "${LEExpandDir}" >> $env:GITHUB_PATH
shell: pwsh
- name: Build HTML Help
run: build-chm.bat
shell: cmd
- name: Build installer with Inno Setup
run: build-installer.bat ${{ matrix.platform }} ${{ matrix.config }}
shell: cmd
- name: zipArtifacts
run: zipArtifacts.bat ${{ matrix.platform }} ${{ matrix.config }}
if: ${{ matrix.config == 'Release' }}
shell: cmd
## see https://github.com/actions/upload-artifact
- name: Upload Installer
uses: actions/upload-artifact@v7
if: ${{ matrix.config == 'Release' }}
with:
name: Installer ${{ matrix.platform }} ${{ matrix.config }}
path: 'sakura-*-Installer.zip'
- name: Upload Exe
uses: actions/upload-artifact@v7
if: ${{ matrix.config == 'Release' }}
with:
name: Exe ${{ matrix.platform }} ${{ matrix.config }}
path: 'sakura-*-Exe.zip'
- name: Upload Log
uses: actions/upload-artifact@v7
if: ${{ matrix.config == 'Release' }}
with:
name: Log ${{ matrix.platform }} ${{ matrix.config }}
path: 'sakura-*-Log.zip'
- name: Upload Asm
uses: actions/upload-artifact@v7
if: ${{ matrix.config == 'Release' }}
with:
name: Asm ${{ matrix.platform }} ${{ matrix.config }}
path: 'sakura-*-Asm.zip'
- name: Upload Dev
uses: actions/upload-artifact@v7
if: ${{ matrix.config == 'Release' }}
with:
name: Dev ${{ matrix.platform }} ${{ matrix.config }}
path: 'sakura-*-Dev.zip'