Merge pull request #169 from unoplatform/dev/jela/skip-installed #539
This file contains 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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
types: [opened, synchronize, reopened] | |
branches: | |
- main | |
- release/** | |
env: | |
GitVersion_Version: 5.10.3 | |
jobs: | |
build_tool: | |
name: Build | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Setup .NET Core v5 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '5.0.x' | |
- name: Setup .NET Core v6 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '6.0.100' | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/setup@v0.9.9 | |
with: | |
versionSpec: ${{ env.GitVersion_Version }} | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.9.9 | |
with: | |
useConfigFile: true | |
configFilePath: gitversion.yml | |
- name: Build - CI | |
run: | | |
$adjustedPackageVersion="${{ steps.gitversion.outputs.semVer }}".ToLower(); | |
dotnet pack -c Release -p:PackageVersion=$adjustedPackageVersion -p:Version=${{ steps.gitversion.outputs.assemblySemVer }} -o .\artifacts UnoCheck\UnoCheck.csproj | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: NuGet | |
path: .\artifacts | |
testwin: | |
name: Validate Tool - Windows - ${{ matrix.manifest_name }} | |
needs: build_tool | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
include: | |
- manifest: 'manifests\uno.ui.manifest.json' | |
manifest_name: Stable | |
- manifest: 'manifests\uno.ui-preview.manifest.json' | |
manifest_name: Preview | |
- manifest: 'manifests\uno.ui-preview-major.manifest.json' | |
manifest_name: Preview net8 | |
- manifest: 'manifests\uno.ui.manifest.json' | |
manifest_name: Stable Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '' | |
- manifest: 'manifests\uno.ui-preview.manifest.json' | |
manifest_name: Preview Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
- manifest: 'manifests\uno.ui-preview-major.manifest.json' | |
manifest_name: Preview Upgrade net8 | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v1 | |
with: | |
name: NuGet | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/setup@v0.9.9 | |
with: | |
versionSpec: ${{ env.GitVersion_Version }} | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.9.9 | |
with: | |
useConfigFile: true | |
configFilePath: gitversion.yml | |
- name: Install and Run Previous Tool | |
if: ${{ contains(matrix.previous_tool_version, '.') }} | |
shell: pwsh | |
run: | | |
Write-Output "PACKAGE VERSION: ${{ steps.gitversion.outputs.semVer }}" | |
$ProgressPreference = 'SilentlyContinue' | |
& dotnet --list-sdks | |
& dotnet tool install --global --version ${{ matrix.previous_tool_version }} uno.check | |
& uno-check --ci --fix --non-interactive --verbose --target webassembly --target ios --target android --target macos --target linux --target win32 --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 ${{ matrix.previous_tool_params }} | |
& dotnet tool uninstall --global uno.check | |
- name: Install and Run Tool | |
shell: pwsh | |
run: | | |
Write-Output "PACKAGE VERSION: ${{ steps.gitversion.outputs.semVer }}" | |
$ProgressPreference = 'SilentlyContinue' | |
& dotnet --list-sdks | |
& dotnet tool install --global --version ${{ steps.gitversion.outputs.semVer }} --add-source NuGet\ uno.check | |
& uno-check --ci --fix --non-interactive --verbose --target webassembly --target ios --target android --target macos --target linux --target win32 --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 --manifest ${{ matrix.manifest }} | |
testmac: | |
name: Validate Tool - macOS - ${{ matrix.manifest_name }}/${{ matrix.os }} | |
needs: build_tool | |
strategy: | |
matrix: | |
include: | |
- manifest: 'manifests/uno.ui.manifest.json' | |
manifest_name: Stable | |
os: macos-11 | |
dotnet_version: 7.0.102 | |
- manifest: 'manifests/uno.ui-preview.manifest.json' | |
manifest_name: Preview | |
previous_tool_version: '' | |
previous_tool_params: '' | |
os: macos-11 | |
dotnet_version: 7.0.200-preview.22628.1 | |
- manifest: 'manifests/uno.ui-preview-major.manifest.json' | |
manifest_name: Preview net8 | |
previous_tool_version: '' | |
previous_tool_params: '' | |
os: macos-11 | |
dotnet_version: 8.0.100-preview.1.23115.2 | |
- manifest: 'manifests/uno.ui.manifest.json' | |
manifest_name: Stable Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '' | |
os: macos-11 | |
dotnet_version: 7.0.401 | |
- manifest: 'manifests/uno.ui-preview.manifest.json' | |
manifest_name: Preview Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
os: macos-11 | |
dotnet_version: 7.0.200-preview.22628.1 | |
- manifest: 'manifests/uno.ui-preview-major.manifest.json' | |
manifest_name: Preview Upgrade net8 | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
os: macos-11 | |
dotnet_version: 8.0.100-preview.1.23115.2 | |
- manifest: 'manifests/uno.ui.manifest.json' | |
manifest_name: Stable | |
os: macos-12 | |
dotnet_version: 7.0.401 | |
- manifest: 'manifests/uno.ui-preview.manifest.json' | |
manifest_name: Preview | |
previous_tool_version: '' | |
previous_tool_params: '' | |
os: macos-12 | |
dotnet_version: 7.0.200-preview.22628.1 | |
- manifest: 'manifests/uno.ui-preview-major.manifest.json' | |
manifest_name: Preview net8 | |
previous_tool_version: '' | |
previous_tool_params: '' | |
os: macos-12 | |
dotnet_version: 8.0.100-preview.1.23115.2 | |
- manifest: 'manifests/uno.ui.manifest.json' | |
manifest_name: Stable Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '' | |
os: macos-12 | |
dotnet_version: 7.0.401 | |
- manifest: 'manifests/uno.ui-preview.manifest.json' | |
manifest_name: Preview Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
os: macos-12 | |
dotnet_version: 7.0.200-preview.22628.1 | |
- manifest: 'manifests/uno.ui-preview-major.manifest.json' | |
manifest_name: Preview Upgrade net8 | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
os: macos-12 | |
dotnet_version: 8.0.100-preview.1.23115.2 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v1 | |
with: | |
name: NuGet | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
# Preinstall .NET as it may fail on some build agents | |
- name: Setup .NET Core ${{ matrix.dotnet_version }} | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '${{ matrix.dotnet_version }}' | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/setup@v0.9.9 | |
with: | |
versionSpec: ${{ env.GitVersion_Version }} | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.9.9 | |
with: | |
useConfigFile: true | |
configFilePath: gitversion.yml | |
- name: Install GTK+3 | |
shell: pwsh | |
run: | | |
brew install gtk+3 | |
- name: Install and Run Previous Tool | |
if: ${{ contains(matrix.previous_tool_version, '.') }} | |
shell: pwsh | |
run: | | |
Write-Output "PACKAGE VERSION: ${{ steps.gitversion.outputs.semVer }}" | |
$ProgressPreference = 'SilentlyContinue' | |
& dotnet --list-sdks | |
& dotnet tool install --global --version ${{ matrix.previous_tool_version }} uno.check | |
& uno-check --ci --fix --non-interactive --verbose --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 ${{ matrix.previous_tool_params }} | |
& dotnet tool uninstall --global uno.check | |
- name: Install and Run Tool | |
shell: pwsh | |
run: | | |
Write-Output "PACKAGE VERSION: ${{ steps.gitversion.outputs.semVer }}" | |
$ProgressPreference = 'SilentlyContinue' | |
& dotnet --list-sdks | |
& dotnet tool install --global --version ${{ steps.gitversion.outputs.semVer }} --add-source NuGet/ uno.check | |
& uno-check --ci --fix --non-interactive --verbose --skip xcode --skip gtk3 --skip vswin --skip vsmac --skip wsl --skip edgewebview2 --manifest ${{ matrix.manifest }} | |
testlinux: | |
name: Validate Tool - Linux - ${{ matrix.manifest_name }} | |
needs: build_tool | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- manifest: 'manifests/uno.ui.manifest.json' | |
manifest_name: Stable | |
- manifest: 'manifests/uno.ui-preview.manifest.json' | |
manifest_name: Preview | |
- manifest: 'manifests/uno.ui-preview-major.manifest.json' | |
manifest_name: Preview net8 | |
- manifest: 'manifests/uno.ui.manifest.json' | |
manifest_name: Stable Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '' | |
- manifest: 'manifests/uno.ui-preview.manifest.json' | |
manifest_name: Preview Upgrade | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
- manifest: 'manifests/uno.ui-preview-major.manifest.json' | |
manifest_name: Preview Upgrade net8 | |
previous_tool_version: 1.4.2 | |
previous_tool_params: '--pre' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v1 | |
with: | |
name: NuGet | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Setup GitVersion | |
uses: gittools/actions/gitversion/setup@v0.9.9 | |
with: | |
versionSpec: ${{ env.GitVersion_Version }} | |
- name: GitVersion | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v0.9.9 | |
with: | |
useConfigFile: true | |
configFilePath: gitversion.yml | |
- name: Install GTK+3 | |
shell: pwsh | |
run: | | |
sudo apt update | |
sudo apt install libgtk-3-dev | |
- name: Install and Run Previous Tool | |
if: ${{ contains(matrix.previous_tool_version, '.') }} | |
shell: pwsh | |
run: | | |
Write-Output "PACKAGE VERSION: ${{ steps.gitversion.outputs.semVer }}" | |
$ProgressPreference = 'SilentlyContinue' | |
& dotnet --list-sdks | |
& dotnet tool install --global --version ${{ matrix.previous_tool_version }} uno.check | |
& uno-check --ci --fix --non-interactive --verbose --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 ${{ matrix.previous_tool_params }} | |
& dotnet tool uninstall --global uno.check | |
- name: Install and Run Tool | |
shell: pwsh | |
run: | | |
Write-Output "PACKAGE VERSION: ${{ steps.gitversion.outputs.semVer }}" | |
$ProgressPreference = 'SilentlyContinue' | |
& dotnet tool install --global --version ${{ steps.gitversion.outputs.semVer }} --add-source NuGet/ uno.check | |
& uno-check --ci --fix --non-interactive --verbose --skip xcode --skip vswin --skip vsmac --skip wsl --skip edgewebview2 --manifest ${{ matrix.manifest }} | |
sign: | |
name: Sign Package | |
if: ${{ github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }} | |
runs-on: windows-latest | |
needs: | |
- build_tool | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: NuGet | |
path: artifacts | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '3.1.x' | |
- name: Setup SignClient | |
run: | | |
dotnet tool install --tool-path build SignClient | |
- name: SignClient | |
shell: pwsh | |
run: | | |
build\SignClient sign -i artifacts\*.nupkg -c build\SignClient.json -r "${{ secrets.UNO_PLATFORM_CODESIGN_USERNAME }}" -s "${{ secrets.UNO_PLATFORM_CODESIGN_SECRET }}" -n "Uno.Check" -d "Uno.Check" -u "https://github.com/unoplatform/uno.check" | |
- name: Upload Signed Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: NuGet | |
path: .\artifacts | |
publish_dev: | |
name: Publish Dev | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
runs-on: windows-latest | |
needs: | |
- sign | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: NuGet | |
path: artifacts | |
- name: NuGet Push | |
shell: pwsh | |
run: | | |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}" | |
publish_prod: | |
name: Publish Production | |
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/') }} | |
runs-on: windows-latest | |
environment: Production | |
needs: | |
- sign | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: NuGet | |
path: artifacts | |
- name: NuGet Push | |
shell: pwsh | |
run: | | |
dotnet nuget push artifacts\*.nupkg -s https://api.nuget.org/v3/index.json -k "${{ secrets.NUGET_ORG_API_KEY }}" |