-
Notifications
You must be signed in to change notification settings - Fork 7
111 lines (92 loc) · 3.07 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
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"
SCRIPT_SUFFIX: "linux_x64"
- name: "Ubuntu ARM64"
os: ubuntu-24-arm64-gh
env:
OS: "linux"
SCRIPT_SUFFIX: "linux_arm64"
- name: "macOS ARM64"
os: macos-15
env:
OS: "macOS"
SCRIPT_SUFFIX: "macos_universal"
runs-on: "${{ matrix.os }}"
defaults:
run:
shell: "bash"
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
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_${{ matrix.env.SCRIPT_SUFFIX }}
- name: build Go sample (Linux)
if: "success() && matrix.env.OS == 'linux'"
run: |
cd Samples/Beyond.NET.Sample.Go
./build_${{ matrix.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_${{ matrix.env.SCRIPT_SUFFIX }}
- name: build Android native
run: |
cd Samples/Beyond.NET.Sample.Native
./publish_android_arm64
#- name: run Android tests (macOS)
# if: "success() && matrix.env.OS == 'macOS'"
# uses: reactivecircus/android-emulator-runner@v2
# with:
# api-level: 31
# arch: arm64-v8a
# target: google_apis
# disable-animations: true
# force-avd-creation: false
# emulator-boot-timeout: 120
# emulator-options: -no-audio -no-boot-anim -no-window -no-snapshot-save -gpu off -camera-back none
# working-directory: Samples/Beyond.NET.Sample.Android
# script: ./gradlew connectedAndroidTest
#- name: run Android tests (macOS)
# if: "success() && matrix.env.OS == 'macOS'"
# run: |
# cd Samples/Beyond.NET.Sample.Android
# ./test-on-emulator.ps1