Skip to content

Commit

Permalink
conflict修正
Browse files Browse the repository at this point in the history
  • Loading branch information
dep5 committed May 31, 2022
2 parents da66fa3 + cf4763b commit e0298b4
Show file tree
Hide file tree
Showing 937 changed files with 4,065 additions and 2,790 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*.kwd text
*.khp text
*.hkn text
*.bat text
*.bat text eol=crlf
Makefile text eol=lf
sakura_rc.h text eol=crlf
*.rc text working-tree-encoding=utf-16le-bom eol=crlf
Expand Down
38 changes: 27 additions & 11 deletions .github/workflows/build-sakura.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@ 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:
branches:
- master
- feature/*
paths-ignore:
- '**/*.md'
- .gitignore
- .editorconfig
- appveyor.yml
- 'azure-pipelines*.yml'
- 'ci/azure-pipelines/template*.yml'

pull_request:
branches:
- master
- feature/*
- release/*
paths-ignore:
- '**/*.md'
- .gitignore
Expand All @@ -34,10 +27,13 @@ jobs:
build:
# The type of runner that the job will run on
name: MSBuild
runs-on: windows-latest
runs-on: ${{matrix.os}}

strategy:
matrix:
os:
- windows-2019
- windows-2022
config:
- Debug
- Release
Expand Down Expand Up @@ -89,14 +85,34 @@ jobs:
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

- name: Install Locale Emulator
run: choco install locale-emulator -y
shell: cmd
run: |
choco install autohotkey.install --confirm
$LEExpandDir = "${{github.workspace}}\tools\locale-emulator"
$LEInitScript = "${{github.workspace}}\ci\init-locale-emulator.ahk"
New-Item "${LEExpandDir}" -ItemType Directory
Invoke-WebRequest `
"https://github.com/xupefei/Locale-Emulator/releases/download/v2.5.0.1/Locale.Emulator.2.5.0.1.zip" `
-OutFile "${LEExpandDir}\locale-emulator.zip"
Expand-Archive "${LEExpandDir}\locale-emulator.zip" "${LEExpandDir}"
Start-Process "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: Update/Install Inno Setup
run: choco upgrade innosetup --confirm
shell: pwsh

