Multiplatform build ci pipeline
Some checks failed
First CI / build (win-x64) (push) Successful in 1m35s
First CI / build (linux-x64) (push) Successful in 1m41s
First CI / test (push) Failing after 4s

This commit is contained in:
Anton Ovod
2025-11-20 13:06:57 +01:00
parent 76e3603573
commit 3390f8c02f

View File

@@ -4,6 +4,9 @@ on: [push]
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
rid: ["win-x64", "linux-x64"]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3 - uses: actions/setup-dotnet@v3
@@ -12,18 +15,19 @@ jobs:
- run: dotnet restore - run: dotnet restore
- run: dotnet build - run: dotnet build
- run: dotnet test - run: dotnet test
- run: dotnet publish -o app -r linux-x64 --sc /p:PublishSingleFile=true,AssemblyName=app - run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true,AssemblyName=app
- run: tar cf app.tar app/ - run: tar cf app.tar app/
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: app.tar name: app-${{ matrix.rid }}.tar
path: app.tar path: app-${{ matrix.rid }}.tar
test: test:
needs: build needs: build
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/download-artifact@v3 - uses: actions/download-artifact@v3
with: with:
name: app.tar name: app-linux-x64.tar
- run: tar xf app.tar - run: tar xf app-linux-x64.tar
- run: ./app/app - run: ./app/app