Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
141 changes: 97 additions & 44 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,63 +1,116 @@
name: Build Plugin .TapPackage
# Configure the name of this CI unit. This is the name that appears in the GitHub Actions tab
name: CI
# Configure what events trigger this action.
on: [push]

on: [push, pull_request]
# Configure environment variables that are global to the action defined by this file
env:
#OPENTAP_COLOR: auto # github messes with the "auto" color detection (i.e. it has no effect), and the "always" option breaks a lot of things
OPENTAP_ANSI_COLORS: true
OPENTAP_NO_UPDATE_CHECK: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_CONSOLE_ANSI_COLOR: true

jobs:
build-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04]
GetVersion:
runs-on:
group: OpenTAP-SpokeVPC
labels: [Linux, X64]
container: ghcr.io/opentap/oci-images/build-dotnet:latest
outputs:
ShortVersion: ${{ steps.gitversion.outputs.ShortVersion }}
GitVersion: ${{ steps.gitversion.outputs.GitVersion }}
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
# The get-gitversion action installs OpenTAP and fetches with fetch-depth: 0
- name: GitVersion
id: gitversion
uses: opentap/get-gitversion@main

Build:
runs-on:
group: OpenTAP-SpokeVPC
labels: [Linux, X64]
container: ghcr.io/opentap/oci-images/build-dotnet:latest
needs: GetVersion
env:
ShortVersion: ${{ needs.GetVersion.outputs.ShortVersion }}
GitVersion: ${{ needs.GetVersion.outputs.GitVersion }}
steps:
# Check out the files in this repository.
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# 'tap sdk gitversion' can fail if the version history is incomplete.
# A fetch-depth of 0 ensures we get a complete history.
fetch-depth: 0
# Fixes an issue with actions/checkout@v3. See https://github.com/actions/checkout/issues/290

- name: Fix tags
if: startsWith(github.ref, 'refs/tags/v')
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
- name: Build plugin

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Build
run: |
cd OpenTap.Plugins.PNAX
dotnet build -c Release
echo "${{ secrets.SIGN_SERVER_CERT }}" > $TAP_SIGN_CERT
dotnet build -c Release ./OpenTap.Plugins.PNAX/OpenTap.Plugins.PNAX.csproj
env:
TAP_SIGN_ADDRESS: ${{ secrets.TAP_SIGN_ADDRESS_INTERNAL }}
TAP_SIGN_AUTH: ${{ secrets.TAP_SIGN_AUTH }}
TAP_SIGN_CERT: ${{ github.workspace }}/sign.cer
KS8500_REPO_TOKEN: ${{ secrets.KS8500TOKEN }}
SIGN_VERSION: "1.5.0-beta.7+8118ecec"
# Upload the package so it can be downloaded from GitHub,
# and consumed by other steps in this workflow

