Skip to content

Commit 582eed3

Browse files
authored
runners 4 macos e winds
1 parent c2e7182 commit 582eed3

3 files changed

Lines changed: 65 additions & 54 deletions

File tree

.github/workflows/expression-functions.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

.github/workflows/runner-macos.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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

0 commit comments

Comments
 (0)