Skip to content

Commit adfdc47

Browse files
committed
feat: setup dotnet CI
1 parent 17f36e9 commit adfdc47

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/dotnet.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
branches:
7+
- main
8+
9+
name: .NET
10+
11+
jobs:
12+
build:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [windows-latest, macos-latest, ubuntu-latest]
18+
include:
19+
- os: windows-latest
20+
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc]
21+
- os: macos-latest
22+
target: [x86_64-apple-darwin, arch64-apple-darwin]
23+
- os: ubuntu-latest
24+
target: [x86_64-alpine-linux-musl, aarch64-alpine-linux-musl, x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu]
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
30+
- name: Install rustup
31+
if: matrix.os == 'windows-latest'
32+
run: |
33+
$ProgressPreference = "SilentlyContinue"
34+
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
35+
.\rustup-init.exe -y --default-host=${{ matrix.target }} --default-toolchain=none
36+
del rustup-init.exe
37+
rustup target add ${{ matrix.target }}
38+
shell: powershell
39+
40+
- name: Install rustup
41+
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
42+
run: |
43+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
44+
source $HOME/.cargo/env
45+
rustup target add ${{ matrix.target }}
46+
shell: bash
47+
48+
- name: Build
49+
if: matrix.os == 'windows-latest'
50+
run: ./windows/build-artifacts.ps1 bin
51+
52+
- name: Build
53+
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest'
54+
run: ./build-profiling-ffi.sh

0 commit comments

Comments
 (0)