mirror of
https://github.com/Ryubing/SharpMetal.git
synced 2025-05-13 03:00:37 +01:00
Workflow updates
This commit is contained in:
parent
fdb77a9172
commit
015071f8e0
5 changed files with 72 additions and 29 deletions
|
@ -65,3 +65,8 @@ resharper_csharp_namespace_body = block_scoped
|
||||||
# Code-block preferences
|
# Code-block preferences
|
||||||
csharp_prefer_braces = true:warning
|
csharp_prefer_braces = true:warning
|
||||||
csharp_prefer_simple_using_statement = true:suggestion
|
csharp_prefer_simple_using_statement = true:suggestion
|
||||||
|
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
|
||||||
|
indent_size = 2
|
25
.github/workflows/build.yml
vendored
Normal file
25
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: Build & Test
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: build-${{ github.event.number }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0.x
|
||||||
|
- name: Restore dependencies
|
||||||
|
run: dotnet restore
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build --no-restore
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test --no-build --verbosity normal
|
26
.github/workflows/dotnet.yml
vendored
26
.github/workflows/dotnet.yml
vendored
|
@ -1,26 +0,0 @@
|
||||||
# This workflow will build a .NET project
|
|
||||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
|
|
||||||
|
|
||||||
name: Build & Test
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ "master" ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ "master" ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: macos-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Setup .NET
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: 7.0.x
|
|
||||||
- name: Restore dependencies
|
|
||||||
run: dotnet restore
|
|
||||||
- name: Build
|
|
||||||
run: dotnet build --no-restore
|
|
||||||
- name: Test
|
|
||||||
run: dotnet test --no-build --verbosity normal
|
|
39
.github/workflows/format.yml
vendored
Normal file
39
.github/workflows/format.yml
vendored
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
name: Format
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
checks: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: format-${{ github.event.number }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: 7.0.x
|
||||||
|
- run: dotnet restore
|
||||||
|
- name: Format
|
||||||
|
run: dotnet format --verify-no-changes --report ./report.json -v d
|
||||||
|
- name: Upload report
|
||||||
|
if: failure()
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: dotnet-format
|
||||||
|
path: ./report.json
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/build.yml
|
||||||
|
needs: format
|
||||||
|
secrets: inherit
|
|
@ -3,8 +3,8 @@
|
||||||
# SharpMetal
|
# SharpMetal
|
||||||
*Metal bindings for C#.*
|
*Metal bindings for C#.*
|
||||||
|
|
||||||

|

|
||||||
<!--  -->
|

|
||||||
|
|
||||||
<img width="624" alt="primitive" src="https://github.com/IsaacMarovitz/SharpMetal/assets/42140194/478e2341-7c5d-47ad-9638-615b3091cef1">
|
<img width="624" alt="primitive" src="https://github.com/IsaacMarovitz/SharpMetal/assets/42140194/478e2341-7c5d-47ad-9638-615b3091cef1">
|
||||||
</div>
|
</div>
|
||||||
|
@ -24,7 +24,7 @@ Wonderful! SharpMetal is built with .NET 7.0, and follows a couple of specific g
|
||||||
- Source Generated P/Invokes
|
- Source Generated P/Invokes
|
||||||
- `LibraryImport` not `DllImport`
|
- `LibraryImport` not `DllImport`
|
||||||
- Use C# types where possible
|
- Use C# types where possible
|
||||||
- `NSInteger` -> `long`
|
- `NSInteger` -> `long`
|
||||||
- `NSUInteger` -> `ulong`
|
- `NSUInteger` -> `ulong`
|
||||||
- Mark structs and classes with `SupportedOSPlatform` attribute
|
- Mark structs and classes with `SupportedOSPlatform` attribute
|
||||||
- SharpMetal is built for macOS primarily, so when there are platform-specific differences, use the macOS option
|
- SharpMetal is built for macOS primarily, so when there are platform-specific differences, use the macOS option
|
||||||
|
|
Loading…
Reference in a new issue