Skip to content

Evaluate Apple Silicon for CI #3878

Evaluate Apple Silicon for CI

Evaluate Apple Silicon for CI #3878

Workflow file for this run

name: CI Build
on:
push:
branches:
- 'main'
- 'release/*'
paths-ignore:
- 'documentation/**'
tags:
- '*'
pull_request:
# all branches
paths-ignore:
- 'documentation/**'
permissions:
packages: write
jobs:
Build:
# This will:
# - use windows-quick (self-hosted only, approx ~45 mins) on this repo if it's available
# - use macos-13-large (approx ~55 mins) otherwise
runs-on:
group: Larger GitHub-hosted runners
labels: windows-latest
steps:
- uses: actions/checkout@v3.5.2
with:
submodules: 'false'
- name: Setup Java JDK 11
uses: actions/setup-java@v2.3.0
with:
java-version: 11
distribution: "temurin"
- name: Setup Android Environment
uses: android-actions/setup-android@v2
env:
ANDROID_SDK_ROOT: /Users/runner/Library/Android/sdk
- name: Install Android Platforms
run: |
sdkmanager --install "build-tools;32.0.0"
sdkmanager --install "platform-tools"
sdkmanager --install "platforms;android-31"
sdkmanager --install "platforms;android-33"
sdkmanager --install "platforms;android-34"
- name: Setup .NET 6.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.201
- name: Setup .NET 7.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.102
- name: Install Workloads
run: dotnet workload install android ios maccatalyst maui
#- name: Test
# if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
# # skip Clean, Restore, and Compile as this will build the affect the whole solution.
# # dotnet test will compile the necessary projects for testing only.
# run: ./build.sh Test --skip Clean Restore Compile
- name: Validation Checks
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
run: ./build.sh ValidateSolution
- name: Pack (CI)
if: ${{ github.repository != 'dotnet/Silk.NET' || !startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
run: ./build.sh Pack --configuration Release --msbuild-properties VersionSuffix=build${{ github.run_number }}.0 ContinuousIntegrationBuild=true
env:
ANDROID_HOME: /Users/runner/Library/Android/sdk
- name: Pack (CD)
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
# TODO build native mixins such as BuildLibSilkDroid
run: ./build.sh Pack --configuration Release --msbuild-properties ContinuousIntegrationBuild=true
- name: Upload Unsigned Artifacts to Actions
uses: actions/upload-artifact@v2.2.4
with:
name: unsigned_nupkgs
path: "build/output_packages/*.nupkg"
if-no-files-found: warn
retention-days: 1
- name: Sign Packages
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
run: ./build.sh SignPackages --akv-certificate ${{ secrets.AKV_CERTIFICATE }} --akv-client-id ${{ secrets.AKV_CLIENT_ID }} --akv-client-secret ${{ secrets.AKV_CLIENT_SECRET }} --akv-tenant ${{ secrets.AKV_TENANT }} --akv-vault-url ${{ secrets.AKV_VAULT_URL }}
- name: Push to Experimental Feed
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
run: ./build.sh PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://dotnet.github.io/Silk.NET/nuget/experimental/index.json --nuget-username ${{ secrets.EXP_NUGET_USERNAME }} --nuget-password ${{ secrets.EXP_NUGET_PASSWORD }} --nuget-api-key ${{ secrets.EXP_NUGET_PASSWORD }}
- name: Push to GitHub Packages
if: ${{ github.repository == 'dotnet/Silk.NET' && github.event_name != 'pull_request' }}
run: ./build.sh PushToNuGet --skip Clean Restore Compile Pack --nuget-feed https://nuget.pkg.github.com/dotnet/index.json --nuget-api-key ${{ secrets.GITHUB_TOKEN }}
- name: Upload Signed Artifacts to Actions
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
uses: actions/upload-artifact@v2.2.4
with:
name: signed_nupkgs
path: "build/output_packages/*.nupkg"
if-no-files-found: warn
- name: Push to NuGet
if: ${{ github.repository == 'dotnet/Silk.NET' && startsWith(github.ref, 'refs/tags/') }}
run: ./build.sh PushToNuGet --skip Clean Restore Pack --nuget-api-key ${{ secrets.NUGET_TOKEN }}