APMSP-1542 feat: setup dotnet CI and add support for win-x64, win-x86, linux-x64, linux-arm64 & osx-arm64 #56
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| name: .NET | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - os: windows-latest | |
| target: i686-pc-windows-msvc | |
| - os: macos-latest | |
| target: x86_64-apple-darwin | |
| - os: macos-latest | |
| target: aarch64-apple-darwin | |
| - os: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - os: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| - os: ubuntu-latest | |
| target: x86_64-alpine-linux-musl | |
| - os: ubuntu-latest | |
| target: aarch64-alpine-linux-musl | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install rustup | |
| if: matrix.os == 'windows-latest' | |
| run: | | |
| $ProgressPreference = "SilentlyContinue" | |
| Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe | |
| .\rustup-init.exe -y --default-host=${{ matrix.target }} --default-toolchain stable --profile minimal | |
| del rustup-init.exe | |
| rustup target add ${{ matrix.target }} | |
| shell: powershell | |
| - name: Install rustup | |
| if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
| source $HOME/.cargo/env | |
| rustup target add ${{ matrix.target }} | |
| shell: bash | |
| - name: Build | |
| if: matrix.os == 'windows-latest' | |
| run: ./windows/build-artifacts.ps1 bin | |
| - name: Build | |
| if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' | |
| run: ./build-profiling-ffi.sh bin |