File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : macOS Workflow Example
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build-and-test :
10+ runs-on : macos-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Create Swift File
17+ run : |
18+ echo 'print("Hello from Swift on macOS")' > hello.swift
19+
20+ - name : Install dependencies
21+ run : |
22+ brew install swiftlint
23+
24+ - name : Run SwiftLint
25+ run : swiftlint
26+
27+ - name : Compile and run Swift program
28+ run : |
29+ swiftc hello.swift
30+ ./hello
Original file line number Diff line number Diff line change 1+ name : Windows Workflow Example
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build-and-test :
10+ runs-on : windows-latest
11+
12+ steps :
13+ - name : Checkout code
14+ uses : actions/checkout@v3
15+
16+ - name : Install dependencies
17+ run : choco install dotnetcore-sdk
18+ shell : powershell
19+
20+ - name : Compile and run C# program
21+ run : |
22+ Add-Content -Path "Hello.cs" -Value @"
23+ using System;
24+ public class Hello
25+ {
26+ public static void Main()
27+ {
28+ Console.WriteLine("Hello, Windows from C#");
29+ }
30+ }
31+ "@
32+ dotnet new console --force --no-restore
33+ Move-Item -Path "Hello.cs" -Destination "Program.cs" -Force
34+ dotnet run
35+ shell : powershell
You can’t perform that action at this time.
0 commit comments