From 37dcf14bc56556fd4ffc18f23ae771e6cb656137 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 21 Nov 2025 11:37:57 +0100 Subject: [PATCH] Zmienne i macierze --- .gitea/workflows/ci.txt | 27 +++++++++++++++++++++++++++ .gitea/workflows/ci.yml | 19 ++++++------------- .gitea/workflows/ci2.yml | 16 ---------------- 3 files changed, 33 insertions(+), 29 deletions(-) create mode 100644 .gitea/workflows/ci.txt delete mode 100644 .gitea/workflows/ci2.yml diff --git a/.gitea/workflows/ci.txt b/.gitea/workflows/ci.txt new file mode 100644 index 0000000..a0f7a02 --- /dev/null +++ b/.gitea/workflows/ci.txt @@ -0,0 +1,27 @@ +name: First CI +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v3 + with: + dotnet-version: '8.0.x' + - run: dotnet restore + - run: dotnet build + - run: dotnet test + - run: dotnet publish -o app -r linux-x64 --sc /p:PublishSingleFile=true,AssemblyName=app + - run: tar cf app.tar app/ + - uses: actions/upload-artifact@v3 + with: + name: app.tar + path: app.tar + test: + steps: + - uses: actions/download-artifact@v3 + with: + name: app.tar + - run: tar xf app.tar app/ + - run: ./app/app diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index a0f7a02..e116a8d 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -4,24 +4,17 @@ on: [push] jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + rid: ["win-x64", "linux-x64"] steps: - uses: actions/checkout@v4 - uses: actions/setup-dotnet@v3 with: dotnet-version: '8.0.x' - run: dotnet restore - - run: dotnet build - - run: dotnet test - - run: dotnet publish -o app -r linux-x64 --sc /p:PublishSingleFile=true,AssemblyName=app - - run: tar cf app.tar app/ + - run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true - uses: actions/upload-artifact@v3 with: - name: app.tar - path: app.tar - test: - steps: - - uses: actions/download-artifact@v3 - with: - name: app.tar - - run: tar xf app.tar app/ - - run: ./app/app + name: app-${{ matrix.rid }}.tar + path: app-${{ matrix.rid }}.tar diff --git a/.gitea/workflows/ci2.yml b/.gitea/workflows/ci2.yml deleted file mode 100644 index fa0f0d4..0000000 --- a/.gitea/workflows/ci2.yml +++ /dev/null @@ -1,16 +0,0 @@ -name: First CI -on: [push] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - rid: ["win-x64", "linux-x64"] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '8.0.x' - - run: dotnet restore - - run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true