Compare commits

...

4 Commits

Author SHA1 Message Date
d45d2cbd8e Change CI to include Windows
All checks were successful
First CI / build (linux-x64) (push) Successful in 1m18s
First CI / build (win-x64) (push) Successful in 1m31s
2023-12-01 11:32:15 +01:00
c2f8fe35a0 Change CI to publish the app and run it in a separate job
All checks were successful
First CI / build (push) Successful in 1m28s
First CI / test (push) Successful in 16s
2023-12-01 11:22:42 +01:00
3e4dc1400c Update CI
Some checks failed
First CI / build (push) Successful in 56s
First CI / test (push) Failing after 10s
2023-12-01 11:16:35 +01:00
0e2bcb4a6d Switch to a better language 2023-12-01 11:16:23 +01:00
4 changed files with 25 additions and 12 deletions

View File

@@ -4,12 +4,18 @@ 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
- name: Build using gcc - uses: actions/setup-dotnet@v3
run: gcc -Wall -Werror main.c -o program
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with: with:
name: program dotnet-version: '6.0.x'
path: program - run: dotnet restore
- run: dotnet publish -o app -r ${{ matrix.rid }} --sc /p:PublishSingleFile=true,AssemblyName=app
- run: tar cf ${{ matrix.rid }}.tar app/
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.rid }}.tar
path: ${{ matrix.rid }}.tar

2
Program.cs Normal file
View File

@@ -0,0 +1,2 @@
// See https://aka.ms/new-console-template for more information
Console.WriteLine("Hello, World!");

11
ci-lab7.csproj Normal file
View File

@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>ci_lab7</RootNamespace>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>

6
main.c
View File

@@ -1,6 +0,0 @@
#include <stdio.h>
int main()
{
printf("Halo, Welt!");
return 0;
}