Skip to content

Commit 2802237

Browse files
committed
Merge branch 'feature/testcase-enhancement' into devel
2 parents cae9c00 + 59075af commit 2802237

File tree

292 files changed

+5231
-3536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

292 files changed

+5231
-3536
lines changed

.github/workflows/build-linux.yaml

+94-37
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
name: Linux
2-
on:
3-
push:
4-
branches:
5-
- master
6-
- devel
7-
- feature/github-actions-2
8-
pull_request:
9-
branches:
10-
- master
11-
- devel
12-
workflow_dispatch:
13-
branches:
2+
on: [push]
143
permissions:
154
contents: read
165
jobs:
@@ -23,55 +12,123 @@ jobs:
2312
env:
2413
buildConfiguration: ${{ matrix.buildConfiguration }}
2514
steps:
15+
16+
#----------------------------------------------------------------------
17+
2618
- name: Checkout
2719
uses: actions/checkout@v2
2820
with:
2921
fetch-depth: 0
3022
lfs: true
31-
# https://stackoverflow.com/questions/61463578/github-actions-actions-checkoutv2-lfs-true-flag-not-converting-pointers-to-act
23+
3224
- name: Checkout LFS objects
3325
run: git lfs checkout
34-
- name: Setup .NET Core 2.1
26+
27+
- name: Extract branch name
28+
id: extract_branch_name
29+
run: |
30+
export branch_name=`git name-rev --name-only --exclude=tags/* HEAD`
31+
echo "Detected current branch: $branch_name"
32+
echo "::set-output name=branch_name::$branch_name"
33+
34+
#----------------------------------------------------------------------
35+
36+
- name: Setup .NET Core 2.2
3537
uses: actions/setup-dotnet@v1
3638
with:
37-
dotnet-version: 2.1.818
39+
dotnet-version: 2.2.*
3840
- name: Setup .NET Core 3.1
3941
uses: actions/setup-dotnet@v1
4042
with:
41-
dotnet-version: 3.1.414
43+
dotnet-version: 3.1.*
4244
- name: Setup .NET 5
4345
uses: actions/setup-dotnet@v1
4446
with:
45-
dotnet-version: 5.0.402
47+
dotnet-version: 5.0.*
4648
- name: Setup .NET 6
4749
uses: actions/setup-dotnet@v1
4850
with:
49-
dotnet-version: 6.0.100
51+
dotnet-version: 6.0.*
52+
53+
#----------------------------------------------------------------------
54+
55+
#- name: Add msbuild to PATH
56+
# uses: microsoft/setup-msbuild@v1.0.3
57+
58+
#- name: Setup NuGet CLI
59+
# uses: nuget/setup-nuget@v1
60+
61+
#----------------------------------------------------------------------
62+
5063
#- name: Initialize tools
5164
# run: bash .github/workflows/init-tools-on-ga.sh
52-
- name: Install dependencies
53-
run: |
54-
dotnet restore il2c.sln
55-
dotnet restore samples/Calculator/Calculator.Core/Calculator.Core.csproj
56-
# dotnet restore samples/GettingStartedIL2C/GettingStartedIL2C.sln
57-
# dotnet restore samples/Calculator/Calculator.sln
65+
66+
#----------------------------------------------------------------------
67+
5868
- name: Build runtime library
5969
run: bash build-runtime.sh ${{env.buildConfiguration}}
70+
71+
#----------------------------------------------------------------------
72+
6073
- name: Build il2c
61-
run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform="Any CPU" il2c.sln
62-
# - name: Build GettingStartedIL2C-x86
63-
# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples/GettingStartedIL2C/GettingStartedIL2C.sln
64-
# - name: Build GettingStartedIL2C-x64
65-
# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples/GettingStartedIL2C/GettingStartedIL2C.sln
74+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER il2c.sln
75+
76+
#----------------------------------------------------------------------
77+
78+
- name: Test il2c (BasicTypes)
79+
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests/IL2C.Core.Test.BasicTypes/IL2C.Core.Test.BasicTypes.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
80+
timeout-minutes: 20
81+
- name: Test il2c (ILConverters)
82+
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests/IL2C.Core.Test.ILConverters/IL2C.Core.Test.ILConverters.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
83+
timeout-minutes: 20
84+
- name: Test il2c (RuntimeSystems)
85+
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests/IL2C.Core.Test.RuntimeSystems/IL2C.Core.Test.RuntimeSystems.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
86+
timeout-minutes: 20
87+
88+
#----------------------------------------------------------------------
89+
90+
- name: Build GettingStartedIL2C
91+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER samples/GettingStartedIL2C/GettingStartedIL2C.sln
92+
6693
- name: Build Calculator.Core
67-
run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform="AnyCPU" samples/Calculator/Calculator.Core/Calculator.Core.csproj
68-
# - name: Build Calculator-x86
69-
# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples/Calculator/Calculator.sln
70-
# - name: Build Calculator-x64
71-
# run: dotnet build --configuration ${{env.buildConfiguration}} --no-restore -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples/Calculator/Calculator.sln
94+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER samples/Calculator/Calculator.Core/Calculator.Core.csproj
95+
- name: Build Calculator
96+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER samples/Calculator/Calculator/Calculator.csproj
97+
98+
#- name: Build Calculator-x86
99+
# run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 samples/Calculator/Calculator.sln
100+
#- name: Build Calculator-x64
101+
# run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 samples/Calculator/Calculator.sln
102+
72103
- name: Build Calculator-CMake-mingw32
73104
run: bash build.sh ${{env.buildConfiguration}}
74105
working-directory: samples/Calculator/Calculator.CMake
75-
- name: Test il2c
76-
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests/IL2C.Core.Test.Fixture/IL2C.Core.Test.Fixture.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
77-
timeout-minutes: 20
106+
107+
#----------------------------------------------------------------------
108+
109+
- name: Build packages
110+
run: |
111+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts src/IL2C.Interop/IL2C.Interop.csproj
112+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts src/IL2C.Core/IL2C.Core.csproj
113+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts src/IL2C.Build/IL2C.Build.csproj
114+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts misc/IL2C.Toolchain.gcc4.mingw32/IL2C.Toolchain.gcc4.mingw32.csproj
115+
116+
#----------------------------------------------------------------------
117+
118+
#- name: Deploy NuGet package (Release/devel/il2c-devel)
119+
# if: (env.buildConfiguration == 'Release') && (startsWith(github.ref, 'refs/tags/'))
120+
# run: |
121+
# dotnet nuget push artifacts/IL2C.Interop.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
122+
# dotnet nuget push artifacts/IL2C.Core.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
123+
# dotnet nuget push artifacts/IL2C.Build.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
124+
# dotnet nuget push artifacts/IL2C.Toolchain.gcc4.mingw32.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
125+
126+
#----------------------------------------------------------------------
127+
128+
#- name: Deploy NuGet package (Release/master/nuget.org)
129+
# if: (env.buildConfiguration == 'Release') && (startsWith(github.ref, 'refs/tags/')) && (endsWith(steps.extract_branch_name.outputs.branch_name, 'master'))
130+
# run: |
131+
# dotnet nuget push artifacts/IL2C.Interop.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}
132+
# dotnet nuget push artifacts/IL2C.Core.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}
133+
# dotnet nuget push artifacts/IL2C.Build.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}
134+
# dotnet nuget push artifacts/IL2C.Toolchain.gcc4.mingw32.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}

