Skip to content

Build ยซfeature/2230-Add_zeromq_pub_filters_for_TPยป (t-b) #1466

Build ยซfeature/2230-Add_zeromq_pub_filters_for_TPยป (t-b)

Build ยซfeature/2230-Add_zeromq_pub_filters_for_TPยป (t-b) #1466

Workflow file for this run

name: Build Branch
run-name: Build ยซ${{ github.ref_name }}ยป (${{ github.actor}})
on:
push:
branches-ignore:
- main
- release/*
tags-ignore:
- '*'
workflow_call:
inputs:
is_called_workflow:
required: true
default: false
type: boolean
description: |
Should be set to true. This is used to determine of this workflow was called directly or
from another workflow.
do_instrumentation:
required: false
default: false
type: boolean
description: |
Set to true to enable instrumentation of Igor code. The execution will be approx. 30%
slower.
secrets:
GHA_MIES_CERTIFICATE_PIN:
required: true
GHA_MIES_FTP_ARTEFACT_STORAGE_USER:
required: true
GHA_MIES_FTP_ARTEFACT_STORAGE_PWD:
required: true
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Ipt:
name: ๐Ÿ”Ž IPT Format check
runs-on: [ self-hosted, Windows ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
# no need to checkout submodules or the full history
- name: Download ipt binary from server
run: curl -o ipt.exe "https://byte-physics.de/public-downloads/aistorage/transfer/ipt/0.6.0/ipt.exe"
- name: IPT version
run: ./ipt.exe --version
- name: Format code
run: tools/ipt-format.sh
- name: Check for changed files
run: git diff --name-only --ignore-submodules; git diff --ignore-submodules --quiet
- name: Create patch
if: ${{ failure() }}
run: git diff > format-changes.patch
- name: upload artifacts
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: IPT-assets
path: |
format-changes.patch
if-no-files-found: warn
BuildInstaller:
name: ๐Ÿ— Build ${{ matrix.kind }} installer
strategy:
matrix:
kind:
# the normal installer
- user
# This installer is *only* intended for developer internal use!
- dev
runs-on: [ self-hosted, Windows, Certificate ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Create release package and installer
run: tools/create-installer.sh ${{ fromJSON('["", "dev"]')[ matrix.kind == 'dev' ] }}
- name: Sign installer
run: tools/sign-installer.sh -p '${{ secrets.GHA_MIES_CERTIFICATE_PIN }}'
- name: upload artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: BuildInstaller-${{ matrix.kind }}-assets
path: |
*.zip
tools/installer/MIES-*.exe
if-no-files-found: error
Linting:
name: ๐Ÿ”Ž Linting
runs-on: [ self-hosted, Linux, Docker ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Code Checks
run: tools/check-code.sh
# straight from the documentation, see https://pre-commit.com/#github-actions-example
- name: set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Pre commit
run: tools/pre-commit/run.sh
CompilationTest:
name: |
๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ”ฌ Compilation: ${{ matrix.source }} ${{ fromJSON('["","with XOP"]')[matrix.hardware] }}
needs:
- BuildInstaller
strategy:
matrix:
source: [ git, installer ]
hardware: [ false, true ]
exclude:
# the git source is always checked with hardware support
- source: git
hardware: false
uses: ./.github/workflows/test-igor-workflow.yml
with:
job_name: |
๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ”ฌ Compilation: ${{ matrix.source }} ${{ fromJSON('["","with XOP"]')[matrix.hardware] }}
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: Packages/tests/Compilation/CompilationTester.pxp
installer_artifact_name: BuildInstaller-dev-assets
installer_flags: ${{ fromJSON('["-x skipHardwareXOPs",""]')[matrix.hardware] }} -s ${{ matrix.source }}
artifact_name: CompilationTest-${{ matrix.source }}-${{ fromJSON('["no-hardware","hardware"]')[matrix.hardware] }}-assets
timeout_minutes: 60
CompilationEachCommitTest:
name: |
๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ”ฌ Compilation: Each commit
if: ${{ !inputs.is_called_workflow }}
uses: ./.github/workflows/test-igor-rebase-exec-workflow.yml
with:
job_name: |
๐Ÿ‘ฉ๐Ÿพโ€๐Ÿ”ฌ Compilation: Each commit
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: Packages/tests/Compilation/CompilationTester.pxp
installer_flags: "-s git"
artifact_name: Compilation-Each-Commit-assets
timeout_minutes: 180
Documentation:
name: ๐Ÿ‘ท Documentation
runs-on: [ self-hosted, Linux, Docker ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Build documentation
run: tools/documentation/run.sh
- name: upload artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Documentation-assets
path: |
Packages/doc/*.zip
if-no-files-found: error
TestWithoutHardware:
name: ๐Ÿงช Test ${{ matrix.name }}
needs:
- BuildInstaller
- Linting
- CompilationTest
strategy:
matrix:
include:
- experiment: Packages/tests/Basic/Basic.pxp
name: Basic
- experiment: Packages/tests/PAPlot/PAPlot.pxp
name: PAPlot
- experiment: Packages/tests/HistoricData/HistoricData.pxp
name: HistoricData
uses: ./.github/workflows/test-igor-workflow.yml
with:
job_name: ๐Ÿงช Test ${{ matrix.name }}
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
artifact_name: TestWithoutHardware-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}
timeout_minutes: 60
TestNI:
name: ๐Ÿงช Test NI ${{ matrix.name }}
needs:
- BuildInstaller
- CompilationTest
- TestWithoutHardware
strategy:
matrix:
include:
- experiment: Packages/tests/HardwareBasic/HardwareBasic-NI.pxp
name: HardwareBasic
- experiment: Packages/tests/HardwareAnalysisFunctions/HardwareAnalysisFunctions-NI.pxp
name: HardwareAnalysisFunctions
uses: ./.github/workflows/test-igor-workflow.yml
with:
job_name: ๐Ÿงช Test NI ${{ matrix.name }}
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
target: "[ 'self-hosted', 'Windows', 'IgorPro', 'NI' ]"
artifact_name: TestNI-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}
timeout_minutes: 180
TestITC18:
name: ๐Ÿงช Test ITC18-USB ${{ matrix.name }}
needs:
- BuildInstaller
- CompilationTest
- TestWithoutHardware
strategy:
matrix:
include:
- experiment: Packages/tests/HardwareBasic/HardwareBasic.pxp
name: HardwareBasic
- experiment: Packages/tests/HardwareAnalysisFunctions/HardwareAnalysisFunctions.pxp
name: HardwareAnalysisFunctions
uses: ./.github/workflows/test-igor-workflow.yml
with:
job_name: ๐Ÿงช Test ITC18-USB ${{ matrix.name }}
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
target: "[ 'self-hosted', 'Windows', 'IgorPro', 'ITC' ]"
artifact_name: TestITC18-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}
timeout_minutes: 180
TestITC1600:
name: ๐Ÿงช Test ITC1600 ${{ matrix.name }}
needs:
- BuildInstaller
- CompilationTest
- TestWithoutHardware
strategy:
matrix:
include:
- experiment: Packages/tests/HardwareBasic/HardwareBasic-ITC1600.pxp
name: HardwareBasic
- experiment: Packages/tests/HardwareAnalysisFunctions/HardwareAnalysisFunctions-ITC1600.pxp
name: HardwareAnalysisFunctions
uses: ./.github/workflows/test-igor-workflow.yml
with:
job_name: ๐Ÿงช Test ITC1600 ${{ matrix.name }}
overwrite_job_name: ${{ inputs.is_called_workflow || false }}
experiment: ${{ matrix.experiment }}
target: "[ 'self-hosted', 'Windows', 'IgorPro', 'ITC1600' ]"
artifact_name: TestITC1600-${{ matrix.name }}-assets
expensive_checks: "1"
instrument_tests: ${{ fromJson('["0", "1"]')[inputs.do_instrumentation] }}
timeout_minutes: 180
ValidateNwb:
name: ๐Ÿ‘ฎ๐Ÿผ Validate NWBv2
runs-on: [ self-hosted, Linux, Docker ]
needs:
- TestITC18
- TestITC1600
- TestNI
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download ITC18-USB artifacts
uses: actions/download-artifact@v4
with:
pattern: TestITC18-*
- name: Download ITC1600 artifacts
uses: actions/download-artifact@v4
with:
pattern: TestITC1600-*
- name: Download NI artifacts
uses: actions/download-artifact@v4
with:
pattern: TestNI-*
- name: Validate and read NWBv2 files
run: tools/nwb-read-tests/run.sh
FTPUpload:
name: ๐Ÿ“ฆ FTP Upload Artifacts
runs-on: [ self-hosted, Linux, Docker ]
if: ${{ !cancelled() && !inputs.is_called_workflow}}
needs:
# All jobs that create new artifacts
- Ipt
- BuildInstaller
- CompilationEachCommitTest
- CompilationTest
- Documentation
- TestWithoutHardware
- TestNI
- TestITC18
- TestITC1600
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Flatten artifact structure
run: |
find "${{ steps.download.outputs.download-path }}" -mindepth 1 -maxdepth 1 -type d |\
xargs -I {} tools/ftp-upload/flatten-files.sh "{}"
- name: Compress some artifacts
run: tools/ftp-upload/compress-files.sh "${{ steps.download.outputs.download-path }}"
- name: Upload artifacts using FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.download.outputs.download-path }}" \
-t "branch/$(echo "${{ github.ref_name }}" | sed "s@/@_@g")/${{ github.sha }}/${{ github.run_attempt }}"