- name: Upload binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: TapPackage
retention-days: 14
name: tap-package
retention-days: 5
path: |
OpenTap.Plugins.PNAX/bin/Release/*.TapPackage
**/bin/Release/*.TapPackage

# UnitTests:
# runs-on:
# group: OpenTAP-SpokeVPC
# labels: [Linux, X64]
# container: ghcr.io/opentap/oci-images/build-dotnet:latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4

# - name: Setup .NET
# uses: actions/setup-dotnet@v4
# with:
# dotnet-version: 6.0.x

Publish:
# Only publish on the main branch, the release branch, or if the commit is tagged.
# - name: Build
# run: dotnet test


publish:
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
environment: packages.opentap.io
runs-on: ubuntu-20.04
# This step depends on the build step
needs:
- build-ubuntu
runs-on:
group: OpenTAP-SpokeVPC
labels: [Linux, X64]
container: ghcr.io/opentap/oci-images/build-dotnet:latest
needs: Build
steps:
# Download the tap-package artifact from the Build step
- name: Download TapPackage Arfifact
uses: actions/download-artifact@v3
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: TapPackage
path: ./
# Setup OpenTAP with the PackagePublish package in order to publish the newly created package
name: tap-package

- name: Setup OpenTAP
uses: opentap/setup-opentap@v1.0
uses: opentap/setup-opentap@main
with:
version: 9.19.5
- name: Install PackagePublish
run: tap package install -f PackagePublish --version beta
- name: Install Repository Client
run: tap package install -v -f "Repository Client"
- name: Display Package Installed
run: tap package list -i
# Publish the package. This requires the package management key to be configured in the 'PUBLIC_REPO_PASS' environment variable.
- name: Publish
run: tap repo upload -t ${{ secrets.NETWORKANALYZERPUBLISHTOKEN }} "*.TapPackage"
version: 9.25.1
packages: 'Repository Client:1.0.3-beta.2+a72735c4'

- name: Publish Packages
run: tap repo upload --repository https://packages.opentap.io --token ${{ secrets.NETWORKANALYZERPUBLISHTOKEN }} "$(find . -name "*.TapPackage")"
115 changes: 73 additions & 42 deletions .github/workflows/manual_build_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,93 @@ on:
description: 'Publish to packages.opentap.io'
required: false
type: boolean
env:
OPENTAP_ANSI_COLORS: true
OPENTAP_NO_UPDATE_CHECK: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_CONSOLE_ANSI_COLOR: true

jobs:
manual-build-ubuntu:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04]
jobs:
GetVersion:
runs-on:
group: OpenTAP-SpokeVPC
labels: [Linux, X64]
container: ghcr.io/opentap/oci-images/build-dotnet:latest
outputs:
ShortVersion: ${{ steps.gitversion.outputs.ShortVersion }}
GitVersion: ${{ steps.gitversion.outputs.GitVersion }}
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
# The get-gitversion action installs OpenTAP and fetches with fetch-depth: 0
- name: GitVersion
id: gitversion
uses: opentap/get-gitversion@main

Build:
runs-on:
group: OpenTAP-SpokeVPC
labels: [Linux, X64]
container: ghcr.io/opentap/oci-images/build-dotnet:latest
needs: GetVersion
env:
ShortVersion: ${{ needs.GetVersion.outputs.ShortVersion }}
GitVersion: ${{ needs.GetVersion.outputs.GitVersion }}
steps:
# Check out the files in this repository.
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
# 'tap sdk gitversion' can fail if the version history is incomplete.
# A fetch-depth of 0 ensures we get a complete history.
fetch-depth: 0
# Fixes an issue with actions/checkout@v3. See https://github.com/actions/checkout/issues/290

- name: Fix tags
if: startsWith(github.ref, 'refs/tags/v')
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }}
- name: Build plugin

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Build
run: |
cd OpenTap.Plugins.PNAX
dotnet build -c Release
echo "${{ secrets.SIGN_SERVER_CERT }}" > $TAP_SIGN_CERT
dotnet build -c Release ./OpenTap.Plugins.PNAX/OpenTap.Plugins.PNAX.csproj
env:
TAP_SIGN_ADDRESS: ${{ secrets.TAP_SIGN_ADDRESS_INTERNAL }}
TAP_SIGN_AUTH: ${{ secrets.TAP_SIGN_AUTH }}
TAP_SIGN_CERT: ${{ github.workspace }}/sign.cer
KS8500_REPO_TOKEN: ${{ secrets.KS8500TOKEN }}
SIGN_VERSION: "1.5.0-beta.7+8118ecec"
# Upload the package so it can be downloaded from GitHub,
# and consumed by other steps in this workflow

- name: Upload binaries
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: TapPackage
retention-days: 14
name: tap-package
retention-days: 5
path: |
OpenTap.Plugins.PNAX/bin/Release/*.TapPackage

**/bin/Release/*.TapPackage
manual-publish:
if: ${{ inputs.publish }}
environment: packages.opentap.io
runs-on: ubuntu-20.04
# This step depends on the build step
needs:
- manual-build-ubuntu
runs-on:
group: OpenTAP-SpokeVPC
labels: [Linux, X64]
container: ghcr.io/opentap/oci-images/build-dotnet:latest
needs: Build
steps:
# Download the tap-package artifact from the Build step
- name: Download TapPackage Arfifact
uses: actions/download-artifact@v3
- name: Download binaries
uses: actions/download-artifact@v4
with:
name: TapPackage
path: ./
# Setup OpenTAP with the PackagePublish package in order to publish the newly created package
name: tap-package

- name: Setup OpenTAP
uses: opentap/setup-opentap@v1.0
uses: opentap/setup-opentap@main
with:
version: 9.19.5
- name: Install PackagePublish
run: tap package install -f PackagePublish --version beta
- name: Install Repository Client
run: tap package install -f "Repository Client"
- name: Display Package Installed
run: tap package list -i
# Publish the package. This requires the package management key to be configured in the 'PUBLIC_REPO_PASS' environment variable.
- name: Publish
run: tap repo upload -t ${{ secrets.NETWORKANALYZERPUBLISHTOKEN }} "*.TapPackage"
version: 9.25.1
packages: 'Repository Client:1.0.3-beta.2+a72735c4'

- name: Publish Packages
run: tap repo upload --repository https://packages.opentap.io --token ${{ secrets.NETWORKANALYZERPUBLISHTOKEN }} "$(find . -name "*.TapPackage")"
4 changes: 4 additions & 0 deletions OpenTap.Plugins.PNAX/OpenTap.Plugins.PNAX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
<!--<AdditionalOpenTapPackage Include="Developer's System CE" />-->
</ItemGroup>

<ItemGroup Condition="'$(Configuration)' == 'Release'">
<OpenTapPackageReference Include="Sign" Version="$(SIGN_VERSION)" Reference="False" Repository="https://test-automation.pw.keysight.com/api/packages" Token="$(KS8500_REPO_TOKEN)" />
</ItemGroup>

<ItemGroup>
<Compile Remove="General\GeneralFrequencyBaseStep.cs" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion OpenTap.Plugins.PNAX/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $(GitVersion) - Gets the version from Git in the recommended format Major.Minor.
<Files>
<File Path="Packages/OpenTap.Plugins.PNAX/OpenTap.Plugins.PNAX.dll" SourcePath="OpenTap.Plugins.PNAX.dll">
<SetAssemblyInfo Attributes="Version"/>
<!--ObfuscateWithDotfuscator/-->
<Sign Certificate="Keysight Technologies, Inc."/>
</File>
<File Path="Packages/OpenTap.Plugins.PNAX/Examples/Standard - CalAll - Trigger - Meas.TapPlan" SourcePath="Examples/Standard - CalAll - Trigger - Meas.TapPlan" ></File>
<File Path="Packages/OpenTap.Plugins.PNAX/Examples/FOM.TapPlan" SourcePath="Examples/FOM.TapPlan" ></File>
Expand Down
5 changes: 2 additions & 3 deletions TestPlanGenerator/TestPlanGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@
<Folder Include="Properties\" />
</ItemGroup>

<ItemGroup>
<ItemGroup Condition="'$(Configuration)' == 'Debug'">
<!-- Developer's System is needed to debug in 'Editor' -->
<AdditionalOpenTapPackage Include="Developer's System" Version="9" />

<!--<AdditionalOpenTapPackage Include="Developer's System CE" />-->
<!--<AdditionalOpenTapPackage Include="Developer's System CE" />-->
</ItemGroup>

<ItemGroup>
Expand Down