.github/workflows/build-windows.yaml

+93-35
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
11
name: Windows
2-
on:
3-
push:
4-
branches:
5-
- master
6-
- devel
7-
- feature/github-actions-2
8-
pull_request:
9-
branches:
10-
- master
11-
- devel
12-
workflow_dispatch:
13-
branches:
2+
on: [push]
143
permissions:
154
contents: read
165
jobs:
@@ -23,57 +12,126 @@ jobs:
2312
env:
2413
buildConfiguration: ${{ matrix.buildConfiguration }}
2514
steps:
15+
16+
#----------------------------------------------------------------------
17+
2618
- name: Checkout
2719
uses: actions/checkout@v2
2820
with:
2921
fetch-depth: 0
3022
lfs: true
31-
# https://stackoverflow.com/questions/61463578/github-actions-actions-checkoutv2-lfs-true-flag-not-converting-pointers-to-act
23+
3224
- name: Checkout LFS objects
3325
run: git lfs checkout
34-
- name: Setup .NET Core 2.1
26+
27+
- name: Extract branch name
28+
id: extract_branch_name
29+
run: |
30+
$branch_name=$(git name-rev --name-only --exclude=tags/* HEAD)
31+
echo "Detected current branch: ${branch_name}"
32+
echo "::set-output name=branch_name::${branch_name}"
33+
34+
#----------------------------------------------------------------------
35+
36+
- name: Setup .NET Core 2.2
3537
uses: actions/setup-dotnet@v1
3638
with:
37-
dotnet-version: 2.1.818
39+
dotnet-version: 2.2.*
3840
- name: Setup .NET Core 3.1
3941
uses: actions/setup-dotnet@v1
4042
with:
41-
dotnet-version: 3.1.414
43+
dotnet-version: 3.1.*
4244
- name: Setup .NET 5
4345
uses: actions/setup-dotnet@v1
4446
with:
45-
dotnet-version: 5.0.402
47+
dotnet-version: 5.0.*
4648
- name: Setup .NET 6
4749
uses: actions/setup-dotnet@v1
4850
with:
49-
dotnet-version: 6.0.100
51+
dotnet-version: 6.0.*
52+
53+
#----------------------------------------------------------------------
54+
5055
- name: Add msbuild to PATH
5156
uses: microsoft/setup-msbuild@v1.0.3
57+
58+
- name: Setup NuGet CLI
59+
uses: nuget/setup-nuget@v1
60+
61+
#----------------------------------------------------------------------
62+
5263
- name: Initialize tools
5364
run: init-tools.bat
5465
shell: cmd
55-
- name: Install dependencies
56-
run: |
57-
dotnet restore il2c.sln
58-
dotnet restore samples\GettingStartedIL2C\GettingStartedIL2C.sln
59-
dotnet restore samples\Calculator\Calculator.sln
66+
67+
#----------------------------------------------------------------------
68+
6069
- name: Build runtime library
6170
run: build-runtime.bat ${{env.buildConfiguration}}
6271
shell: cmd
72+
73+
#----------------------------------------------------------------------
74+
6375
- name: Build il2c
64-
run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform="Any CPU" -maxCpuCount il2c.sln
65-
- name: Build GettingStartedIL2C-x86
66-
run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 -maxCpuCount samples\GettingStartedIL2C\GettingStartedIL2C.sln
67-
- name: Build GettingStartedIL2C-x64
68-
run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 -maxCpuCount samples\GettingStartedIL2C\GettingStartedIL2C.sln
69-
- name: Build Calculator-x86
70-
run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 -maxCpuCount samples\Calculator\Calculator.sln
71-
- name: Build Calculator-x64
72-
run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 -maxCpuCount samples\Calculator\Calculator.sln
76+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER il2c.sln
77+
78+
#----------------------------------------------------------------------
79+
80+
- name: Test il2c (BasicTypes)
81+
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests\IL2C.Core.Test.BasicTypes\IL2C.Core.Test.BasicTypes.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
82+
timeout-minutes: 20
83+
- name: Test il2c (ILConverters)
84+
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests\IL2C.Core.Test.ILConverters\IL2C.Core.Test.ILConverters.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
85+
timeout-minutes: 20
86+
- name: Test il2c (RuntimeSystems)
87+
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests\IL2C.Core.Test.RuntimeSystems\IL2C.Core.Test.RuntimeSystems.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
88+
timeout-minutes: 20
89+
90+
#----------------------------------------------------------------------
91+
92+
- name: Build GettingStartedIL2C
93+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER samples\GettingStartedIL2C\GettingStartedIL2C.sln
94+
95+
- name: Build Calculator.Core
96+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER samples\Calculator\Calculator.Core\Calculator.Core.csproj
97+
- name: Build Calculator
98+
run: dotnet build --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER samples\Calculator\Calculator\Calculator.csproj
99+
100+
#- name: Build Calculator-x86
101+
# run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x86 -maxCpuCount samples\Calculator\Calculator.sln
102+
#- name: Build Calculator-x64
103+
# run: msbuild -p:Configuration=${{env.buildConfiguration}} -r:false -p:BuildIdentifier=$GITHUB_RUN_NUMBER -p:Platform=x64 -maxCpuCount samples\Calculator\Calculator.sln
104+
73105
- name: Build Calculator-CMake-mingw32
74106
run: build.bat ${{env.buildConfiguration}}
75107
shell: cmd
76108
working-directory: samples\Calculator\Calculator.CMake
77-
- name: Test il2c
78-
run: dotnet test --no-build --verbosity normal --configuration ${{env.buildConfiguration}} tests\IL2C.Core.Test.Fixture\IL2C.Core.Test.Fixture.csproj -- BuildIdentifier=$GITHUB_RUN_NUMBER Platform=x64 CITest=True
79-
timeout-minutes: 20
109+
110+
#----------------------------------------------------------------------
111+
112+
- name: Build packages
113+
run: |
114+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts src\IL2C.Interop\IL2C.Interop.csproj
115+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts src\IL2C.Core\IL2C.Core.csproj
116+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts src\IL2C.Build\IL2C.Build.csproj
117+
dotnet pack --configuration ${{env.buildConfiguration}} -p:BuildIdentifier=$GITHUB_RUN_NUMBER -o artifacts misc\IL2C.Toolchain.gcc4.mingw32\IL2C.Toolchain.gcc4.mingw32.csproj
118+
119+
#----------------------------------------------------------------------
120+
121+
- name: Deploy NuGet package (Release/devel/il2c-devel)
122+
if: (env.buildConfiguration == 'Release') && (startsWith(github.ref, 'refs/tags/'))
123+
run: |
124+
dotnet nuget push artifacts\IL2C.Interop.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
125+
dotnet nuget push artifacts\IL2C.Core.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
126+
dotnet nuget push artifacts\IL2C.Build.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
127+
dotnet nuget push artifacts\IL2C.Toolchain.gcc4.mingw32.*.nupkg --source il2c-devel --api-key ${{secrets.GH_IL2C_NUGET_MYGET_KEY}}
128+
129+
#----------------------------------------------------------------------
130+
131+
#- name: Deploy NuGet package (Release/master/nuget.org)
132+
# if: (env.buildConfiguration == 'Release') && (startsWith(github.ref, 'refs/tags/')) && (endsWith(steps.extract_branch_name.outputs.branch_name, 'master'))
133+
# run: |
134+
# dotnet nuget push artifacts\IL2C.Interop.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}
135+
# dotnet nuget push artifacts\IL2C.Core.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}
136+
# dotnet nuget push artifacts\IL2C.Build.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}
137+
# dotnet nuget push artifacts\IL2C.Toolchain.gcc4.mingw32.*.nupkg --source nuget.org --api-key ${{secrets.GH_IL2C_NUGET_NUGET_KEY}}

.nuget/nuget.exe

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:432d322b16ffab3fed5d24ab7ea30ae10c555a00339a9bf53060aa4b2aee7925
3-
size 7042968
2+
oid sha256:c89875d937b7faff3ac024c3ceeceaaecbd786c47b33c09dd4129275a405594b
3+
size 7088552

NuGet.config

-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
<clear />
55
<add key="il2c-devel" value="https://www.myget.org/F/il2c/api/v3/index.json" />
66
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
7-
<add key="kekyo" value="https://www.myget.org/F/kekyo/api/v3/index.json" />
87
</packageSources>
98
</configuration>

docs/sample-translation-results.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void HelloWorld_Main()
7575
.maxstack 2
7676
ldstr "ABC"
7777
isinst [mscorlib]System.ValueType
78-
brnull.s F1
78+
brfalse.s F1
7979
ldc.i4.1
8080
ret
8181
F1:

0 commit comments

Comments
 (0)