Zmiana na .NET i wieloetapowe CI
This commit is contained in:
@@ -8,11 +8,31 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: build using gcc
|
- name: Setup .NET
|
||||||
run: gcc -Wall -Werror main.c -o program
|
uses: actions/setup-dotnet@v3
|
||||||
|
|
||||||
- name: Archive production artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
with:
|
||||||
name: program
|
dotnet-version: '8.0.x'
|
||||||
path: program
|
|
||||||
|
- run: dotnet restore
|
||||||
|
- run: dotnet build
|
||||||
|
|
||||||
|
- run: dotnet publish -o app -r linux-x64 --sc -p:PublishSingleFile=true -p:AssemblyName=app
|
||||||
|
|
||||||
|
- run: tar cf app.tar app/
|
||||||
|
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: app.tar
|
||||||
|
path: app.tar
|
||||||
|
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: app.tar
|
||||||
|
|
||||||
|
- run: tar xf app.tar/app.tar || tar xf app.tar
|
||||||
|
|
||||||
|
- run: ./app/app
|
||||||
10
Program.cs
Normal file
10
Program.cs
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
// Program.cs
|
||||||
|
using System;
|
||||||
|
|
||||||
|
class Program
|
||||||
|
{
|
||||||
|
static void Main()
|
||||||
|
{
|
||||||
|
Console.WriteLine("Hello, World!");
|
||||||
|
}
|
||||||
|
}
|
||||||
10
lab7.csproj
Normal file
10
lab7.csproj
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
Reference in New Issue
Block a user