Setup Github Actions (#29)
Doing this because macOS 11 Big Sur is available now: https://github.blog/changelog/2021-08-16-github-actions-macos-11-big-sur-is-generally-available-on-github-hosted-runners/ Remove `mac` job from AzDO. We can rely on Github Actions for macOS CI.
This commit is contained in:
Родитель
ba6d6ad675
Коммит
534fbe2605
|
@ -0,0 +1,43 @@
|
|||
name: Github Actions
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
mac:
|
||||
runs-on: macos-11
|
||||
|
||||
env:
|
||||
Configuration: Release
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install .NET
|
||||
uses: actions/setup-dotnet@v1
|
||||
with:
|
||||
dotnet-version: 6.0.100-preview.7.21379.14
|
||||
|
||||
- name: install .NET workloads
|
||||
run: dotnet workload install android ios macos --verbosity diag
|
||||
|
||||
- name: install Xamarin.Android
|
||||
run: |
|
||||
dotnet tool update --global boots --version 1.0.4.624
|
||||
boots https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5045838/6.0.1xx-preview7/f38d0a639add19221694ad73f79c34d2c7c76948/xamarin.android-11.4.99.78.pkg
|
||||
|
||||
- name: build SDK
|
||||
run: dotnet build Xamarin.Legacy.Sdk.sln -bl:bin/Xamarin.Legacy.Sdk.binlog
|
||||
|
||||
- name: build samples
|
||||
run: dotnet build samples/samples.sln -bl:bin/samples.binlog
|
||||
|
||||
- name: artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: artifacts
|
||||
path: bin
|
||||
if-no-files-found: error
|
|
@ -26,8 +26,6 @@ variables:
|
|||
value: android ios macos
|
||||
- name: Xamarin.Android.Vsix
|
||||
value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5045838/6.0.1xx-preview7/f38d0a639add19221694ad73f79c34d2c7c76948/signed/Xamarin.Android.Sdk-11.4.99.78.vsix
|
||||
- name: Xamarin.Android.Pkg
|
||||
value: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5045838/6.0.1xx-preview7/f38d0a639add19221694ad73f79c34d2c7c76948/xamarin.android-11.4.99.78.pkg
|
||||
|
||||
jobs:
|
||||
|
||||
|
@ -103,40 +101,6 @@ jobs:
|
|||
targetPath: bin
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- job: mac
|
||||
pool:
|
||||
vmImage: macOS-latest
|
||||
demands: msbuild
|
||||
variables:
|
||||
DotNet.Root: /usr/local/share/dotnet/
|
||||
DotNet.Tools: ~/.dotnet/tools
|
||||
steps:
|
||||
- script: echo '##vso[task.setvariable variable=JI_JAVA_HOME]$(JAVA_HOME_11_X64)'
|
||||
displayName: set JI_JAVA_HOME
|
||||
- bash: >
|
||||
export PATH="$(DotNet.Root):$(DotNet.Tools):$PATH" &&
|
||||
curl -L https://dot.net/v1/dotnet-install.sh > dotnet-install.sh &&
|
||||
sh dotnet-install.sh --version $(DotNetVersion) --install-dir $DOTNET_ROOT --verbose &&
|
||||
dotnet --list-sdks &&
|
||||
echo "##vso[task.setvariable variable=PATH]$PATH"
|
||||
displayName: install .NET $(DotNetVersion)
|
||||
- bash: dotnet workload install $(DotNet.Workloads) --verbosity diag
|
||||
displayName: install .NET workloads
|
||||
- bash: >
|
||||
dotnet tool update --global boots --version $(BootsVersion) &&
|
||||
boots $(Xamarin.Android.Pkg)
|
||||
displayName: install Xamarin.Android
|
||||
- script: dotnet build Xamarin.Legacy.Sdk.sln -bl:$(System.DefaultWorkingDirectory)/bin/Xamarin.Legacy.Sdk.binlog
|
||||
displayName: build SDK
|
||||
- script: dotnet build samples/samples.sln -bl:$(System.DefaultWorkingDirectory)/bin/samples.binlog
|
||||
displayName: build samples
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: artifacts
|
||||
inputs:
|
||||
artifact: mac
|
||||
targetPath: bin
|
||||
condition: succeededOrFailed()
|
||||
|
||||
- template: sign-artifacts/jobs/v2.yml@templates
|
||||
parameters:
|
||||
displayName: sign
|
||||
|
|
Загрузка…
Ссылка в новой задаче