-
Notifications
You must be signed in to change notification settings - Fork 7
86 lines (70 loc) · 2.24 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: CI
on:
push:
branches:
- main
paths-ignore:
- '.github/workflows/x-*.yml'
workflow_dispatch: # manually-triggered runs
permissions:
# only allowed to read source code (ref. https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs)
contents: read
concurrency:
# cancel pending runs when a PR gets updated
group: "${{ github.head_ref || github.run_id }}-${{ github.actor }}"
cancel-in-progress: true
jobs:
build:
name: "CI - ${{ matrix.name }}"
strategy:
matrix:
include:
- name: "Ubuntu x64"
os: ubuntu-latest
env:
OS: "linux"
- name: "macOS ARM64"
os: macos-15
env:
OS: "macOS"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: "bash"
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
SCRIPT_SUFFIX: "${{ matrix.env.OS == 'linux' && 'linux_x64' || 'macos_universal' }}"
steps:
- name: checkout
uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: build C sample
run: |
cd Samples/Beyond.NET.Sample.C
./build_${{ env.SCRIPT_SUFFIX }}
- name: build Go sample (Linux)
if: "success() && matrix.env.OS == 'linux'"
run: |
cd Samples/Beyond.NET.Sample.Go
./build_${{ env.SCRIPT_SUFFIX }}
- name: run Swift tests (macOS)
if: "success() && matrix.env.OS == 'macOS'"
run: |
cd Samples/Beyond.NET.Sample.Swift
./build_dependencies
xcodebuild -workspace BeyondNETSamplesSwift.xcworkspace -scheme BeyondNETSampleSwift test -destination "name=My Mac"
xcodebuild -workspace BeyondNETSamplesSwift.xcworkspace -scheme BeyondNETSampleSwift test -destination "platform=iOS Simulator,name=iPhone 16,OS=18.0"
- name: build native sample
run: |
cd Samples/Beyond.NET.Sample.Native
./publish_${{ env.SCRIPT_SUFFIX }}
- name: run Android tests (macOS)
if: "success() && matrix.env.OS == 'macOS'"
run: |
cd Samples/Beyond.NET.Sample.Native
./publish_android_arm64
./test-on-emulator.ps1