Skip to content

Commit

Permalink
revamp with .net 8 (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
elringus authored Dec 31, 2023
1 parent 06ec096 commit 999f371
Show file tree
Hide file tree
Showing 317 changed files with 7,690 additions and 53,663 deletions.
2 changes: 0 additions & 2 deletions .github/codecov.yml

This file was deleted.

26 changes: 15 additions & 11 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '36 7 * * 0'

jobs:
analyze:
Expand All @@ -19,24 +17,30 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'csharp', 'javascript' ]
language: [ "csharp", "javascript" ]
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8
- name: initialize codeql
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: build
run: |
dotnet build DotNet/DotNetJS.sln
cd JavaScript
npm ci
npm run build
dotnet publish test/csharp/Test.sln
cd src/cs
dotnet workload restore
mkdir .nuget
dotnet build Bootsharp.Generate -c Release
dotnet build Bootsharp.Common -c Release
dotnet pack Bootsharp.Common -o .nuget
dotnet build -c Release
dotnet pack Bootsharp -o .nuget
cd ../js
npm install
bash scripts/build.sh
- name: analyze
uses: github/codeql-action/analyze@v2
38 changes: 28 additions & 10 deletions .github/workflows/cover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,37 @@ jobs:
cover:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
dotnet-version: 8
- uses: actions/setup-node@v3
with:
node-version: 20
- name: cover
run: |
dotnet test DotNet/DotNetJS.sln /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
cd JavaScript
npm ci
npm run build
dotnet publish test/csharp/Test.sln
npm install -g nyc
nyc --reporter=lcov -x **/native -x **/bin -x **/dotnet-js-interop.ts npm run test
cd src/js
npm install
bash scripts/build.sh
cd ../cs
dotnet workload restore
mkdir .nuget
dotnet build Bootsharp.Generate -c Release
dotnet build Bootsharp.Common -c Release
dotnet pack Bootsharp.Common -o .nuget
dotnet build -c Release
dotnet pack Bootsharp -o .nuget
dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover
cd ../js/test/cs
dotnet workload restore
dotnet publish -p:BootsharpName=embedded -p:BootsharpEmbedBinaries=true
dotnet publish -p:BootsharpName=sideload -p:BootsharpEmbedBinaries=false
cd ../..
npm run cover
- name: upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: publish

on:
workflow_dispatch: { }
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- name: build
run: |
cd docs
npm install
npm run docs:build
- uses: actions/configure-pages@v3
- uses: actions/upload-pages-artifact@v2
with:
path: docs/.vitepress/dist
- uses: actions/deploy-pages@v2
32 changes: 18 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: build
run: |
dotnet build DotNet/DotNetJS.sln
cd JavaScript
npm ci
npm run build
dotnet-version: 8
- name: package
run: |
cd DotNet
dotnet pack -c Release -o packages
cd src/js
npm install
bash scripts/build.sh
cd ../cs
dotnet workload restore
mkdir .nuget
dotnet build Bootsharp.Generate -c Release
dotnet build Bootsharp.Common -c Release
dotnet pack Bootsharp.Common -o .nuget -c Release
dotnet pack Bootsharp.Inject -o .nuget -c Release
dotnet build -c Release
dotnet pack Bootsharp -o .nuget -c Release
- name: publish to nuget
run: |
dotnet nuget push "DotNet/packages/DotNetJS*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://www.nuget.org --skip-duplicate
dotnet nuget push "src/cs/.nuget/Bootsharp*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://www.nuget.org --skip-duplicate
- name: publish to github
run: |
dotnet nuget add source https://nuget.pkg.github.com/Elringus/index.json -n github --username Elringus --password ${{ secrets.GH_KEY }} --store-password-in-clear-text
dotnet nuget push "DotNet/packages/DotNetJS*.nupkg" -s github -k ${{ secrets.GH_KEY }} --skip-duplicate
dotnet nuget add source https://nuget.pkg.github.com/elringus/index.json -n github --username Elringus --password ${{ secrets.GH_KEY }} --store-password-in-clear-text
dotnet nuget push "src/cs/.nuget/Bootsharp*.nupkg" -s github -k ${{ secrets.GH_KEY }} --skip-duplicate
22 changes: 8 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,19 +1,13 @@
.vs
.idea

[Bb]in
[Oo]bj
[Pp]ackages

*.suo
*.user

node_modules
coverage
cache
dist
build
.nyc_output

JavaScript/native/emsdk
JavaScript/native/runtime
bin
obj

!DotNet/DotNetJS/Build
*.suo
*.user
*.nupkg
package-lock.json
Binary file removed Assets/PackageIcon.png
Binary file not shown.
9 changes: 0 additions & 9 deletions Assets/PackageIcon.svg

This file was deleted.

15 changes: 0 additions & 15 deletions DotNet/DotNetJS.Test/JSRuntimeTest.cs

This file was deleted.

26 changes: 0 additions & 26 deletions DotNet/DotNetJS.Test/JSTest.cs

This file was deleted.

32 changes: 0 additions & 32 deletions DotNet/DotNetJS.Test/JSTypesTest.cs

This file was deleted.

51 changes: 0 additions & 51 deletions DotNet/DotNetJS.Test/MockRuntime.cs

This file was deleted.

45 changes: 0 additions & 45 deletions DotNet/DotNetJS.sln

This file was deleted.

10 changes: 0 additions & 10 deletions DotNet/DotNetJS/Attributes/JSEventAttribute.cs

This file was deleted.

Loading

0 comments on commit 999f371

Please sign in to comment.