build-test-cross #27
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
# Copyright (c) Perpetual Intelligence L.L.C. All Rights Reserved. | |
# | |
# For license, terms, and data policies, go to: | |
# https://terms.perpetualintelligence.com | |
# This pipeline builds and tests the protocol projects on all supported platforms. It does not publish any package. | |
name: build-test-cross | |
# Triggers | |
on: | |
workflow_dispatch: | |
jobs: | |
ubunto: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
# Environment Variables | |
env: | |
# GitHub package authentication | |
PI_GITHUB_USERNAME_ENV: ${{ secrets.PI_GITHUB_USERNAME }} | |
PI_GITHUB_PAT_ENV: ${{ secrets.PI_GITHUB_PAT }} | |
PI_CI_REFERENCE: local | |
PI_CLI_TEST_ONLINE_LIC: ${{ secrets.PI_CLI_TEST_ONLINE_LIC }} | |
PI_CLI_TEST_OFFLINE_LIC: ${{ secrets.PI_CLI_TEST_OFFLINE_LIC }} | |
PI_CLI_TEST_PKEY_DEMO_LIC: ${{ secrets.PI_CLI_TEST_PKEY_DEMO_LIC }} | |
PI_CLI_TEST_SKEY_DEMO_LIC: ${{ secrets.PI_CLI_TEST_SKEY_DEMO_LIC }} | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Read env | |
- name: Read Env | |
run: cat .github/package_version.env >> $GITHUB_ENV | |
continue-on-error: false | |
# Protocols package version | |
# E.g. 2.3.8-preview.221225369 (latest build version including preview) | |
# PI_DEPENDENCIES_SUFFIX will be empty for release version | |
- name: Dependencies | |
run: echo "PI_CI_PACKAGE_VERSION=${{ env.PI_MAJOR_VERSION }}.${{ env.PI_MINOR_VERSION }}.${{ env.PI_PATCH_VERSION }}${{ env.PI_DEPENDENCIES_SUFFIX }}" >> $GITHUB_ENV | |
continue-on-error: false | |
# Setup .Net with global.json | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
# Restore dependencies | |
- name: Restore | |
run: dotnet restore | |
# Build | |
- name: Build | |
run: dotnet build --no-restore | |
# Test | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
macos: | |
runs-on: macos-latest | |
timeout-minutes: 15 | |
# Environment Variables | |
env: | |
# GitHub package authentication | |
PI_GITHUB_USERNAME_ENV: ${{ secrets.PI_GITHUB_USERNAME }} | |
PI_GITHUB_PAT_ENV: ${{ secrets.PI_GITHUB_PAT }} | |
PI_CI_REFERENCE: cross | |
PI_CLI_TEST_ONLINE_LIC: ${{ secrets.PI_CLI_TEST_ONLINE_LIC }} | |
PI_CLI_TEST_OFFLINE_LIC: ${{ secrets.PI_CLI_TEST_OFFLINE_LIC }} | |
PI_CLI_TEST_PKEY_DEMO_LIC: ${{ secrets.PI_CLI_TEST_PKEY_DEMO_LIC }} | |
PI_CLI_TEST_SKEY_DEMO_LIC: ${{ secrets.PI_CLI_TEST_SKEY_DEMO_LIC }} | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Read env | |
- name: Read Env | |
run: cat .github/package_version.env >> $GITHUB_ENV | |
continue-on-error: false | |
# Protocols package version | |
# E.g. 2.3.8-preview.221225369 (latest build version including preview) | |
# PI_DEPENDENCIES_SUFFIX will be empty for release version | |
- name: Dependencies | |
run: echo "PI_CI_PACKAGE_VERSION=${{ env.PI_MAJOR_VERSION }}.${{ env.PI_MINOR_VERSION }}.${{ env.PI_PATCH_VERSION }}${{ env.PI_DEPENDENCIES_SUFFIX }}" >> $GITHUB_ENV | |
continue-on-error: false | |
# Setup .Net with global.json | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
# Restore dependencies | |
- name: Restore | |
run: dotnet restore | |
# Build | |
- name: Build | |
run: dotnet build --no-restore | |
# Test | |
- name: Test | |
run: dotnet test --no-build --verbosity normal | |
windows: | |
runs-on: windows-latest | |
timeout-minutes: 15 | |
# Environment Variables | |
env: | |
# GitHub package authentication | |
PI_GITHUB_USERNAME_ENV: ${{ secrets.PI_GITHUB_USERNAME }} | |
PI_GITHUB_PAT_ENV: ${{ secrets.PI_GITHUB_PAT }} | |
PI_CI_REFERENCE: cross | |
PI_CLI_TEST_ONLINE_LIC: ${{ secrets.PI_CLI_TEST_ONLINE_LIC }} | |
PI_CLI_TEST_OFFLINE_LIC: ${{ secrets.PI_CLI_TEST_OFFLINE_LIC }} | |
PI_CLI_TEST_PKEY_DEMO_LIC: ${{ secrets.PI_CLI_TEST_PKEY_DEMO_LIC }} | |
PI_CLI_TEST_SKEY_DEMO_LIC: ${{ secrets.PI_CLI_TEST_SKEY_DEMO_LIC }} | |
steps: | |
# Checkout | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Read env | |
- name: Read Env | |
run: cat .github/package_version.env >> $env:GITHUB_ENV | |
continue-on-error: false | |
# Protocols package version | |
# E.g. 2.3.8-preview.221225369 (latest build version including preview) | |
# PI_DEPENDENCIES_SUFFIX will be empty for release version | |
- name: Dependencies | |
run: echo "PI_CI_PACKAGE_VERSION=${{ env.PI_MAJOR_VERSION }}.${{ env.PI_MINOR_VERSION }}.${{ env.PI_PATCH_VERSION }}${{ env.PI_DEPENDENCIES_SUFFIX }}" >> $env:GITHUB_ENV | |
continue-on-error: false | |
# Setup .Net with global.json | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
# Restore dependencies | |
- name: Restore | |
run: dotnet restore | |
# Build | |
- name: Build | |
run: dotnet build --no-restore | |
# Test | |
- name: Test | |
run: dotnet test --no-build --verbosity normal |