- name: Build installer with Inno Setup
run: build-installer.bat ${{ matrix.platform }} ${{ matrix.config }}
shell: cmd
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/sonarscan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: SonarCloud
# 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'
Expand Down Expand Up @@ -146,6 +147,7 @@ jobs:
-D"sonar.cfamily.cache.path=.sonar\analysis-cache" `
-D"sonar.cfamily.cppunit.reportPath=tests1-googletest.xml" `
-D"sonar.cfamily.threads=2" `
-D"sonar.coverage.exclusions=help\**\*.js,tests\unittests\coverage.cpp,tools\**\*.js" `
-D"sonar.python.version=3" `
-D"sonar.coverage.exclusions=help\**\*.js,tests\unittests\coverage.cpp,tests\stubs\**\*.cpp,tools\**\*.js" `
-D"sonar.coverageReportPaths=tests1-coverage.xml" `
-D"sonar.exclusions=.sonar\**\*,build\**\*,bw-output\**\*,HeaderMake\**\*,tests\build\**\*,tests\googletest\**\*,**\test-*,tests*-*.xml"
-D"sonar.exclusions=.sonar\**\*,build\**\*,bw-output\**\*,HeaderMake\**\*,tests\googletest\**\,**\test-*,tests\stubs\**\*,tests*-*.xml*"
28 changes: 14 additions & 14 deletions CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions HeaderMake/HeaderMake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/*
Copyright (C) 2007-2008, kobake
Copyright (C) 2009, rastiv
Copyright (C) 2018-2021, Sakura Editor Organization
Copyright (C) 2018-2022, Sakura Editor Organization
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand All @@ -33,7 +33,7 @@
/*
++ 概要 ++
enum と define の2種類の定数定義ヘッダを生成するためのモノ
enum と define の2種類の定数定義ヘッダーを生成するためのモノ
enum定数はソースコードから参照し、(デバッグがしやすくなる)
define定数はリソースから参照する (リソース内ではenum定数を利用できない)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
zlib License

Copyright (C) 2018-2021, Sakura Editor Organization
Copyright (C) 2018-2022, Sakura Editor Organization

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
2 changes: 1 addition & 1 deletion addDoxygenFileComment.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ doxygen は解析対象かどうかを `@file` コメントの有無で認識し

## ファイル構成

- `addDoxygenFileComment.py` : スクリプト本体。第一引数で指定したフォルダ以下のソースに対して `@file` コメントがなければ先頭行に付与します。
- `addDoxygenFileComment.py` : スクリプト本体。第一引数で指定したフォルダー以下のソースに対して `@file` コメントがなければ先頭行に付与します。
- `addDoxygenFileComment.bat` : `sakura_core` の引数を渡して `addDoxygenFileComment.py` を実行します。
2 changes: 1 addition & 1 deletion addDoxygenFileComment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def checkExtension(fileName):
base, ext = os.path.splitext(fileName)
return (ext in extensions)

# 引数で指定したフォルダ以下のすべての対象ファイルを yield で返す
# 引数で指定したフォルダー以下のすべての対象ファイルを yield で返す
def checkAll(topDir):
for rootdir, dirs, files in os.walk(topDir):
for fileName in files:
Expand Down
98 changes: 19 additions & 79 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,81 +4,27 @@
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&viewFallbackFrom=vsts&tabs=yaml
###############################################################################################################################
trigger:
branches:
include:
- master
- develop
- feature/*
- revert-*
paths:
exclude:
- .github/*
- '**/*.md'
- '.github/*'
- .gitignore
- .travis.yml
- .editorconfig
- appveyor.yml
- CHANGELOG.md
- CONTRIBUTING.md
- CPPLINT.md
- README.md
- SonarQube.md
- addDoxygenFileComment.md
- build.md
- create-big-file.md
- debug-tasktray-menu.md
- get-PR.md
- ci/azure-pipelines/azure-pipelines.md
- ci/build-batchfiles.md
- ci/build-envvars.md
- installer/externals/bregonig/README.md
- installer/externals/universal-ctags/README.md
- installer/readme.md
- remove-redundant-blank-lines.md
- tools/find-tools.md
- tools/macro/macro.md
- tools/zip/readme.md
- tests/unittest.md
- vcx-props/project-PlatformToolset.md

###############################################################################################################################
# ビルドトリガー (Pull Request)
#
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops&tabs=yaml#pull-request-validation
###############################################################################################################################
pr:
branches:
include:
- master
- develop
- feature/*
- revert-*
paths:
exclude:
- .github/*
- '**/*.md'
- '.github/*'
- .gitignore
- .travis.yml
- .editorconfig
- appveyor.yml
- CHANGELOG.md
- CONTRIBUTING.md
- CPPLINT.md
- README.md
- SonarQube.md
- addDoxygenFileComment.md
- build.md
- create-big-file.md
- debug-tasktray-menu.md
- get-PR.md
- ci/azure-pipelines/azure-pipelines.md
- ci/build-batchfiles.md
- ci/build-envvars.md
- installer/externals/bregonig/README.md
- installer/externals/universal-ctags/README.md
- installer/readme.md
- remove-redundant-blank-lines.md
- tools/find-tools.md
- tools/macro/macro.md
- tools/zip/readme.md
- tests/unittest.md
- vcx-props/project-PlatformToolset.md

###############################################################################################################################
# jobs/job 定義
Expand All @@ -87,18 +33,6 @@ pr:
###############################################################################################################################
jobs:

# サクラエディタのビルドを行う JOB (VS2017)
# * サクラエディタ本体
# * HTML Help
# * Installer
# * 単体テスト
- template: ci/azure-pipelines/template.job.build-unittest.yml
parameters:
name: VS2017
vmImage: 'VS2017-Win2016'
displayName: VS2017
ARG_VSVERSION: 15

# サクラエディタのビルドを行う JOB (VS2019)
# * サクラエディタ本体
# * HTML Help
Expand All @@ -111,49 +45,55 @@ jobs:
name: VS2019
vmImage: 'windows-2019'
displayName: VS2019
ARG_VSVERSION: 16

# サクラエディタのビルドを行う JOB (VS2022)
- template: ci/azure-pipelines/template.job.build-unittest.yml
parameters:
name: VS2022
vmImage: 'windows-2022'
displayName: VS2022

# サクラエディタのビルドを行う JOB(MinGW)
# * サクラエディタ本体
# * 単体テスト
- template: ci/azure-pipelines/template.job.build-on-msys2.yml
parameters:
name: MinGW
vmImage: 'VS2017-Win2016'
vmImage: 'windows-latest'
displayName: MinGW

# SonarQube で解析を行う JOB
- template: ci/azure-pipelines/template.job.SonarQube.yml
parameters:
name: SonarQube
vmImage: 'VS2017-Win2016'
vmImage: 'windows-latest'
displayName: SonarQube

# Cppcheck を行う JOB
- template: ci/azure-pipelines/template.job.cppcheck.yml
parameters:
name: cppcheck
vmImage: 'VS2017-Win2016'
vmImage: 'windows-latest'
displayName: cppcheck

# doxygen を行う JOB
- template: ci/azure-pipelines/template.job.doxygen.yml
parameters:
name: doxygen
vmImage: 'VS2017-Win2016'
vmImage: 'windows-latest'
displayName: doxygen

# 文字コードのチェックを行う JOB
- template: ci/azure-pipelines/template.job.checkEncoding.yml
parameters:
name: checkEncoding
vmImage: 'VS2017-Win2016'
vmImage: 'windows-latest'

#############################################################################################################
# Python スクリプトのコンパイル確認を行う job
#############################################################################################################
- template: ci/azure-pipelines/template.job.python-check.yml
parameters:
name: script_check
vmImage: 'VS2017-Win2016'
vmImage: 'windows-latest'
displayName: script_check
4 changes: 2 additions & 2 deletions build-gnu.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ path=C:\msys64\mingw64\bin;%path:C:\msys64\mingw64\bin;=%
if not defined CMD_NINJA call %~dp0tools\find-tools.bat

@rem create output directory, all executables will be placed here.
set OUTDIR=../../../../%platform%/%configuration%
mkdir "%~dp0%platform%\%configuration%" > NUL 2>&1
set OUTDIR=%~dp0%platform%\%configuration%
mkdir %OUTDIR% > NUL 2>&1

@rem build "sakura_core".
set SAKURA_CORE_MAKEFILE=%~dp0sakura_core\Makefile
Expand Down
1 change: 0 additions & 1 deletion ci/azure-pipelines/azure-pipelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ https://azure.microsoft.com/ja-jp/services/devops/pipelines/ にアクセスし

| JOB 名 | 説明 | job を定義する template |
----|----|----
|VS2017 | Visual Studio 2017 でサクラエディタのビルドを行う | [template.job.build-unittest.yml](template.job.build-unittest.yml) |
|VS2019 | Visual Studio 2019 でサクラエディタのビルドを行う | [template.job.build-unittest.yml](template.job.build-unittest.yml) |
|MinGW | MinGW でサクラエディタのビルドを行う | [template.job.build-on-msys2.yml](template.job.build-on-msys2.yml) |
|SonarQube | SonarQube での解析を行う | [template.job.SonarQube.yml](template.job.SonarQube.yml) |
Expand Down
25 changes: 18 additions & 7 deletions ci/azure-pipelines/template.job.build-unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ jobs:
BuildPlatform: 'x64'
Configuration: 'Release'

# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&tabs=yaml%2Cbatch
variables:
ARG_VSVERSION: ${{ parameters.ARG_VSVERSION }}

steps:
# show environmental variables for debug.
- script: set
Expand All @@ -51,13 +47,28 @@ jobs:
displayName: Bitmap Split/Mux

# Install Locale Emulator
- script: choco install locale-emulator -y
- pwsh: |
choco install autohotkey.install --confirm
$LEExpandDir = "$(Build.SourcesDirectory)\tools\locale-emulator"
$LEInitScript = "$(Build.SourcesDirectory)\ci\init-locale-emulator.ahk"
New-Item "${LEExpandDir}" -ItemType Directory
Invoke-WebRequest `
"https://github.com/xupefei/Locale-Emulator/releases/download/v2.5.0.1/Locale.Emulator.2.5.0.1.zip" `
-OutFile "${LEExpandDir}\locale-emulator.zip"
Expand-Archive "${LEExpandDir}\locale-emulator.zip" "${LEExpandDir}"
Start-Process "AutoHotKey" "${LEInitScript}"
Start-Process "${LEExpandDir}\LEInstaller.exe"
echo "##vso[task.prependpath]${LEExpandDir}"
displayName: Install Locale Emulator
# Build HTML Help
- script: build-chm.bat
displayName: Build HTML Help

# Update/Install Inno Setup
- pwsh: choco upgrade innosetup --confirm
displayName: Update/Install Inno Setup

# Build installer with Inno Setup
- script: build-installer.bat $(BuildPlatform) $(Configuration)
displayName: Build installer with Inno Setup
Expand All @@ -76,7 +87,7 @@ jobs:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/conditions?view=azure-devops&tabs=yaml#job-status-functions
#
- task: CopyFiles@1
condition: succeededOrFailed()
condition: and(eq(variables['Configuration'], 'Release'), succeededOrFailed())
displayName: Copy to ArtifactStagingDirectory
inputs:
contents: |
Expand All @@ -86,7 +97,7 @@ jobs:

# see https://docs.microsoft.com/en-us/azure/devops/pipelines/artifacts/build-artifacts?view=azure-devops&tabs=yaml
- task: PublishBuildArtifacts@1
condition: succeededOrFailed()
condition: and(eq(variables['Configuration'], 'Release'), succeededOrFailed())
displayName: Publish ArtifactStagingDirectory
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
Expand Down
Loading

0 comments on commit e0298b4

Please sign in to comment.