Skip to content

Commit ba33c42

Browse files
authored
Create windows-arm.yml
1 parent 0988383 commit ba33c42

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

.github/workflows/windows-arm.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# This workflow will build a .NET project
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3+
4+
name: windows-arm
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
strategy:
15+
matrix:
16+
os: [windows-11-arm]
17+
18+
runs-on: ${{ matrix.os }}
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: 8.0.x
26+
- name: Restore dependencies
27+
run: dotnet restore
28+
- name: Build
29+
run: dotnet build -c Debug --no-restore
30+
- name: Upload artifact
31+
uses: actions/upload-artifact@v4.6.2
32+
with:
33+
name: cstojs-${{ matrix.os }}-artifact
34+
path: D:/a/CSharpToJavaScript/CSharpToJavaScript/CSharpToJavaScript/bin/Debug/net8.0/
35+
if-no-files-found: error
36+
compression-level: 0
37+
test:
38+
needs: build
39+
strategy:
40+
matrix:
41+
os: [windows-11-arm]
42+
43+
runs-on: ${{ matrix.os }}
44+
45+
steps:
46+
- uses: actions/download-artifact@v4
47+
with:
48+
name: cstojs-${{ matrix.os }}-artifact
49+
path: ~/artifact/
50+
- name: Display structure of downloaded files
51+
run: ls -R ~/artifact/
52+
- name: Clone CSTOJS_Tests
53+
uses: whyakari/github-repo-action@v3.1
54+
with:
55+
owner: TiLied
56+
repository: CSTOJS_Tests
57+
branch: 'master'
58+
- name: Access cloned repository content
59+
run: ls -R CSTOJS_Tests
60+
- name: Setup .NET
61+
uses: actions/setup-dotnet@v4
62+
with:
63+
dotnet-version: 8.0.x
64+
- name: List refs
65+
run: dotnet list CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj reference
66+
- name: Delete reference
67+
run: dotnet remove CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj reference "..\..\CSharpToJavaScript\CSharpToJavaScript\CSharpToJavaScript.csproj"
68+
- name: Replace reference
69+
run: (Get-Content CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj) -replace '</Project>', '<ItemGroup><Reference Include="CSharpToJavaScript"><HintPath>C:/Users/runneradmin/artifact/CSharpToJavaScript.dll</HintPath></Reference></ItemGroup></Project>' | Out-File -encoding ASCII CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj
70+
- name: Type CSTOJS_Tests.csproj
71+
run: type CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj
72+
- name: Add Microsoft.CodeAnalysis.CSharp.Workspaces reference
73+
run: dotnet add CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj package Microsoft.CodeAnalysis.CSharp.Workspaces
74+
- name: Run tests
75+
run: dotnet test CSTOJS_Tests/CSTOJS_Tests/CSTOJS_Tests.csproj --logger "html;logfilename=test-result-${{ matrix.os }}.html;verbosity=detailed" --results-directory C:/Users/runneradmin/artifact
76+
- name: Upload test result
77+
uses: actions/upload-artifact@v4.6.2
78+
with:
79+
name: test-result-${{ matrix.os }}
80+
path: C:/Users/runneradmin/artifact/test-result-${{ matrix.os }}.html
81+
if-no-files-found: error
82+
if: ${{ always() }}

0 commit comments

Comments
 (0)