-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
24 changed files
with
254 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,87 @@ | ||
name: .NET | ||
|
||
on: [push, pull_request, workflow_dispatch] | ||
on: [push] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
|
||
#----------------------------------------------------------------------- | ||
# Checkout | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup .NET Core 2.1 | ||
# lfs: true | ||
#- name: Checkout LFS objects | ||
# run: git lfs checkout | ||
|
||
- name: Extract branch name | ||
id: extract_branch_name | ||
run: | | ||
$branch_name=$(git name-rev --name-only --exclude=tags/* HEAD) | ||
echo "Detected current branch: ${branch_name}" | ||
echo "::set-output name=branch_name::${branch_name}" | ||
#----------------------------------------------------------------------- | ||
# Setup environments | ||
|
||
- name: Setup .NET 2.2 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 2.1.811 | ||
- name: Setup .NET Core 3.1 | ||
dotnet-version: 2.2.* | ||
- name: Setup .NET 3.1 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 3.1.404 | ||
dotnet-version: 3.1.* | ||
- name: Setup .NET 5 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 5.0.100 | ||
- name: Install dependencies | ||
run: dotnet restore MeCab.Dotnet/MeCab.Dotnet.csproj | ||
- name: Install dependencies (Tests) | ||
run: dotnet restore MeCab.Dotnet.Tests/MeCab.Dotnet.Tests.csproj | ||
dotnet-version: 5.0.* | ||
- name: Setup .NET 6 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 6.0.* | ||
- name: Setup .NET 7 | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: 7.0.* | ||
|
||
- name: Setup NuGet package reference | ||
run: | | ||
# dotnet nuget add source ${{secrets.GH_LOCAL_NUGET_URL}} -n ref1 -u ${{secrets.GH_LOCAL_NUGET_USER}} -p ${{secrets.GH_LOCAL_NUGET_PASSWORD}} --store-password-in-clear-text --configfile nuget.config | ||
# dotnet nuget add source ${{secrets.GH_NUGET_URL}} -n ref2 -u ${{secrets.GH_NUGET_USER}} -p ${{secrets.GH_NUGET_PASSWORD}} --store-password-in-clear-text --configfile nuget.config | ||
|
||
#----------------------------------------------------------------------- | ||
# Build | ||
|
||
- name: NuGet restore | ||
run: dotnet restore -p:Configuration=Release MeCab.DotNet.sln | ||
|
||
- name: Build | ||
run: dotnet build --configuration Release --no-restore MeCab.Dotnet/MeCab.Dotnet.csproj | ||
- name: Build (Test) | ||
run: dotnet build --configuration Release --no-restore MeCab.Dotnet.Tests/MeCab.Dotnet.Tests.csproj | ||
run: dotnet build -p:Configuration=Release -p:BuildIdentifier=${GITHUB_RUN_NUMBER} MeCab.DotNet.sln | ||
|
||
- name: Build NuGet packages | ||
run: dotnet pack -p:Configuration=Release -p:BuildIdentifier=${GITHUB_RUN_NUMBER} -o artifacts MeCab.DotNet.sln | ||
|
||
#----------------------------------------------------------------------- | ||
# Test | ||
|
||
- name: Test | ||
run: dotnet test --no-restore --verbosity normal MeCab.Dotnet.Tests/MeCab.Dotnet.Tests.csproj | ||
run: dotnet test --no-restore --verbosity normal -p:CITest=True MeCab.DotNet.sln | ||
timeout-minutes: 10 | ||
|
||
#----------------------------------------------------------------------- | ||
# Deploy packages (develop) | ||
|
||
#- name: Deploy NuGet package (develop/ref1) | ||
# if: startsWith( github.ref, 'refs/tags/' ) | ||
# run: dotnet nuget push artifacts/MeCab.DotNet.*.nupkg --source ref1 | ||
|
||
#----------------------------------------------------------------------- | ||
# Deploy packages (main) | ||
|
||
#- name: Deploy NuGet package (main/ref2) | ||
# if: (startsWith( github.ref, 'refs/tags/' )) && (endsWith(steps.extract_branch_name.outputs.branch_name, 'main')) | ||
# run: dotnet nuget push artifacts/MeCab.DotNet.*.nupkg --source ref1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<LangVersion>latest</LangVersion> | ||
<Platforms>AnyCPU</Platforms> | ||
|
||
<DebugSymbols>true</DebugSymbols> | ||
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | ||
<CheckEolTargetFramework>false</CheckEolTargetFramework> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<RepositoryUrl>https://github.com/kekyo/MeCab.DotNet.git</RepositoryUrl> | ||
<IsPackable>false</IsPackable> | ||
|
||
<RootNamespace>MeCab</RootNamespace> | ||
<ProduceReferenceAssembly>false</ProduceReferenceAssembly> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<NoWarn>$(NoWarn);CS1570;CS1572;CS1573;CS1591;CA1416;CS8981</NoWarn> | ||
|
||
<Product>MeCab.DotNet</Product> | ||
<Trademark>MeCab.DotNet</Trademark> | ||
<Copyright>Copyright (c) 2001-2008, Taku Kudo; Copyright (c) 2004-2008, Nippon Telegraph and Telephone Corporation; Copyright (c) 2015 Tsuyoshi Komuta; Portions Copyright (c) 2019-2021 Kouji Matsui</Copyright> | ||
|
||
<Description>MeCab.DotNet - Morphological analysis engine for .NET 7,6,5, .NET Core and .NET Frameworks managed library.</Description> | ||
<Company>Nippon Telegraph and Telephone Corporation</Company> | ||
<Authors>Taku Kudo; Tsuyoshi Komuta; Kouji Matsui (@kozy_kekyo)</Authors> | ||
<PackageLicenseExpression>GPL-2.0-only OR LGPL-2.1-only</PackageLicenseExpression> | ||
<PackageProjectUrl>https://github.com/kekyo/MeCab.DotNet.git</PackageProjectUrl> | ||
<PackageIcon>MeCab.DotNet-100.png</PackageIcon> | ||
<PackageTags>mecab;morphological;analysis</PackageTags> | ||
<AllowedOutputExtensionsInPackageBuildOutputFolder>.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | ||
<NoWarn>$(NoWarn);NU1605;NU1701;NU1803</NoWarn> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' != 'Release'"> | ||
<DebugType>portable</DebugType> | ||
<Deterministic>false</Deterministic> | ||
<EmbedUntrackedSources>false</EmbedUntrackedSources> | ||
<ContinuousIntegrationBuild>false</ContinuousIntegrationBuild> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup Condition="'$(Configuration)' == 'Release'"> | ||
<DebugType>embedded</DebugType> | ||
<Deterministic>true</Deterministic> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="RelaxVersioner" Version="2.14.0" PrivateAssets="All" /> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(Configuration)' == 'Release'"> | ||
<SourceRoot Include="$(MSBuildThisFileDirectory)/"/> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.